Updating to PHP 5 on Mac OS X 10.4.11
Moderator: General Moderators
-
mainstreetwebguy
- Forum Newbie
- Posts: 4
- Joined: Tue Jun 10, 2008 8:35 am
Updating to PHP 5 on Mac OS X 10.4.11
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!
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!
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Updating to PHP 5 on Mac OS X 10.4.11
Do you have multiple versions of Apache / PHP installed at the same time?
-
mainstreetwebguy
- Forum Newbie
- Posts: 4
- Joined: Tue Jun 10, 2008 8:35 am
Re: Updating to PHP 5 on Mac OS X 10.4.11
i really can't say for sure but it would appear so:superdezign wrote:Do you have multiple versions of Apache / PHP installed at the same time?
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
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Updating to PHP 5 on Mac OS X 10.4.11
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.
-
mainstreetwebguy
- Forum Newbie
- Posts: 4
- Joined: Tue Jun 10, 2008 8:35 am
Re: Updating to PHP 5 on Mac OS X 10.4.11
c'mon i'm not that big of a newbsuperdezign 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.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Updating to PHP 5 on Mac OS X 10.4.11
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.
-
mainstreetwebguy
- Forum Newbie
- Posts: 4
- Joined: Tue Jun 10, 2008 8:35 am
Re: Updating to PHP 5 on Mac OS X 10.4.11
Thanks for the help man, you're right.. it shows i'm running the apache1.x
what should i do from here?
what should i do from here?
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Updating to PHP 5 on Mac OS X 10.4.11
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.
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.