LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-17-2011, 05:45 PM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
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?
 
Old 09-18-2011, 03:20 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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

Last edited by bathory; 09-18-2011 at 03:22 AM.
 
1 members found this post helpful.
Old 09-18-2011, 04:53 AM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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.
 
1 members found this post helpful.
Old 09-18-2011, 07:54 AM   #4
Velotrol
LQ Newbie
 
Registered: Apr 2011
Location: Rio, Brazil
Distribution: Gentoo
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
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.
 
1 members found this post helpful.
Old 09-19-2011, 11:42 AM   #5
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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!

Last edited by davidstvz; 09-19-2011 at 12:14 PM.
 
Old 09-20-2011, 01:49 AM   #6
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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 ;-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
upgraded apache and php now php breaks on ' and special characters ckob Linux - Server 4 10-22-2007 09:28 PM
PHP on LQ Upgraded to 5.1.x jeremy Linux - News 11 01-09-2006 06:30 PM
Upgraded PHP from 4.3.4 to 4.3.10 and now it won't read php.ini gregmcavoy Linux - Software 11 01-22-2005 12:16 PM
PHP upgraded to 4.0.6 jeremy LQ Suggestions & Feedback 0 07-04-2001 09:57 AM
PHP upgraded jeremy LQ Suggestions & Feedback 0 12-24-2000 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration