Jump to content

Migrating PHP 5.3.26 to 5.4 on OSX 10.6 using MacPorts


Go to solution Solved by rwhite35,

Recommended Posts

Hello All,

Plan to migrate PHP 5.3 to 5.4 this week using MacPorts on a MacOSX 10.6 (Lion) server.  Plan to go through this gist as my reference.  Who has made this migration already, using MacPorts (version 2.1.3) and were there any "gotcha" I need to know about in advance? 

 

Also, I'm using a number of PEAR libraries, I don't suppose PEAR is bundled with the PHP54 port?  Any thoughts or advice is appreciated.

 

Thanks in advance.

Personally, I prefer Homebrew over MacPorts, but thats just my preference.

 

There are however instructions for installing PEAR on the page you linked to.

Thanks trq.  I looked in to Homebrew over the weekend.  Looks like I would have to add some file since Homebrew wasn't pre built OSX Server 10.6.  I will give Homebrew a try on a smaller library down the road.  If I run in to any gotcha using macports, I'll add them to this post.  Thanks again,

  • Solution

Migration Complete - following these instructions

 

Couple hick-ups, but nothing major.  The main problem was that httpd.conf file re-write didn't comment out a line. I manually comment out line line 118

from:  LoadModule php5_module modules/libphp5.so

To: #LoadModule php5_module modules/libphp5.so

 

When un-commented, this was causing an error on Apache restart -

[warn] module php5_module is already loaded, skipping

And preventing 5.4 from being the default PHP version. 

 

Changes Made to PHP.INI

First, copied the php.ini-development to my default php.ini

# from cmd-line (your path may be different)
cd /opt/local/etc/php54/ 
sudo cp php.ini-development  /opt/local/etc/php54/php.ini

Edited the php.ini file to assign the default path for my installation of MySQL

# line number directive = value
986    pdo_mysql.default_socket= /opt/local/var/run/mysql5/mysqld_socket
1135  mysql.default_socket = /opt/local/var/run/mysql5/mysqld.sock
1194  mysqli.default_socket = /opt/local/var/run/mysql5/mysqld.sock

Set the correct Timezone and Long/Lat

#Line number directive = value
919  date.timezone = "America/New_York"
922  date.default_latitude = 41.4994
925  date.default_longitude = 81.6956

Then saved and closed php.ini

 

Restarted Apache2. 

 

Odd behavior, I had to restart Apache a couple before the changes actually showed up on the command line and php test page.  But all seems to be working now.  Now on to finding all the bugs in web apps with compatibility issues.  There shouldn't be many, but I'm sure there a some.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.