LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I thought I upgraded to PHP 5.3.8 but... (https://www.linuxquestions.org/questions/linux-software-2/i-thought-i-upgraded-to-php-5-3-8-but-903596/)

davidstvz 09-17-2011 05:45 PM

I thought I upgraded to PHP 5.3.8 but...
 
I'm running Debian (Lenny) with PHP 5.3.3-0 which was installed via apt. I wanted to upgrade to 5.3.8 for security so I downloaded the latest version and manually ran the usual:

configure
make
make test
make install

After doing that, my info.php* script still says that I'm running 5.3.3-0. Anybody know what I'm missing here?

bathory 09-18-2011 03:20 AM

Hi,

Since you used a plain ./configure (without a --prefix option), php is installed under the default /usr/local. So if you want to run the new binary you should use:
Code:

/usr/local/bin/php
You may add /usr/local/bin in your $PATH before /usr/bin, so you can always use the new php instead of the one installed by your distro

Regards

j-ray 09-18-2011 04:53 AM

You probably want to run PHP as an apache module? So you need a share object file libphp5.so that is ready to go with your apache.


1. install apxs2 (apache extension management)
sudo apt-get install apache2-prefork-dev

2. reconfigure your php
./configure --with-apxs2=/usr/bin/apxs2

then make + install + restart the server.

Velotrol 09-18-2011 07:54 AM

Quote:

Originally Posted by bathory (Post 4474998)
Hi,

Since you used a plain ./configure (without a --prefix option), php is installed under the default /usr/local. So if you want to run the new binary you should use:
Code:

/usr/local/bin/php
You may add /usr/local/bin in your $PATH before /usr/bin, so you can always use the new php instead of the one installed by your distro

Regards

Yes, thats right, but I think he forgot to call his local installation of PHP from apache2.conf. He must substitute the old call for the new one.

davidstvz 09-19-2011 11:42 AM

Thanks guys. The apache2 mods available folder has php5.load which already contains:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

I guess I will have to follow j-ray's instructions. However, I'm surprised that the current installation works as a module since apxs2 is apparently not installed yet.

I don't see any reference in my apache configuration files to a php binary, only the socket.

EDIT

In any case, I did as j-ray suggested. The only hiccup was a debian and ubuntu specific problem with apxs2 where it insists that there be existing LoadModule statements in httpd.conf . I was able to work around it by forcing make to ignore the error.

Thanks again!

j-ray 09-20-2011 01:49 AM

Quote:

I don't see any reference in my apache configuration files to a php binary
Here it is -> LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

Humans, me included, have often problems not seeing the woods for the trees ;-)


All times are GMT -5. The time now is 01:39 AM.