Apache Not Reading PHP....

L

liberal123

Guest
Ok, So I go to my local IP, and I get my directory listing, all good so far....

But when I click a PHP file, it just displays the code, or better still, asks me to download the php file.

I installed Zend Studio Server yesterday, with php5, but still no luck.

Web sharing is enabled. Using a Mac Mini 1.42 with 512MB of RAM :)

Any help is much appreciated as always :D

Lee
 
OP
J

JunMacTech

Guest
What is the extension of the file that you wrote the php on? If it is anything other than .php, you are probably going to have to set it up to parse PHP in that type of file. For example, if it is a .htm or .html file.
 
Joined
Jan 13, 2006
Messages
81
Reaction score
1
Points
8
Location
Chicago, IL
Your Mac's Specs
MacBook Pro 2.8Ghz, 4GB RAM, 500GB HDD
try adding these statements to the httpd.conf file -

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

Do a search of it, drop them in right after AddHandler server-parsed .shtml


Then restart the webserver.

Also, create a file called something like test.php and put this in it: <?phpinfo()?>
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top