[olug] mod_php? how to debug?

Daniel Pfile daniel at pfile.net
Mon Sep 1 03:53:48 UTC 2003


>  I've added mod_php via the usual make; make install on FreeBSD 4.8.
> The installation automagically added lines to httpd.conf for this
> module, I had to manually add some application-type entries but they
> were documented in make install's output, then I restarted apache
> 2.0.47.

Are you sure it added the lines?

>  I created a simple php script named index.php in the web server's
> root. When I try to load http://127.0.0.1/index.php I get the text of
> the script, instead of the expected output. Anyone have any suggestions
> on how to fix this?
>
>  Here is the script
>
> cat index.php
> <?php echo "Whacked my index.html files!\n" ; ?>

The script makes no difference, if you're getting just text, no amount of
phpinfo() is going to help you. The problem is in apache's configuration to
use the module. Could you paste in the lines from your error_log when apache
starts up? Also, the mime types for php, and any lines in httpd.conf that
are needed to make php work. Php and apache2 are a bit weird. I still run
1.3 in production everywhere, but I do have some pretty tricky setups. (Php
accelerator, chrooting suexec, and all kinds of other madness not even
related to php). So maybe I can help, I do need some more info though.

-- Daniel




More information about the OLUG mailing list