Fedora Linux Support Community & Resources Center
  #1  
Old 5th May 2005, 04:01 PM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
MySQL upgrading

Hi,

I have a server and a desktop both running FC3. I upgraded MySQL to 4.1 and PHP to 5.0.3 on the desktop from RPMs (installed two concurrent versions of OpenSSL to satisfy dependencies). However, for the server I ran into certain problems. After installing the required new versions of OpenSSL and DB4, I followed a similar procedure,

rpm -i MySQL-client-4.1.11-0.i386.rpm MySQL-server-4.1.11-0.i386.rpm MySQL-client-4.1.11-0.i386.rpm
rpm -i php-5.0.4-8.i386.rpm php-pear-5.0.4-8.i386.rpm php-mysql-5.0.4-8.i386.rpm

However when I try to use mysqli_connect(), I get this error:
php: error while loading shared libraries: libmysqlclient.so.10: cannot open shared object file: No such file or directory
Apparently libmysqlclient.so.10 is a file provided by MySQL 3.23, the version I replaced. MySQL 4.1 uses a newer library, libmysqlclient.so.14.
Why is it that PHP still tries to use the old library, and how can I fix this?

Also, why didn't this happen on my desktop? Is it a corruption of some sort?

Help would be greatly appreciated.

Benjamin
Reply With Quote
  #2  
Old 5th May 2005, 05:20 PM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
Apps bond with the libraries that were around when they were compiled (more precisely, linked). That's one of the reasons you see the same version of an app coming out in separate FC2 and FC3 RPMs: they were compiled in the two environments so they bonded with the right libs. You can see what libraries an app wants and is being given using ldd, eg,

ldd /bin/bash

Your PHP5 was evidently compiled on a machine that had the Fedora MySQL libs on it, so that's what it wants. You need to either recompile PHP from source or find a precompiled version that was made with the MySQL 4.1-level libs around when it was created.

Now, grasshopper, you learn why distros and their packages that all just work together are clung to by the desperate like a raft in a shipwreck ;-)
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #3  
Old 5th May 2005, 10:39 PM
bubudiu's Avatar
bubudiu Offline
Registered User
 
Join Date: Apr 2005
Posts: 176
Lightbulb

Are those official MySQL rpm's or did you 'pinch' those from development? There are dependancies so you cannot only grab the ones you did and leave the rest behind.

Installing openssl from development alongside FC3's is just asking for trouble (i know i tried to compile the source rpm)

If you want the latest and greatest - use a test/development branch but be aware they are unstable, can cause breakages ie you find gdm or yum does not work.

If you want a stable sytem use FC3 and upgrade php5/MySQL4.1 only (not stuff like glibc,db4 or openssl)
__________________
RH9 -> FC3 -> FC6 (Jan 2007) Catch me Here

FC3 Firefox Start Page FC3 Firefox Start Page Download FC3 Hardening Guide FC3 Kernel Recompile Guide

Capt Bubudiu "Sheriff"
Reply With Quote
  #4  
Old 7th May 2005, 02:27 PM
jonest Offline
Registered User
 
Join Date: Sep 2004
Location: Sydney, Australia
Posts: 162
I think you may need the MySQL-shared-compat-4.1.11-0 rpm from mysql.com.
Reply With Quote
  #5  
Old 13th May 2005, 10:31 AM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
Quote:
Originally Posted by jonest
I think you may need the MySQL-shared-compat-4.1.11-0 rpm from mysql.com.
I've installed that.
Now I get the error message
Fatal error: Call to undefined function mysqli_connect()
Reply With Quote
  #6  
Old 13th May 2005, 10:34 AM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
rpm -q php-mysql

return anything? If not:

yum install php-mysql
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #7  
Old 13th May 2005, 11:11 AM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
Quote:
Originally Posted by AndyGreen
rpm -q php-mysql

return anything? If not:

yum install php-mysql
I have php-mysql-5.0.4-8 (and php-5.0.4-8) installed from RPM.
Reply With Quote
  #8  
Old 13th May 2005, 11:18 AM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
Oho.... mysql*i*_connect is PHP5-only....

http://www.zend.com/manual/function.mysqli-connect.php

uh..oh

--edit

Maybe a good idea to dump

phpinfo();

from inside apache to make sure you are running V5.
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com

Last edited by AndyGreen; 13th May 2005 at 11:22 AM.
Reply With Quote
  #9  
Old 13th May 2005, 11:50 AM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
Quote:
Originally Posted by AndyGreen
Oho.... mysql*i*_connect is PHP5-only....

http://www.zend.com/manual/function.mysqli-connect.php

uh..oh

--edit

Maybe a good idea to dump

phpinfo();

from inside apache to make sure you are running V5.
In my previous post I stated that I installed php-5.0.4-8
Anyway phpinfo() confirms that I am running PHP 5.0.4.
Reply With Quote
  #10  
Old 13th May 2005, 12:00 PM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
Presumably mysqli_connect() is coming out of php_mysql package, which you already said is in and V5. Can this not be being picked up by Apache for some reason? Did you restart Apache since installing php_mysql?
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #11  
Old 13th May 2005, 12:24 PM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
Quote:
Originally Posted by AndyGreen
Presumably mysqli_connect() is coming out of php_mysql package, which you already said is in and V5. Can this not be being picked up by Apache for some reason? Did you restart Apache since installing php_mysql?
Yes, I did restart httpd.
Reply With Quote
  #12  
Old 13th May 2005, 12:31 PM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
" (no version information, might be only in CVS)" says the PHP page for mysqli_connect().

I wonder if this API has not made it into php_mysql yet. Why not try mysql_connect() + mysql_select_db() and see what happens.

resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]] )

vs

mysqli mysqli_connect ( [string host [, string username [, string passwd [, string dbname [, int port [, string socket]]]]]] )
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #13  
Old 13th May 2005, 12:33 PM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
Quote:
Originally Posted by AndyGreen
" (no version information, might be only in CVS)" says the PHP page for mysqli_connect().

I wonder if this API has not made it into php_mysql yet. Why not try mysql_connect() + mysql_select_db() and see what happens.

resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]] )

vs

mysqli mysqli_connect ( [string host [, string username [, string passwd [, string dbname [, int port [, string socket]]]]]] )
Hmm, but if the API hasn't made it to the php_mysql RPM, why does the same RPM provide mysqli_connect on localhost?
Reply With Quote
  #14  
Old 13th May 2005, 12:34 PM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
Sorry, what is this about localhost? I did not see you mention this yet?
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #15  
Old 13th May 2005, 12:40 PM
benjamin.choi Offline
Registered User
 
Join Date: Sep 2004
Posts: 11
Quote:
Originally Posted by AndyGreen
Sorry, what is this about localhost? I did not see you mention this yet?
Sorry, by "localhost" in the previous post I meant my desktop.
Reply With Quote
Reply

Tags
mysql, upgrading

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading mySQL DaveBloor Servers & Networking 2 9th May 2005 01:57 PM
Upgrading MySQL lcplgriffin Installation and Live Media 4 11th September 2004 07:23 PM


Current GMT-time: 10:52 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat