image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old August 2nd, 2004, 06:36 AM
markpatterson's Avatar
Registered User
 
Join Date: Jul 2002
Location: Brisbane, Australia
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
markpatterson is on a distinguished road
PHP didn't update

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
Reply With Quote
  #2  
Old August 9th, 2004, 01:31 PM
billbaloney's Avatar
House pianist
 
Join Date: Oct 2000
Location: Brooklyn, NY
Posts: 509
Thanks: 0
Thanked 0 Times in 0 Posts
billbaloney is on a distinguished road
Quote:
Originally Posted by markpatterson
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.
__________________
Matt (billbaloney)
1.67GHz "October 2005" G4 Aluminum 1.5 GB RAM, OS 10.5.2
Lots of other things around
Helen Marie
Holford Industries
Reply With Quote
  #3  
Old August 9th, 2004, 11:04 PM
markpatterson's Avatar
Registered User
 
Join Date: Jul 2002
Location: Brisbane, Australia
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
markpatterson is on a distinguished road
Quote:
Originally Posted by billbaloney
First, did you restart Apache? It needs to restart to see new modules.
Yes.

Quote:
Originally Posted by billbaloney
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
Reply With Quote
  #4  
Old August 11th, 2004, 07:57 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
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`.
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #5  
Old August 11th, 2004, 10:33 PM
markpatterson's Avatar
Registered User
 
Join Date: Jul 2002
Location: Brisbane, Australia
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
markpatterson is on a distinguished road
Thanks for trying to help

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

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

Quote:
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?
Reply With Quote
  #6  
Old August 11th, 2004, 10:48 PM
mkwan's Avatar
Tech
 
Join Date: Aug 2001
Location: Canada
Posts: 241
Thanks: 0
Thanked 0 Times in 0 Posts
mkwan is on a distinguished road
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
__________________
mkwan

UNIX was created in the late 1960s, in an effort to provide a multiuser, multitasking system for use by programmers. The philosophy behind the design of UNIX was to provide simple, yet powerful utilities that could be pieced together in a flexible manner to perform a wide variety of tasks.
Reply With Quote
  #7  
Old August 11th, 2004, 11:04 PM
markpatterson's Avatar
Registered User
 
Join Date: Jul 2002
Location: Brisbane, Australia
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
markpatterson is on a distinguished road
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

Last edited by markpatterson; August 11th, 2004 at 11:14 PM.
Reply With Quote
  #8  
Old August 12th, 2004, 09:48 AM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
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.
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
Reply

Thread Tools

Posting 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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 09:44 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.