LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-09-2007, 04:29 AM   #1
monk.e.boy
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Question php upgrade almost worked - apache still uses old version


Hello,

I am a new Linux user

I am using RedHat, and I have downloaded php 4.4.4 and done ./configure, make, make install and everything worked ok. If I do /usr/bin/php -v I get:

PHP 4.4.4 (cgi) (built: Feb 8 2007 09:54:41)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


Horah! But apache is still picking up the original version of php, 4.3.9 How do I uninstall 4.3.9, or stop apache looking at it? How do I even find both versions? I have tried "whereis php" and "find / -name php" but both just show me the 4.4.4 version

We have a Linux guru who we pay to help us out, but his wife is having a baby and we are a bit stuck for a couple of weeks :-)

Thanks in advance for any help!

monk.e.boy
 
Old 02-09-2007, 06:00 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,843

Rep: Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596
You should at least run:
Code:
./configure --with-apxs2=/path/to/apache/apxs
to create the php module for apache (if you're using apache 1.3.x then it should be ./configure --with-apxs=/path/to/apache/apxs).
Take a look at apache httpd.conf (or any other .conf used by an "Include" directive in httpd.conf) to see from where it's loading the older php module.
 
Old 02-09-2007, 06:28 AM   #3
monk.e.boy
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Original Poster
Rep: Reputation: 0
This is my httpd.d/php.conf:

Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
I compiled php like :

Code:
./configure --with-mysql -–with-apxs2=/usr/sbin/apxs -–prefix=/usr –with-curl -–with-dom -–with-zlib-dir=/usr/include/ --enable-ftp
Where would apache be finding the old version of php?

Thanks for the help so far :-)

monk.e.boy

life v.2
 
Old 02-09-2007, 07:26 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,843

Rep: Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596Reputation: 1596
Quote:
LoadModule php4_module modules/libphp4.so
Is this the module you're trying to install? Check the date to see if it is the one you compiled. Also did you restart apache to see if it starts using your php module?
Quote:
Where would apache be finding the old version of php?
It depends on how php was installed. I'm not familiar with rpm based distros, but I think that it was just the apache module installed. Use your package manager to see what parts of apache/php are installed.

Regards
 
Old 02-10-2007, 11:11 AM   #5
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
First off, let me recommend that you use checkinstall to make RPMs instead of using "make install". Using an RPM provides a clean way of backing out your changes if something doesn't work right:

http://asic-linux.com.mx/~izto/checkinstall/

Second, have you restarted Apache yet? Apache won't pickup the new version until you restart it.

Third, use

Code:
updatedb
and then

Code:
locate libphp4.so
to locate any files on your system. Use

Code:
man
to figure out what those commands are use for if you are not familiar with them.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Which version of Apache? PHP? Randux Slackware 6 05-22-2006 03:05 AM
how to upgrade php/apache Chris Sharman Fedora 1 01-20-2006 04:57 PM
PHP Upgrade - still at the old version Seventh Linux - Newbie 1 12-21-2004 03:40 PM
Problem after an upgrade to php 5.0.1 and Apache 1.3.31 NothingHere Linux - Software 1 09-14-2004 06:24 AM
Install/Upgrade Apache, PHP and Mysql RHEL WS 3.0 LotekDBA Red Hat 0 05-10-2004 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:33 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration