phpinfo() uses old version. What am I missing after "make install"?

1.9k views Asked by At

I have just built and installed (./configure, make, make install) the actual php version 5.6.9 (from http://php.net/downloads.php) on my Debian squeeze.

Typing php --version in the console brings PHP 5.6.9, as expected.

Now I want to use this version in (a newly restarted) apache2 and to test I use

<?php phpinfo(); ?>

The website shows PHP 5.3.3.

What am I missing? Where do I have to connect apache2 to php and how? Which module or library I have to replace? Where?

1

There are 1 answers

2
iGeeks On BEST ANSWER

I solved it usig the tipps from sergey (see remarks above)

  1. install apache2-dev
  2. locate apxs (which was on /usr/bin/apxs2)
  3. change to the php source package:
  4. configure --with-apxs2=/usr/bin/apxs2 --with-mysql
  5. make clean (! VERY IMPORTANT: Otherwise it won't compile!)
  6. make
  7. make test
  8. make install

works now!

Two addidional notes for joomla users a) configure --with-apxs2=/usr/bin/apxs2 --with-mysql --with-zlib (uses zlib) b) change "mysqli" to "mysql" in the old joomla/configuration.php files.