Jump to content


Photo

Migrating PHP 5.3.26 to 5.4 on OSX 10.6 using MacPorts

php 5.4 osx

Best Answer rwhite35, 24 June 2013 - 10:44 AM

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.

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 rwhite35

rwhite35

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts
  • LocationCleveland, Ohio

Posted 22 June 2013 - 04:54 PM

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.



#2 trq

trq

    Advanced Member

  • Administrators
  • 30,731 posts
  • LocationSydney, Australia.

Posted 22 June 2013 - 06:03 PM

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

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

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#3 rwhite35

rwhite35

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts
  • LocationCleveland, Ohio

Posted 24 June 2013 - 07:20 AM

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,



#4 rwhite35

rwhite35

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts
  • LocationCleveland, Ohio

Posted 24 June 2013 - 10:44 AM   Best Answer

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com