LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-10-2007, 07:16 PM   #1
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Rep: Reputation: 15
Fedora Core 3, Downgrade from PHP5 to PHP4


I'm having some serious problems here and I need it fixed ASAP.

I have a dedicated server running Fedora Core 3 that had PHP 4 installed. I ran 'yum update' which upgraded php4 to php5. I realized that php5 does not support mysql: --without-mysql is in the configure command when I put phpinfo() in a file.

I have wordpress domains that all say: Your PHP installation appears to be missing the MySQL which is required for WordPress.

I'm trying to figure out how to get mysql working with php5 or downgrade to php4. I tried removing php5, but yum wants to remove about 50 packages and the packages are very important and I cannot remove them.

I'm stuck here and I can't find any way to resolve this. Any help would be greatly appreciated.
 
Old 08-10-2007, 09:21 PM   #2
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
How are your repositories setup?
The standard yum repositories in FC3 should not have PHP5.
So you may wish to contact your support provider to fix this.

Anyways, assuming your yum repository is fairly typical, I think the missing peice is probably the 'php-mysql' package.

# yum install php-mysql
 
Old 08-10-2007, 09:56 PM   #3
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
Yes, I have tried that and the command ends with:

Parsing package install arguments
Nothing to do.

From what I can tell, the problem is that the PHP binary that was installed does not have mysql support. I've been trying various packages and compiling from source for the past several hours with no luck.
 
Old 08-10-2007, 09:59 PM   #4
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
What is the output of:
# rpm -qa | grep 'php\|mysql'

I would be careful, if this is a production server then mixing installed RPM with compilation from source may lead to a mess.

Another idea is to find the SRC.RPM for the php5 you have installed and recompile that properly with MySQL support.
 
Old 08-10-2007, 10:05 PM   #5
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
phpAds-2.0.5-7506
phpDig-1.85-7505
phpWiki-1.3.11-7508
php-imap-5.0.4-13.rhfc3.art
php-5.0.4-13.rhfc3.art
mysql-devel-4.1.21-2.rhfc3.art
phpBB-2.0.17-7518
php-ioncube-loader-1.0-fc3.build051222.05
mysql-4.1.21-2.rhfc3.art
phpBugTracker-1.19-7506
phpMoney-1.3-7510
phpsurveyor-0.98-7510
mysql-compat-4.1.21-2.rhfc3.art
php-mysql-5.0.4-13.rhfc3.art
mysql-server-4.1.21-2.rhfc3.art
php-mbstring-5.0.4-13.rhfc3.art
php-xml-5.0.4-13.rhfc3.art
php-pear-5.0.4-13.rhfc3.art
phpBook-1.50-7507
phpMyFamily-1.4.1-7508
php-pgsql-5.0.4-13.rhfc3.art
php-gd-5.0.4-13.rhfc3.art
I have tried to compile the src.rpm with no luck. I always end up with configure errors.
 
Old 08-12-2007, 07:56 PM   #6
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
How would I go about compiling from source?
 
Old 08-12-2007, 08:05 PM   #7
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
rpmbuild --rebuild php.src.rpm
 
Old 08-12-2007, 08:30 PM   #8
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
It runs for about a minute and here are the last couple lines of the output:

checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
error: Bad exit status from /var/tmp/rpm-tmp.12690 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.12690 (%build)

Does PHP5 work with MySQL 4.1?
 
Old 08-12-2007, 08:49 PM   #9
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
For compiling, you're missing mysql-devel.
# yum install mysql-devel
 
Old 08-12-2007, 08:52 PM   #10
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
yum install mysql-devel
Setting up Install Process
Setting up Repos
psa-7.5 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
atomic 100% |=========================| 951 B 00:00
updates-released 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
psa-7.5 : ################################################## 116/116
base : ################################################## 2622/2622
atomic : ################################################## 284/284
updates-re: ################################################## 910/910
Parsing package install arguments
Nothing to do
 
Old 08-12-2007, 08:54 PM   #11
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
You're right it is listed in your output above. My mistake.

I'm at a loss, not sure why your system is behaving as such.
 
Old 08-12-2007, 09:02 PM   #12
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
It seems like it can't find the location of the mysql socket. Do I need MySQL5 or should it work with MySQL 4.1? I know MySQL is working fine independent of PHP.
 
Old 08-12-2007, 09:31 PM   #13
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
Someone suggested I tell rpmbuild where my MySQL socket is: /var/lib/mysql/mysql.sock. Is this possible?
 
Old 08-12-2007, 09:58 PM   #14
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
I think I've found a way to do this but I'm not sure how to do it. I believe I need to supply the configure command with MySQL's location with:

--with-mysql-dir=/var/lib/mysql/

How can I supply arguments to configure through rpmbuild?

Edit: Scratch that. Looks like that won't help.

Last edited by eman45008; 08-12-2007 at 10:04 PM. Reason: Error made.
 
Old 08-12-2007, 10:43 PM   #15
eman45008
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Original Poster
Rep: Reputation: 15
It doesn't seem like it's going to be possible to fix this problem, so it looks like I'll have to have the dedicated server wiped and re-installed so I can re-configure everything from scratch. I guess I won't update with yum again.
 
  


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
Fedora Core 6 Downgrade PHP 5.1.6 to 4.4.4 Randvegeta Linux - Server 7 02-03-2007 02:51 PM
Fedora Core 5- MySQL Downgrade dereko Linux - Software 3 07-27-2006 10:59 AM
Php5 >> Php4 Eric45008 Slackware 22 04-25-2005 07:37 PM
PHP5.0.0RC3 on Fedora Core 2 aalbre Linux - Newbie 3 10-02-2004 06:57 PM
Downgrade Fedora Core Kernel redneon Linux - Software 2 07-15-2004 03:09 AM

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

All times are GMT -5. The time now is 10:56 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
Open Source Consulting | Domain Registration