View Full Version : php not working in Tiger

James L
Jan 28, 2006, 01:11 AM
Hey all,

I had php (the default install in Panther) up and running just fine in Panther. I recall editing a couple of lines in a cong file to get it up and running. While working on code I would keep my php files in my sites folder, and use my localhost to view them in Safari.

I upgraded to Tiger a little while ago, and just tried to access some php code to make a change or two to a script.

The php engine does not appear to be up and running. When I load the page in Safari, it just shows the script, like it is a text file.

I would assume the config file that I edited in Panther was replaced with a default one in Tiger that has php turned off... but I cannot remember which one it was, or how to turn it on again.

Any thoughts?


Jan 28, 2006, 02:00 AM

Jan 28, 2006, 11:30 PM
Just for future reference...I always make copies of the (working) httpd.conf file.
Doesn't hurt to copy ALL PHP files either.

Nov 20, 2007, 05:06 PM
I've tried enabling the php ver. 4 that comes with Tiger, I've edited the httpd.conf file to add the modules, and I still can't get it to work. The webserver works fine but even the simple:


won't work. I've racked my head all today trying to get this thing to work, but all that comes up is a blank page if I use Flock or just the raw source code of the page if I use Safari (name of the file is "index.php"). I'm stuck, and I don't know where else to look. If anyone has any suggestions I'm more than open to them. Thanks in advance for any help!


Nov 20, 2007, 11:01 PM
I don't remember where I got this from, but adding this section may help you:

<IfModule mod_php4.c>
# If php is turned on, we repsect .php and .phps files.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

# Since most users will want index.php to work we
# also automatically enable index.php
<IfModule mod_dir.c>
DirectoryIndex index.html index.php

Just place it somewhere in your httpd.conf file. Personally, we put it towards the end before the beginning of VirtualHost sections.