Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Can't Get PHP Working under Tiger :-(

Can't Get PHP Working under Tiger :-(
Thread Tools
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Sep 1, 2005, 06:03 PM
 
I can confirm that MySQL is running under my installation of Tiger 10.2.4 (client) because if I enter
Code:
http://localhost/
into my browser, the Apache test page comes up. So far so good.

Now to PHP. Even after going to System Preferences --> Sharing and making sure Personal Web Sharing is checked, and inserting a file called test.php into my ~/Sites/ directory, then going back to browser and entering
Code:
http://localhost/~myusername/test.php
, but all I get is the text of my source code, not the PHP test page.
So I decided to try installing a build of PHP 4 from www.entropy.ch and that didn't work either.

I'm nearing the end of my rope. This is driving me nuts. Any advice?
     
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Sep 1, 2005, 09:14 PM
 
your on the right track. but by default when apple sends out apache with its system php is turned off...

so you got to go to ~/etc/httpd/
heres a file link in case you dont got hidden files not showing file://~/etc/httpd/ (right [ or control+click] and open in new window)

and open the httpd.conf file and search for

#LoadModule php4_module libexec/httpd/libphp4.so
rename with out # so its
LoadModule php4_module libexec/httpd/libphp4.so

now search for
#AddModule mod_php4.c
and rename without # so its
AddModule mod_php4.c

now since premission errors may occur not allowing you to say there sometimes so if it does save to desktop and move it there and save by authenticating it with admin name and password

go to sharing again and stop web sharing and then start it back up.

your test.php should now work.
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Sep 1, 2005, 10:09 PM
 
Thanks for the tips --- turns out I had already done those steps but that my code on the test pages got befouled by PageSpinner (HTML added around it) by mistake. Once I fixed 'em it worked. Stupid, huh? So, now it works.
     
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Sep 1, 2005, 11:09 PM
 
np as long as you got it working it is all good
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:28 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2