Page 1 of 1
Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 8:43 am
by mainstreetwebguy
I'm trying to upgrade to PHP 5 on OS X Tiger 10.4.11 from the default php 4x that came installed and am having problems. I have updated to Apache 2and got it working. I installed php 5 (i thought) and created a phpinfo.php file in text editor but that file still shows php version 4.4.8 when i call it.
If i am in terminal and do php -v it shows php 5.2.6
Question 1 - what could i be missing? is there anything in the httpd.conf file that needs to be modified?
I'm pretty sure that the php 5 is not being used because when i try the "file_put_contents" , i get the error "Fatal error: Call to undefined function: file_put_contents() in /Users/Jason/Sites/php/testing.php on line 15"
any thoughts guys? thanks in advance! i need schooling!
Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 10:35 am
by superdezign
Do you have multiple versions of Apache / PHP installed at the same time?
Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 10:58 am
by mainstreetwebguy
superdezign wrote:Do you have multiple versions of Apache / PHP installed at the same time?
i really can't say for sure but it would appear so:
I have turned off personal web sharing which i was told would disable the apache1x. i installed apache2 from server logistics (a complete package) and then tried to turn on apache2 by running sudo apachectl start
when i run that it turns personal web sharing back on and my localhost comes back to life which makes me thing apache1x is still installed.
I also believe that php 5 is installed as well as php 4x because typing php -v into the terminal tells me my version is 5.2.6 but when i call a
<?php phpinfo(); ?>it shows 4.4.8
i'm stuck and don't know what to do
let me know if there's any more info i can provide that might help.. as you can probably see... i'm a huge newb
Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 11:13 am
by superdezign
The problem is likely that you aren't running the server you think you are running. Only one of your Apache servers can be localhost, you know.
Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 12:01 pm
by mainstreetwebguy
superdezign wrote:The problem is likely that you aren't running the server you think you are running. Only one of your Apache servers can be localhost, you know.
c'mon i'm not that big of a newb

Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 12:13 pm
by superdezign
Then find out which one is taking priority. It's likely the first one since you don't have PHP5 enabled yet. I think phpinfo() tells you the version of your server, as well.
Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 12:22 pm
by mainstreetwebguy
Thanks for the help man, you're right.. it shows i'm running the apache1.x
what should i do from here?
Re: Updating to PHP 5 on Mac OS X 10.4.11
Posted: Tue Jun 10, 2008 12:45 pm
by superdezign
Well, you're not on a Windows PC, so that's not something I could exactly help with.
An easy fix would probably be to simply rename the old folder to something different and rename the new folder to the same name as the old one. If that doesn't help, I'd look online for a tutorial on installing Apache 2 on Mac.