Compile PHP5.3.6 on OEL5.5 x64

All you need is apache installed, then download php 5.3.6. src and run the following configuration command.

./configure --build=x86_64-redhat-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pcre-regex --with-libexpat-dir=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-libxml-dir=/usr --with-apxs2=/usr/sbin/apxs --with-mysql --with-gd --enable-soap --enable-mbstring --with-xsl --disable-dba --without-unixODBC --disable-xmlreader --disable-xmlwriter

Next note the errors during configuration and install the required packages needed from the install media then rerun the command up till it finishes succesfully.

When the configuration is done, run the “make all” command after which you are requested to run the “make test” command. Then finaly run the “make install” command.

Installing the correct packages might consume some time…

Good luck! 🙂

–If you encounter an “Cannot find libmysqlclient” error you either didnt install all the mysql packages or you need to add –with-libdir=lib64 behind the –with-mysql=/usr/bin entry.

(The mysql module isnt shipped anymore with the distribution!)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s