PHP didn't update

markpatterson

Registered
Hi,

I went to the PHP site, and they say you should update PHP to be the latest: 4.3.8. So, I downloaded it, untarred it, did ./configure, make, make install, it seemed to work, but the version that phpinfo tells me, and php -i is still 4.3.2. Any ideas?

Regards,

Mark
 
markpatterson said:
I went to the PHP site, and they say you should update PHP to be the latest: 4.3.8. So, I downloaded it, untarred it, did ./configure, make, make install, it seemed to work, but the version that phpinfo tells me, and php -i is still 4.3.2. Any ideas?

First, did you restart Apache? It needs to restart to see new modules.

sudo /System/Library/Startup\ Items/Apache/Apache restart

Next: most likely the default installation settings for PHP don't jibe with the places that OS X's pre-installed PHP lives, and so Apache can't see the new PHP module.

For more on this topic, read Marc Liyanage's pages:

http://www.entropy.ch/software/macosx/php/

You can also bypass this entire problem by using his installers, which tend to work flawlessly.
 
billbaloney said:
First, did you restart Apache? It needs to restart to see new modules.

Yes.

billbaloney said:
Next: most likely the default installation settings for PHP don't jibe with the places that OS X's pre-installed PHP lives, and so Apache can't see the new PHP module.

I tend to think this is the reason. I like Marc's pages. His installers are not for the latest version yet, 4.3.8, they're only for 4.3.6. I'll look into it later.

Thanks,

Mark
 
Try `which php` that will tell you where the binary is. Mine is in /usr/bin/php

You can try to force that location with flags for `configure`.

PS keep in ind that /usr/bin is owned by...root. So if you want it to install there you'll need to `sudo make install`.
 
Thanks for trying to help

michaelsanford said:
Try `which php` that will tell you where the binary is. Mine is in /usr/bin/php
Mine too

You can try to force that location with flags for `configure`.
How do I do that?

PS keep in ind that /usr/bin is owned by...root. So if you want it to install there you'll need to `sudo make install`.
I did sudo bash first, so it was all done as root: configure, make and install.

But php -v still gives me
Code:
Pattersons-eMac:~/Downloads/php-4.3.8 root# php -v
PHP 4.3.2 (cli) (built: Feb 16 2004 19:54:11)

Any other ideas?
 
I installed PHP 5.0.0 on my machine without problems. I looked at /usr/local/bin/ and found php there. I did a './php -v' and it showed the right php version.

try that, just replace 5.0.0 with 4.3.8
 
Well, I just gave myself a surpise. php-v says 4.3.2, but my phpinfo page says 4.3.8. So, I'm happier that I was a few minutes ago. Your mention of the location is what the problem was:

Pattersons-eMac:/usr/local/bin root# ./php -v
PHP 4.3.8 (cli) (built: Aug 2 2004 20:28:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Pattersons-eMac:/usr/local/bin root# which php
/usr/bin/php

Was I supposed to uninstall the old one first? What is the correct BSD way to do that?

I might try version 5 soon as well. What do you think of it?

=== Mark
 
That's why I wanted to check your path, because /usr/bin is not a symlink to /usr/local/bin, as say /etc is a link to /private/etc.

You have two copies of PHP installed.
 
Back
Top