PHP code not executed properly
Posted by: cyber_kaley20 (203.212.221.---)
Date: April 29, 2006 01:47PM

I previously had a LAMP installation and all my PHP programs were executed properly, including PHPMyadmin etc. My LAMP installtion was a standard SugerSpike 4.0.

When I moved to WAMP5, not a single of my PHP programs are running properly. Take an example test.php

<?
echo "Nitin";
?>

Even this gives a blank output when executed.

What is the problem?



Escaler

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: aravot (59.144.254.---)
Date: April 30, 2006 10:49AM

Hi Nitin,

Same is the case here.

Earlier I had phpdev installed and all my projects were working fine.

It had PHP4.2.3 and therefore I shifted to WAMP.

Following code not working.

<?
echo"Hi";
?>

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: aravot (59.144.254.---)
Date: April 30, 2006 11:10AM

Also,

sqllitemanager is also not working.

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: aravot (59.144.254.---)
Date: April 30, 2006 11:46AM

Hi Nitin,

It worked for me.

Try to change

<?
echo "Nitin";
?>


to


<?php
echo "Nitin";
?>

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: May 01, 2006 04:34PM

yes, WAMP comes with short asp style tags disabled in the php.ini file. It is a good idea to use full php tags ( <?php ), not short style ( ?> ). if you are going to develop scripts to sell, and you use short tags in your scripts, anyone who buys your script and has short style tags disabed in their php.ini file, they wont work.

php comes the short style tages disabled as default.

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: aravot (59.144.253.---)
Date: May 02, 2006 04:41AM

That's right.

But problem with short tags is that these don't work with Paypal API's

I had to enable them and then Paypal API's worked(I am talking about sample api's)

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: Trozza (---.masirv.com)
Date: May 03, 2006 07:59PM

I'm having the same problem. I tried using the full php tags as well however I only get a blank screen. The default index.php page works w/o any problems.

The following outputs nothing and when you view source it shows the code verbatum:

<?php
phpinfo();
?>

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: May 03, 2006 08:10PM

Sufian wrote:

> I'm having the same problem. I tried using the full php tags
> as well however I only get a blank screen. The default
> index.php page works w/o any problems.
>
> The following outputs nothing and when you view source it shows
> the code verbatum:
>
> <?php
> phpinfo();
> ?>

Make sure your all your website files (html, php, css, images,etc.) are in your www folder.
c:\wamp\www

if your files are located somewhere else, they wont get parced by apache.

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: Trozza (---.masirv.com)
Date: May 03, 2006 08:11PM

They are all located in the www folder.

Options: ReplyQuote
Re: PHP code not executed properly
Posted by: radca78 (---.adslgp.cegetel.net)
Date: May 03, 2006 10:10PM

*sorry for my bad english*

You have to modify the "php.ini" file , in c:\wamp\php\

change :

--> short_open_tag = off

to

--> short_open_tag = on

bye

Options: ReplyQuote


Sorry, only registered users may post in this forum.