[arch-general] PHP 5.3 - just takes a bit of reconfiguring, but then works fine

David C. Rankin drankinatty at suddenlinkmail.com
Sat Aug 22 20:51:09 EDT 2009


Listmates,

	In case any of you pull php 5.3 from testing and suddenly have all your web 
apps die, I thought I would pass along a few heads-up to save you reinventing 
the wheel.

	First Peirre Schmitz put out a few notes on the arch-dev list that provided 
the answer, but there was a lot that had to be read between the lines to 
appreciate the notes. I run several php intensive apps (eGroupware, Gallery2, 
and to a lesser extent squirrelmail) all of which went south when the 5.3 
upgrade occurred (well, all of php went south with the upgrade, but it was 
purely a new configuration issue).

	The short version of what is required to put php5.3 in place?

(1) You need to use the php.ini.pacnew file you will find in /etc/php and 
merge your php.ini setting into it;

(2) You will need to rework the following 2 settings:

	open_basdir = 

	include_path = ".:..."

	Specifically, you will need to pay careful attention to any trailing '/'s you 
have on the path definitions (or prefixes in the case of include_path) because 
any trailing slash now prevents php from descending further than the specified 
directory in search of any includes or opens it is looking for. This is what 
really cost a bit to time to chase down. Note, the changes are not all 5.3, 
but the effect of the changes in 5.3 will expose any error in the entries. I 
had 5.2.9 running fine, but I had a few extra '/'s terminating search paths 
that somehow worked, but in 5.3 that wouldn't fly.

(3) PHP5.3 split php for arch into a number of different packages. From 
Pierre's post:

php
php-apache
php-cgi
php-curl
php-enchant
php-gd
php-gmp
php-intl
php-ldap
php-mcrypt
php-odbc
php-pear
php-pgsql
php-pspell
php-snmp
php-sqlite
php-tidy
php-xsl

	You will need to install what you need and see the post in arch-dev for 
specifics of sqlite, (what's needed for Ver. 2, and Ver 3.), etc...


(4) After you install the packages, you will now need to specifically 
uncomment any of the extensions you need to load or have loadable from withing 
php.ini. (eg. extension=mysql.so; extension=odbc.so; extension=openssl.so, 
etc...)

	After going through this bit of unintended learning, PHP 5.3 is working 
smoothly as far as I can tell, logs are clean, a few derprecated warning for 
things that will disappear in php 6, but other than that, nothing. The last 
issue I found in php 5.3 is it checks for the absence mysql_free_result after 
mysql queries and warns if it isn't found. This may be something I just didn't 
notice in the earlier releases, but it provided the opportunity to clean up a 
few.

	That's it, hope it saves somebody a few extra minutes of time.

-- 
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com


More information about the arch-general mailing list