php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64262 Does not compile with mysqld/PDO
Submitted: 2013-02-21 08:47 UTC Modified: 2013-06-07 10:03 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: david at davidsteinsland dot net Assigned:
Status: Not a bug Package: mysql (PECL)
PHP Version: 5.4.11 OS: CentOS
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: david at davidsteinsland dot net
New email:
PHP Version: OS:

 

 [2013-02-21 08:47 UTC] david at davidsteinsland dot net
Description:
------------
The extension won't compile when PHP is using The MySQLnd Native Drivers, instead of php_mysql. I have mysql-devel and php_pdo, php_pdo_mysqld installed, and configure produces:

./configure --enable-apm --with-mysql=/usr/include/mysql/
checking whether to enable apm support... yes, shared
checking enable support for sqlite3... yes
checking enable support for MySQL... /usr/include/mysql/
checking enable support for MySQL... no
checking for the location of libz... no
checking for sqlite3 files in default path... found in /usr
checking for SQLite 3.*... checking for sqlite3_open in -lsqlite3... yes
configure: error: Cannot find libmysqlclient under /usr.

Expected result:
----------------
Successful build

Actual result:
--------------
Compilation fail.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-21 09:10 UTC] patrickallaert@php.net
Where is your libmysqlclient.so located?
 [2013-02-21 09:32 UTC] david at davidsteinsland dot net
/usr/lib64/mysql/
 [2013-02-21 10:13 UTC] patrickallaert@php.net
Ok, same as I do.

Do you have your symbolic links correctly created?

/usr/lib64/libmysqlclient -> mysql/libmysqlclient.so.16.0.0
/usr/lib64/libmysqlclient.so -> mysql/libmysqlclient.so.16.0.0
/usr/lib64/libmysqlclient.so.16 -> mysql/libmysqlclient.so.16.0.0
/usr/lib64/libmysqlclient.so.16.0 -> mysql/libmysqlclient.so.16.0.0
/usr/lib64/libmysqlclient.so.16.0.0 -> mysql/libmysqlclient.so.16.0.0

The version of the lib (16.0.0) might differ.
 [2013-02-21 10:40 UTC] david at davidsteinsland dot net
Yep..


[root@host]# ls -l /usr/lib64/ | grep mysql
lrwxrwxrwx   1 root root       41 Feb 21 11:38 libmysqlclient -> /usr/lib64/mysql/libmysqlclient.so.18.0.0
lrwxrwxrwx   1 root root       41 Feb 21 11:38 libmysqlclient.so -> /usr/lib64/mysql/libmysqlclient.so.18.0.0
lrwxrwxrwx   1 root root       41 Feb 21 11:38 libmysqlclient.so.18 -> /usr/lib64/mysql/libmysqlclient.so.18.0.0
lrwxrwxrwx   1 root root       41 Feb 21 11:38 libmysqlclient.so.18.0 -> /usr/lib64/mysql/libmysqlclient.so.18.0.0
lrwxrwxrwx   1 root root       41 Feb 21 11:39 libmysqlclient.so.18.0.0 -> /usr/lib64/mysql/libmysqlclient.so.18.0.0
 [2013-02-25 22:02 UTC] david at davidsteinsland dot net
Any solutions?
 [2013-03-13 10:56 UTC] uw@php.net
Please, clearify your requirement. Do you want to use the mysqlnd library or not?

"The extension won't compile when PHP is using The MySQLnd Native Drivers, instead of php_mysql."

If you want to compile PHP with support for the mysqlnd library, then why do you tell PHP to search for the libmysql client library by using "--with-mysql=..."?
 [2013-03-13 11:03 UTC] david at davidsteinsland dot net
Because there isn't any "with-mysqld" config option.
 [2013-03-29 16:06 UTC] rgagnon24 at gmail dot com
You may be typing the configure command wrong.  You are looking for --with-mysqlnd it seems, but that is not the correct option.

If you want the native drivers:
1) You do not need mysql-devel on the server, although it won't hurt
   (PHP will not link to libmysqlclient.so when using mysqlnd)
2) Add the following to your configure command:
   --enable-mysqlnd=shared --with-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd

This will cause all mysql-related objects to use the native driver supplied by PHP.  Just be sure you load mysqlnd.so BEFORE the other mysql modules in your .ini file(s)
 [2013-03-29 16:10 UTC] rgagnon24 at gmail dot com
This should be closed... not a bug.

Also:
 - Package should be "Database/MySQL related" not "PECL/APM"
 - Type should be "bug", not "feature request"

Reporter should please review the documentation http://www.php.net/manual/en/mysqlnd.install.php
 [2013-06-07 10:03 UTC] uw@php.net
-Status: Open +Status: Not a bug -Package: APM +Package: mysql
 [2013-06-07 10:03 UTC] uw@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

ERROR:

    You must provide a comment when marking a bug 'Not a bug'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC