Link to home
Start Free TrialLog in
Avatar of marchopkins
marchopkinsFlag for United States of America

asked on

Upgrading PHP on Redhat Linux

Trying to upgrade PHP to 5.3.2.  (5.2.0) or greater is needed to run Roundcube webmail.   Not having any luck.  I've follow the directions

Tar
./configure
make
make test
make install
Tried to edit httpd.conf file but there is no Addmodule section.

Is there an easier way to do this?  Like maybe an RPM or something.

UGGGG
ASKER CERTIFIED SOLUTION
Avatar of collins23
collins23

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
after install php from source you will have to make sure that in httpd.conf file , bellow line is present

LoadModule php5_module        modules/libphp5.so

if not then you can always add that line

you can find it :
locate libphp5.so

see where is the location

also when you configure php you had to give it a path where is your apache,

-with-apxs2=/usr/local/apache/bin/apxs   ( here i assuem, you installed apache in /usr/local/apache/bin/.. )

just typing .configure will not work always if you installed Apache by your self

There is a 3rd party repository which has the latest version of php:

http://www.atomicorp.com/channels/plesk/

You may want to restrict the repo to only php related modules.  If you just enable the entire repo, you may get additional upgrades that you don't want.  I've used php from that repository for several years.  Much easier than manually compiling php and all of the dependencies.
Avatar of madunix
madunix

Please note, Red Hat will not support any third party packages or if you compile from source code. Hence you will not get support for any of your third party or custom compiled packages.

php-5.1.6 is the latest PHP version available in RHEL 5 as of now. RHEL 5.6 will be released with PHP version 5.3.
At times, I've had to manually copy newly compiled php (libphp5.so) into the apache modules directory (a common location for this would be /usr/lib/httpd/modules).  You may want to check the apache modules directory and see if the newly compiled php library was copied there.  If not, there will be a copy in you php source directory.