@T-WagauthorMar 04.2005 — #All I've done is install php from entropy.ch
bear with me I'm really new to this. I know that apache ships with mac os x, however I haven't touched apache yet, all I've done is install php 4. If i've missed a few steps in the process and need to do something with apache, can somebody please give me some direction
@NutterMar 04.2005 — #Check to see if apache is running. I don't know how to do this in Mac.
You should have a file called httpd.conf. It has commands for what files to parse through the PHP interpreter. You need to make sure .php is being parsed. After any changes to that file you'll need to restart Apache.
I can help on either Linux or Windows, but I haven't used a Mac since middle school (just short of 15 years).
okay I'm going to try and figure out how to get .php files to be parsed automatically and I'm going to assume that restarting apache is as simple as restarting the computer.
@NutterMar 04.2005 — #Restarting the computer will restart apache. But, there should be a way to do it without going through a reboot. On Windows it's a service you can restart. On Linux it's either 'service httpd restart' or 'apachectl restart'. Hopefully one of those will sound familar to a Mac person.
httpd.conf is just a plain text file, so most any text editor should work.
@bokehMar 04.2005 — #OK! What exactly are you typing into safari to view your file. It sounds like you are viewing the file directly and not via the server. If the server was switch off and you tried to call the file using the server nothing would happen.
@T-WagauthorMar 05.2005 — #Thanks nutter and bokeh, sorry to make it sound so confusing.
After talking to our server consultant (who charges $75/hour, even to just talk on the phone with me :S) php now works on my machine as an apache module.
For the sake of communal knowledge, here's the nitty gritty:
Of course apache is shipped with osx, that I knew. What I did not know was hat php ships with osx as well, so I didn't need to download it. However, Apache, in this case, was not configured to load or add php as a module.
To alter this I had to open up the httpd.conf file (private/etc/httpd/httpd.conf after changing permissions on the file to read & write) in terminal by typing 'sudo emacs httpd.conf' in the previously stated directory. Then I had to find the lines
#LoadModule-php4 and #AddModule-php4 and remove the # marks in each which made them comments instead of commands. I saved the file by hitting ctrl-x then s then closed it by hitting ctrl x then w. Then I had to restart apache, and I did this by going to system preferences/sharing and disabled personal web sharing then re-enabled it. Baddaboom. I went back to safari, typed http://localhost/~myuser/sites/test.php and it worked fine.
I'm...going to pass out now. have a good weekend all