Free as-in-beer not good enough?

PHP

For years now, if my clients were using RedHat Enterprise Linux (or CentOS), which ships with a rather old version of PHP, I recommended that they replace PHP with Zend Server - either the free version (CE) or the commercially supported version. The vendor provides a nice RPM repository, so it's every-so-easy, but they don't provide source code. Which is sometimes an issue...

Anyway, the issue that highlighted the problem wasn't in itself that big a deal (once diagnosed): due to the way in which they have compiled the LDAP support, LDAPS (ldap over ssl) was not available. Normally, fixing that is as simple as either (a) filing a bug, including a patch, and waiting for it to be fixed, or (b) patching and rebuilding the software myself. However Zend isn't great at updating (their free product at least), and the source wasn't available, so I couldn't do either.

I could have hacked up the install with a replacement ldap.so - just the module that was impacted - but that would make my installs unmaintainable. So I did some research, and the landscape was somewhat better than when I first looked - a couple of years ago. Since then, a community has sprung up that specifically maintains updated RPM packages for PHP, Python, MySQL and a few other packages - for RHEL.

Anyway, I tried out their repo on one of my development servers, and it worked perfectly first time. Here's some instructions, and here's the steps I followed (note, I didn't replace the mysql install):


# remove old zend install
rpm -qa \*zend\* | xargs -t rpm -e
rm -f /etc/yum.repos.d/zend.repo
rm -rf /usr/local/zend

# install the ius release rpm, containing the yum configuration
rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1....

# you may also need to install the epel release if you'r not already using it
# rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-1...

# install required RPMs
yum install php52-ldap php52-mysql php52-gd php52-mbstring php52-pecl-apc php52-snmp php52-devel php-pear-Console-Table

# update the following three settings in /etc/php.ini
# max_execution_time = 300     ; Maximum execution time of each script, in seconds
# max_input_time = 600    ; Maximum amount of time each script may spend parsing request data
# memory_limit = 100M      ; Maximum amount of memory a script may consume (16MB)

# restart
pecl install uploadprogress
service httpd restart