Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've followed this guide: http://www.phamviet.net/2012/06/03/centos-6-2-compile-php-5-4-2-from-source/

It all works as it should, but when I'm done and I type 'service httpd restart' following by 'php --version', it still displays the old 5.1.6 PHP version.

This is 'uname -a' : Linux xxxxxx.com 2.6.32-042stab061.2 #1 SMP Fri Aug 24 09:07:21 MSK 2012 i686 i686 i386 GNU/Linux

It's a VPS hosted in my main dedicated server (OpenVZ) and the OS is CentOS 6.

share|improve this question
    
Did you remove the old php version? It's not the best idea to install a self build one together with the system provided. –  Thomas Berger Oct 12 '12 at 20:33
add comment

1 Answer

up vote 0 down vote accepted

That guide misses the (critical) complication process (the authors probably assumed you would do it yourself).

Execute:

make
sudo make install

If you have more than one cpu, running make -j4 will speed it up (replace 4 with the number of CPUs you have). If you are running the make as root, remove the sudo.

share|improve this answer
    
Hello, thanks for the reply, Ive tried out your answer, but it gives me this error: libtool: link: `Zend/zend_execute.lo' is not a valid libtool object make: *** [libphp5.la] Error 1 Thanks! –  Jony Sep 23 '12 at 15:35
    
It's difficult to say from here, I don't have a similar environment to test this out. Do you absolutely need PHP 5.4.2? You can get PHP5.4 without any compilation here: webtatic.com/packages/php54 –  Jay Sep 23 '12 at 16:24
    
Do you see any errors about compiling zend_execute.lo? Do you have enough RAM to compile? stackoverflow.com/questions/970385/… might be relevant. –  Starfish Sep 23 '12 at 17:56
    
As long as it's 5.4.* I'm happy, but it gives this error: error: Failed dependencies: rpmlib(FileDigests) <= 4.6.0-1 is needed by webtatic-release-6-2.noarch rpmlib(PayloadIsXz) <= 5.2-1 is needed by webtatic-release-6-2.noarch And I've Google'd that before, but no progress whatsoever. Anyhow, if you can help with that thanks. –  Jony Sep 23 '12 at 19:10
    
The server have 3GB ram (burst) doubt that's an issue. If it needs more, let me know, can use up to 20GB. –  Jony Sep 23 '12 at 19:11
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.