LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2009, 11:53 AM   #1
andrew.wilson
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Joomla on Linux (redhat) with 2 installations of PHP


Hi there,

I have worked a lot with php but am pretty new to linux admin.

Our server has been through the hands of a few sysadmins (very inconsistent installs etc...) and there appear to be two versions of php installed. 5.2.6 and a 4.3.10

In phpinfo() it claims the php version is 5.2.6 (as does "php-config --version") but when installing joomla it claims the php version is 4.3.10 (too low as a pre-requesite for Joomla).

In /etc/httpd/conf/httpd.conf it is loading:

"LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so"

However it also includes the files "Include conf.d/*.conf"

one of those files is /etc/httpd/conf.d/php.conf and that contains the lines:

"#LoadModule php4_module modules/libphp4.so
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so"

(Note the php4 loader is commented out).

So, my 2 questions are, Where is Joomla getting the info that php4 is installed? and How do I uninstall php4?

Thanks,

Andrew Wilson.
 
Old 09-28-2009, 12:30 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,262

Rep: Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440
Quote:
Originally Posted by andrew.wilson View Post
Hi there,

I have worked a lot with php but am pretty new to linux admin.

Our server has been through the hands of a few sysadmins (very inconsistent installs etc...) and there appear to be two versions of php installed. 5.2.6 and a 4.3.10

In phpinfo() it claims the php version is 5.2.6 (as does "php-config --version") but when installing joomla it claims the php version is 4.3.10 (too low as a pre-requesite for Joomla).

In /etc/httpd/conf/httpd.conf it is loading:

"LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so"

However it also includes the files "Include conf.d/*.conf"

one of those files is /etc/httpd/conf.d/php.conf and that contains the lines:

"#LoadModule php4_module modules/libphp4.so
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so"

(Note the php4 loader is commented out).

So, my 2 questions are, Where is Joomla getting the info that php4 is installed? and How do I uninstall php4?
Should be very simple. As root, type in "rpm -qa php*". Look for any php4 package names. I get lots of results on my system doing this, but the 'main' PHP package shows up as "php5-5.2.9-0.1.1". Once you locate the offending package, you can type in "rpm -e <whatever package name>", and it'll get removed.
 
Old 09-29-2009, 05:30 AM   #3
andrew.wilson
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for that.

Thanks for that,

Unfortunately, "rpm -qa php*" doesn't show any php packages installed which must mean (i think?) that php was never installed using rpm. Is that right?

How can I un-install php manually if that is the case? Do I just delete the files? I assume I am better to uninstall both versions of php and install php5 using rpm.

Thanks again.

Andrew.
 
Old 09-29-2009, 10:56 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,262

Rep: Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440
Quote:
Originally Posted by andrew.wilson View Post
Thanks for that,

Unfortunately, "rpm -qa php*" doesn't show any php packages installed which must mean (i think?) that php was never installed using rpm. Is that right?
Maybe...but I did forget to ask what distro you're using. If it's an RPM based one, then yes, it wasn't installed via package.

Quote:
How can I un-install php manually if that is the case? Do I just delete the files? I assume I am better to uninstall both versions of php and install php5 using rpm.
You can delete the files, but you'll have to be EXTREMELY cautious. Be sure you've got complete, good backups before you start doing ANYTHING, and have the packages downloaded and ready to go, or be ready to install via yum or some other utility.

What you can do that may possibly work, is to install the PHP4 package, then remove it. That'll overwrite the manually-installed files with ones of the same name, then remove them when you delete the package. The drawback is, if it was installed from source, the files MAY not be in the exact same locations. But it's worth a shot...
 
Old 09-29-2009, 11:43 AM   #5
andrew.wilson
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you

I will give that a go.

Andrew.

ps thanks for your prompt replies.
 
  


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
LXer: Securing Joomla! installations LXer Syndicated Linux News 0 01-03-2008 07:41 PM
PHP run in CGI mode - joomla setup - urgent itjackie Linux - Server 2 01-01-2008 08:40 PM
questions about apache, joomla, and php nomb Fedora 3 01-30-2007 01:03 AM
USB support in Linux installations (redhat,mandrake) dustinpn Mandriva 6 02-11-2004 01:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 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