0

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

B14D3
  • 5,188
  • 15
  • 64
  • 83

2 Answers2

4

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.

hobodave
  • 2,840
  • 2
  • 24
  • 34
  • i tried with Remi repository .. but was having a problem with php-pdo(phpinfo showed that pdo was enabled but it wasnt) and zend – B14D3 Feb 28 '11 at 17:49
  • @B14: This "remi" repository looks to be a pile of crap. I've seen other's on this site suggest it, and have seen similar complaints. If you are using CentOS you should be very selective about which repositories you utilize. If it isn't in Base, Updates, or EPEL chances are you don't need it. If you really do need the latest version fo PHP or MySQL then use the IUS repositories. They are built and maintained by Rackspace (but unsupported) and are of very high quality and free of naming conflicts. Compare this to a repository built by some random French dude. – hobodave Feb 28 '11 at 17:53
  • 1
    @B14: Also, if you're finding you "need" to compile things for your CentOS boxes, you're doing it wrong. You probably shouldn't even use CentOS, since you'll be taking a pristine, very well controlled OS and polluting it with garbage. If you want to install something, you use RPM. If you need to tweak it and compile it yourself, you use a source RPM. If you truly can't find the package in a reputable repository, you build an RPM yourself and install it that way. If you can't live with these, you shouldn't use CentOS. – hobodave Feb 28 '11 at 17:56
  • I'm gonna go ahead and disagree with you there. CentOS/RHEL certainly provides an RPM release of PHP, but in some situations you need more flexibility than that package can offer. For example, our (20,000-ish user) installation requires that we provide multiple major and minor releases of PHP in the same environment; we do this by compiling separate source releases to their own locations. It's fairly rare to encounter an architecture-level decision that can be flagged as overtly 'wrong' - in most cases, it's a question of what is most maintainable in your environment. – Jeff Albert Mar 01 '11 at 01:22
1

I'm going to echo HoboDave's suggestion here. Compiling things from source on CentOS/RHEL is painful, conterproductive, and almost always completely unnecessary.

So, question number one is: Why do you need to complile PHP from source? In case you weren't aware, RedHat maintains the latest security patches in its repository. So issues that are fixed in higher release values in source, are also fixed in the lower release numbers in CentOS/RHEL. If you don't have a specific, concrete, and really good reason, don't go recompiling things. Use the packages contained in the OS. They work.


--Christopher Karel

Christopher Karel
  • 6,582
  • 1
  • 28
  • 34