php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38841 Unable to load dynamic library '/usr/lib/php5/extensions/mysqli.so'
Submitted: 2006-09-15 10:56 UTC Modified: 2007-04-04 20:02 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: albertbrian at gmail dot com Assigned: georg (profile)
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.6 OS: OpenSuSE 10.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: albertbrian at gmail dot com
New email:
PHP Version: OS:

 

 [2006-09-15 10:56 UTC] albertbrian at gmail dot com
Description:
------------
- Linux SuSE 10.0
- Apache 2.2.3
- PHP 5.1.6
- MySQL 5.0.24

I get this warning in /var/log/apache2/error_log whenever I start/restart Apache2

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/extensions/mysqli.so' - /usr/lib/php5/extensions/mysqli.so: undefined symbol: mysql_set_character_set in Unknown on line 0


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-15 11:04 UTC] tony2001@php.net
How did you build/install PHP? 
Make sure you don't have any old libmysqlclient.so in your system.
 [2006-09-15 11:14 UTC] albertbrian at gmail dot com
Thank you for your reply.

I've checked libmysqlclient.so in system, and I find libmysqlclient.so point to libmysqlclient.so.15.0.0

I installed PHP by using rpm packages at 

http://ftp.opensuse.org/pub/opensuse/repositories/server:/php/server_apache_SuSE_Linux_10.0/i586/
 [2006-09-15 11:52 UTC] tony2001@php.net
Assigned to MySQL people.
 [2006-09-16 00:12 UTC] judas dot iscariote at gmail dot com
Well.. I myself create those packages are u  using, so next time drop me a note if you found any problem with them.

this bug is likely to be bogus.


user says he is running mysql 5.0.24 but SUSE 10.0 do not include mysql5, nor server_apache_SuSE_Linux_10 repository packages are linked against mysql 5 client libraries.
 [2006-09-16 00:24 UTC] albertbrian at gmail dot com
Thank Tony very much for your cares.

Thank judas very much for your comment. However, this problem (perhaps it's not a bug) is real. You can install Apache5-2.2.3, then install PHP5-5.1.6 (from the link in my last reply), and install MySQL 5.0.24 for SuSE 10.0 (what you said it's not included in SuSE 10.0) from this link:

http://ftp.opensuse.org/pub/opensuse/repositories/server:/database/SUSE_Linux_10.0/i586/

(Maybe this link is so long, it can be broken into 2 lines, please fix/merge these 2 lines before you check up)

Thank everyone.

Regards,
Albert Brian.
 [2006-09-16 00:26 UTC] albertbrian at gmail dot com
At the ending, I hope someone can help me fix "Unable to load dynamic library
'/usr/lib/php5/extensions/mysqli.so'" in first my comment.
 [2006-09-16 00:29 UTC] judas dot iscariote at gmail dot com
to be more precise, they are linked against mysql 4.1.13 libraries, because that is the mysql version the distribution contains, and what you are supposed to be using if you choose the server_apache_SuSE_Linux_10.0 repository.

and no, there is currenlty no php version for 10.0 linked against mysql 5, only for 10.1.
 [2006-09-16 00:37 UTC] albertbrian at gmail dot com
Thank Judas.

My bad, I do not really understand meaning of "what
you are supposed to be using if you choose the
server_apache_SuSE_Linux_10.0 repository". Can you please make it more clear ? Thanks.

Currently, I temporarily uninstall mysqli extension.
 [2006-09-16 00:44 UTC] albertbrian at gmail dot com
Temporarily close this to do more investigation.
 [2006-09-17 07:56 UTC] tony2001@php.net
Please leave the status as it is, I'd like MySQL people to take a look at it.
The question is why mysql_set_character_set() is not exported in libmysqlclient.so, while it's expected to be.
 [2006-09-27 13:37 UTC] hholzgra@php.net
mysql_set_character_set is a symbol defined in all MySQL 4.1 and 5.0 client libraries on my system (and i have quite a few). It is nothing that is only conditionally compiled in either (afaict.)

My educated guess on this would be: some other apache module uses an older (<= 4.0) mysql client library?

What happens if you try to run the PHP CLI binary and try to load ext/mysqli into that?


 [2006-10-04 03:10 UTC] albertbrian at gmail dot com
Okay I think I've figured out a clue to solve this problem.

a) For MySQL 5.0.x: libmysqlclient.so.15 is required
b) For PHP 5.1.x rpm package (OSS 10.0) was compiled to "decide" by itself: libmysqlclient.so.14 "has to" be used

From MySQL.Com, you can download "Shared compatibility libraries (4.x, 5.x libs in same package)" which contains many version of libmysqlclient.so. Think of it, if MySQL 5.0.x use libmysqlclient.so.15 but PHP 5.1.x was compiled to request libmysqlclient.so.14 only, it would make many troubles.

My English is not very well, I hope everyone could understand what I mean.

To solve this, just re-compile PHP 5.1.x rpm package (which is for OSS 10.0) to use libmysqlclient.so.15, or use the version as same as MySQL (in case users can choose diff MySQL version)
 [2007-04-04 20:02 UTC] georg@php.net
Not a PHP problem. Don't mix different versions.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat May 21 22:03:33 2022 UTC