I've recently updated to PHP 5.6.10 by building it from source (Since I can't download it from the repositories, I'm still using Wheezy 7.0). The build went perfectly and once it was installed, using the command php -v gave this output.

PHP 5.6.10 (cli) (built: Sep 18 2016 09:23:21) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

Which means everything was installed successfully.

The problem is, when running phpinfo() on my apache server, it says that it's still using PHP version 5.4.45. It's still loading the libphp5.so module from /usr/lib/apache2/modules/. I don't know where the libphp5.so file was installed during my build of PHP 5.6.10 but I've looked all over the place. I can't figure out how to build the apache module.

1 Answer 1


I've found a solution to this problem.

  • Install apxs2 using sudo apt-get install apache2-threaded-dev
  • When configuring the PHP 5.6.10 source, remember to configure --with-apxs2 like this. ./configure --with-apxs2=/usr/bin/apxs2. I had to point to the apxs2 command in this case.
  • Build it as you normally would, use make followed by sudo make install.
  • Restart the apache2 server using sudo service apache2 restart.

Everything should work as planned. This is a great way to use PHP 5.6 on debian wheezy. Good luck to anyone else trying this. I hope that this helps you out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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