php-5.2.6 on rhel4
June 26, 2008 on 8:36 pm | In ramblings | No Commentsbuilding php-5.2.6 to our specifications on rhel4 gave me a little trouble, so i thought i’d write up the process here.
build environment: vanilla rhel 4.4/i386 install. httpd-2.0.52, apr- and apr-util-0.9.4.
prerequisites: most of the install- and build requirements are included in rhel, except for pcre and pcre-devel. i grabbed the pcre-7.3 src.rpm from our fedora mirror, compiled and installed.
the mysql AB client gave us some surprises. it installs its own, bundled version of zlib among other things, and i found that php-5.2.6 won’t (for me, anyway) install against the mysql-5.0.51a client or the mysql-5.0.45 client. i had planned on updating the mysql client installs on our web nodes, but i wound up dropping my build box back to mysql-5.0.27. voila, function ‘adler32′ not supported’ errors all gone!
build: i grabbed the php-5.2.6 src rpm from our fedora mirror and installed it.
here is a link to the .spec file i used. i basically commented out the packages not offered under rhel4 (libmcrypt, mhash, libtidy) and the packages we won’t need (mssql, freetds).
i had been working as an unprivileged user privileged with sudo, but php-5.2.6 won’t compile for gcc3, so i was lazy, su’ed, exported CC=gcc4, and continued on as root:
$ rpmbuild -bp /usr/src/redhat/SPECS/php.spec
(satisfy dependencies here)
$ rpmbuild -ba –target=i686 /usr/src/redhat/SPECS/php.spec
i recommend comparing the stock 5.2.6 php.ini against your current php.ini, as there are some new stanzas, some removed, etc. of note is the new allow_url_include directive, which is not in the php.ini file, and defaults to off. this means that any include() statements that attempt to load a url will instead throw an error. we researched this for a bit and discussed the pros and cons of leaving allow_url_include’s set to its default of off versus the disruption it would cause in our contributors’ sites. we decided to leave it off globally, but allow it, per-directory, by request.
in discovering allow_url_include we viewed many of our contributors’ sites today under 5.2.6, and generally found that wordpress, mediawiki, and other software packages that adhere to ‘best practices’ were fine, while older, home-rolled php scripts threw some errors.
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
You must be logged in to post a comment.
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^