Entry
php not execute (Apache on Windows)
Jul 19th, 2006 03:55
Rob Tyson, Sean Flannery,
Sorry for no text in the original post. Here's my question/problem: I
need to setup php via apache on a Win 2000 workstation. I can not,
through countless efforts, get the PHP code executed (apache serves it
like a text file). Here are the technical details:
* Win 2000
* PHP 5
* Apache 1.3
Here are the details of my httpd.conf which seems fine:
Last line of the loadModule directives is,
LoadModule php5_module "C:/php/php5apache.dll"
Last line of the AddModule directives is,
AddModule mod_php5.c
After AddType directives (within IfModule mod_mime.c):
AddType application/x-httpd-php .php
Additionall, I have php.ini in the winnt folder. I receive no error
messages. Any help would be appreciated.
Thanks.
********************************
If your PHP script is displaying as text within your browser, here are a
couple potential culprits:
- Incorrect use of the 'AddType' directive in the Apache config file
(should be something like "AddType application/x-httpd-php .php .html")
- Incorrect encoding either in your config file or your browser (This
shouldn't be a problem if you stick with the default install/config
instructions that come with PHP5/Apache)
- ***The sneakiest culprit ever*** (Kept me up for a couple days before
I caught this)... Some text editors will insert a non-viewable character
in front of your code. You can't view it, but it's enough to invalidate
your "<?php" tag.