 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

5th May 2005, 04:01 PM
|
|
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
|

5th May 2005, 05:20 PM
|
 |
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 ;-)
|

5th May 2005, 10:39 PM
|
 |
Registered User
|
|
Join Date: Apr 2005
Posts: 176

|
|
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)
|

7th May 2005, 02:27 PM
|
|
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.
|

13th May 2005, 10:31 AM
|
|
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()
|

13th May 2005, 10:34 AM
|
 |
Registered User
|
|
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026

|
|
|
rpm -q php-mysql
return anything? If not:
yum install php-mysql
|

13th May 2005, 11:11 AM
|
|
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.
|

13th May 2005, 11:18 AM
|
 |
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.
Last edited by AndyGreen; 13th May 2005 at 11:22 AM.
|

13th May 2005, 11:50 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 11

|
|
Quote:
|
Originally Posted by AndyGreen
|
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.
|

13th May 2005, 12:00 PM
|
 |
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?
|

13th May 2005, 12:24 PM
|
|
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.
|

13th May 2005, 12:31 PM
|
 |
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]]]]]] )
|

13th May 2005, 12:33 PM
|
|
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?
|

13th May 2005, 12:34 PM
|
 |
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?
|

13th May 2005, 12:40 PM
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
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)
|
|
 |
 |
 |
 |
|
|