PHP not recognised
Posted by: Ross Kingston (---.dsl.netsource.ie)
Date: February 09, 2006 03:56PM

I installed Wamp my apache server is working however it only recognises .html files. When I create a php file using notepad and save it in the www directory and then try and open it the local host cannot find it can anyone help?


Options: ReplyQuote
Re: PHP not recognised
Posted by: Robert (---.eburwd3.vic.optusnet.com.au)
Date: February 09, 2006 04:10PM

Did you make an actual php file with " <?php " on the first line?
Or was it just a file with the .php extension?

For me - everything worked out-of-the-box

Options: ReplyQuote
Re: PHP not recognised
Posted by: Ross Kingston (---.dsl.netsource.ie)
Date: February 09, 2006 04:18PM

Ya I put php code in notepad and saved it as a .php but it seems to stay as a txt file in the www directory and the server cannot recognise it?

Options: ReplyQuote
Re: PHP not recognised
Posted by: Robert (---.eburwd3.vic.optusnet.com.au)
Date: February 09, 2006 04:26PM

Can you open [localhost]

Options: ReplyQuote
Re: PHP not recognised
Posted by: Ross Kingston (---.dsl.netsource.ie)
Date: February 09, 2006 04:27PM

Ya no problem

Options: ReplyQuote
Re: PHP not recognised
Posted by: Robert (---.eburwd3.vic.optusnet.com.au)
Date: February 09, 2006 04:56PM

Okay - so PHP works.

Its your file thats the problem

Options: ReplyQuote
Re: PHP not recognised
Posted by: Robert (---.eburwd3.vic.optusnet.com.au)
Date: February 09, 2006 05:06PM

I just realised what you wrote earlier.

In Notepad choose "Save As" and save as type "All Files" and filename "index.php"

Options: ReplyQuote
Re: PHP not recognised
Posted by: Laszlo (---.bulldogdsl.com)
Date: February 13, 2006 04:25AM

I have a same problem, the server can not recognise any script..
It is a basic script but still blank page <? echo "tisis a root" ?>
I tryed everything but dosen't work.
Only the <?php phpinfo() ?> working but nothing else.
Please give me a hint what is the problem.

Options: ReplyQuote
Re: PHP not recognised
Posted by: Robert (---.pbn.com.au)
Date: February 13, 2006 05:59AM

Make sure you save the file as a PHP file not a text file.
Extension of .php NOT .txt

amazing how many people fall for that.

By default choose "Save As" when you save a file and select save as "All Files"

Options: ReplyQuote
Re: PHP not recognised
Posted by: Johan (---.bredband.comhem.se)
Date: February 13, 2006 12:35PM

Hi
in php.ini is a line
short_open_tag = Off
should be set to:
short_open_tag = On

Otherwise just the <?php and not <? is working

Options: ReplyQuote


Sorry, only registered users may post in this forum.