Linux – Problem with compiling PHP on Centos

centoslinuxPHPsource

Im trying all day compile the newest PHP from source. At first after configure, make, make install there was no libphp5.so anywhere on system(problem with PHP SAPI module CGI instead apache2handler), after downloading the source one more time and compile one more time the command make install is stoping at this moment

php-5.3.5]# make install
Installing PHP SAPI module:       apache2handler
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp5.la /usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install cp libphp5.la /usr/lib64/httpd/modules/
cp .libs/libphp5.so /usr/lib64/httpd/modules/libphp5.so
cp .libs/libphp5.lai /usr/lib64/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/php-5.3.5/libs'
chmod 755 /usr/lib64/httpd/modules/libphp5.so

[blinking coursor here, and it blinks forever]

Any ideas??

this is my configure

'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--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-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'

system: centos 64 bit
php 5.3.5

EDIT:
when I logged from another terminal and use top the CPU was on 100%

7516 root      25   0 80144 4164 1452 R 100.0  0.1   2:02.37 apxs 

EDIT: the same problem is described here http://www.linuxforums.org/forum/servers/138135-trying-install-php-5-2-6-but-apxs-takes-forever.html

Best Answer

Why would you [ab]use an enterprise OS by compiling PHP from source? If you're using CentOS this should be the absolute last resort.

If you just need PHP 5.3.5 then I suggest using the IUS Community Repo.

I have detailed usage instructions in my answer here.