Re-install PHP5

laloula

Registered
I seem to have accidentally deleted my php5 install when I uninstalled MAMP. I am running 10.5.8. I tried to find a php5 package to install from web, but all I could find was most current for snow leopard. I want to install the latest version of php5 that will work with my OS version. What's my best solution? TIA for any help.
 
http://www.entropy.ch/software/macosx/php/

That's the best one available, it's linked directly from php.net.

It installs very easily and works well.

Edit: You do know that 10.5 has php5 included but not enabled, right? The only real reason to install another build is to get a later version or a missing feature.

I installed Marc's to get a newer version and mcrypt. I did get mcrypt working with the built in php5 install by linking it to a old php4 build's mcrypt but then I decided to just install Marc's newest package.
 
Last edited:
Hi simbala,

I did download that version, but now it won't install cause it says I have another version running. Is php5 is enabled even though I disabled php in the httpd.conf file by removing the #, and also made sure mysql wasn't running?

I finally did find a php5 folder, and a php4 folder, in the trash in the MAMP folder, and put the php5 folder back on my desktop cause I wasn't sure where it actually came from. I wouldn't mind restoring it to it's rightful place, just to get it all working, then worry about installing the better version later. (For right now, I'm just trying to twiddle with my WP theme and learn php a little.)

It's not clear to me what files are contained in the php installation and where they live. If I knew that, could I just drag them back to where they belong (I think MAMP relocated them.)
 
Removing the # will enable the line.

The # makes the line into a comment so the instruction is ignored.

Marc's package should be a real simple install and as far as I know is the best implementation available without building your own. I know it can be confusing the first time but have patience and don't get frustrated. If you start to get frustrated walk away and do something else for a while.

You'll be better off with something you understand than with files scattered all over the place, been there, done that.
 
Last edited:
I followed the instructions, I think, but I must have missed a step or two. The phpinfo() test just returns "server not responding". If I un-comment the line
LoadModule php5_module libexec/apache2/libphp5.so​
in /etc/apache2/httpd.cnf, and restart web-sharing, the old PHP works fine.

Stupid question time: How does Apache know where the Entropy PHP is?

I'm running 10.6.4 (not server) and the installation does one thing differently from what it says it will: New files appear in /etc/apache2/other, not /etc/apache2/sites.

PS: All I really want is to enable the "mcrypt" extension.
 
Last edited:
Back
Top