View Full Version : Get PHP Running On OSX
webtrek 01-28-2005, 09:36 PM What I am trying to do: I am trying to run PHP on my OSX machine with Apache 1.3 so that I can edit/reskin OScommerce (pre built open source shopping cart) on my machine then upload it.
What I have done: I logged in as root/admin, then downloaded PHP 5.0.3 for MAC OSX and ran the installation. Then activated "websharing" in Pref. Then I rebooted and tried to load a PHP file in my browser it didn't work?
My Terminal experience is very little, I am able to get around with CD, LS, LOCATE because of a little research and ancient DOS experience, but I don't know how to check if PHP is active in Apache, or even if that is heading in the right direction. This "Learn PHP in 24 Hours" book I have is no help and I have scoured the internet for the info :( . Please help so that I may move forward with my life/business. I have a feeling this is going to be a Terminal fix. Please be very specific with your commands, I have no prior experience with linux or unix. I am most grateful for your advice and guidance. I am on bended knee.
Dude128 01-28-2005, 11:07 PM I'm not familiar with Macs at all, but in general, I believe you have to start the webserver software before it will work (and I don't know if you've done that). if you don't know how to do that (and I don't either lol), try looking for more information about using Apache. it probably isn't related to PHP or your OS, but the webserver.
webtrek 01-28-2005, 11:25 PM I'm not familiar with Macs at all, but in general, I believe you have to start the webserver software before it will work (and I don't know if you've done that). if you don't know how to do that (and I don't either lol), try looking for more information about using Apache. it probably isn't related to PHP or your OS, but the webserver.
I think you are right about executing some kind of file or activating some line of code, I am still looking for the answer, I looked at the apache manual. it really doesn't help with the command line procedure for activating PHP. Not at least in a language I understand.
Still Struggling
Dude128 01-28-2005, 11:38 PM did you get some confirmation that the PHP software was installed properly?
I was thinking it might be something as simple as starting the webserver software, assiming there's nothing wrong with the Apache or PHP installations. I don't know if it would automatically start with the OS- just like your browser probably doesn't start when you boot into the OS, you have to open it. I think you may have to start the webserver like that.
webtrek 01-29-2005, 12:49 AM did you get some confirmation that the PHP software was installed properly?
I was thinking it might be something as simple as starting the webserver software, assiming there's nothing wrong with the Apache or PHP installations. I don't know if it would automatically start with the OS- just like your browser probably doesn't start when you boot into the OS, you have to open it. I think you may have to start the webserver like that.
Yes, that makes a lot of sense, but the install did not leave an executable file behind, for example, an icon. I think PHP has to executed by Apache. Apache loads on startup in the background. I think that I have to change something in the Apache config file so that it calls for PHP to execute. That is what I have gathered so far, but I don't have the know-how to do that, and I am not even sure that is the correct procedure, I am feeling around in the dark, which happens from time-to-time but I have been on this for 2 days, I need some reinforcements. I agree that it is probably simple. I just can't seem to find the procedure anywhere, which is unusual for such a popular scripting language. Some has the answer. Are you out there?
bejayel 01-31-2005, 01:43 AM look at your php installation file. it should be located int eh php folder yo installed, or unzipped to. install.txt or something should be the file you want. Then look for how to install in apache 1.3.x. You will see what to do from there. It has somethign to do with goign to the apache httpd config and adding addtype php etc etc. You will have no problem with it when you read the install file.
webtrek 01-31-2005, 01:59 AM Thanks Everyone!
I went back to the apple page and found a very simple fix.....fheeew. JUSt LET APPLE DO THE WORK, you do not need to know Unix commands or even open the Terminal, although shouldn't we all; that is going on the New Years resolution list.
Step 1: Download Apache 2 from Apple.com (very easy), use their search in the software section.
*Crucial Step 1a: Disable Web Sharing in pref before you begin installation of Apache 2 (remove the checkmark)(this action will disable Apache 1 *this is critical)
Step 1b: Install Apache 2, with the auto installer in OSX
Step 1c: Install Apache.pref.panel (use this in place the web-sharing pref) You will not need to use web-sharing pref again because it activate Apache 1, which will cause problems with Apache 2. Trust me
Step 2: Download PHP 4 installer from Apple and install
Step 2a: drop the test.php file that comes with PHP4 into your local folder http://local/test.php
Step 3: TEST IT: Now open the test.php from that location with your browser. If you see the PHP test page your good, if not, refer to the installation manuals for both your new downloads, they are really easy to follow and they have some troubleshooting.
That's it!
Good luck
|