Page 1 of 1
PHP code in the source
Posted: Sun Jul 16, 2006 5:21 pm
by wbryan6
I currently have PHP 5 setup on Win x64 with Apache 2.0 and I'm having a problem with one page. No matter how simple I make the PHP code (eg.
), nothing ever executes. Further more, when I open the source code for the page I can see the php code in the source. Obviously there are some problems there... Does anyone have some advice to offer? Perhaps some settings to check in Apache? Incidentally, I do have an index.php page that works fine, just not any other page I try to setup. Thanks in advance.
Posted: Sun Jul 16, 2006 5:31 pm
by Weirdan
are you sure you have your php code wrapped with php tags like this:
Posted: Sun Jul 16, 2006 5:32 pm
by Burrito
I would guess that you don't have the module loaded for php.
you need a line like this in your httpd.conf
Code: Select all
LoadModule php5_module /PHP/php5apache2.dll
you also need to make sure you have your extensions mapped for php.
something like this:
Code: Select all
AddType application/x-httpd-php .php
edit: I didn't read carefully enough...it's only one page that's not working

doh!
Posted: Sun Jul 16, 2006 5:38 pm
by Benjamin
What are you using to edit your .php files? Some editors, especially on Macs, insert characters that PHP doesn't like.
Posted: Sun Jul 16, 2006 6:53 pm
by wbryan6
I use PHPEdit 1.0. Haven't had any problems with it in the past (been using it exclusively for about 7-8 months).
Posted: Sun Jul 16, 2006 7:10 pm
by Benjamin
Do the files have execute permissions?