Edit report at http://bugs.php.net/bug.php?id=54644&edit=1

 ID:                 54644
 Updated by:         and...@php.net
 Reported by:        public at grik dot net
 Summary:            wrong pathes in php_pdo_mysql_int.h
 Status:             Assigned
 Type:               Bug
 Package:            PDO related
 Operating System:   unix
 PHP Version:        5.3.6
 Assigned To:        mysql
 Block user comment: N
 Private report:     N

 New Comment:

Tony,

you are not exactly right. ext/mysql/mysql_mysqlnd.h is not a left-over.
If you take a look into ext/mysqli you will find mysqli_mysqlnd.h, which
is larger but follows the same schema - ext_driver (mysqli_libmysql.h
exists). However, mysql_myslqnd.h is so small, that it could be
incorporated into another file, if wanted.



Best,

Andrey


Previous Comments:
------------------------------------------------------------------------
[2011-05-03 06:56:38] tony2...@php.net

I didn't commit the patch yet, I still want to hear from the MySQL guys
first.

Also it's their domain, not mine.

------------------------------------------------------------------------
[2011-05-02 22:32:28] public at grik dot net

thanks!



I am sorry for the wrong initial description, complaining at # include 

"ext/mysqlnd/mysqlnd.h" while the error clearly told about 

"ext/mysql/mysql_mysqlnd.h"

------------------------------------------------------------------------
[2011-05-02 21:20:36] tony2...@php.net

There's also another issue: you can't install mysqlnd itself, you have
to install one of the extensions using it. So in order to build shared
version of PDO_MYSQL with myslnd you have to build ext/mysql with myslnd
*statically*.

I believe ext/mysqlND should be full-grown extension with its own
--enable-mysqlnd option, this was you could build it separately AND
still be able to use your automagic with $PHP_MYSQLND_ENABLED.

------------------------------------------------------------------------
[2011-05-02 21:12:41] tony2...@php.net

The problem is quite weird. 

I guess this line:

#      include "ext/mysql/mysql_mysqlnd.h"

..is some kind of leftover from the good ol' times when mysqlnd was a
part of ext/mysql/; at least nothing breaks if I remove it.



So the patch is as easy as this:

--- php_pdo_mysql_int.h (revision 307861)

+++ php_pdo_mysql_int.h (working copy)

@@ -25,7 +25,6 @@



 #if defined(PDO_USE_MYSQLND)

 #      include "ext/mysqlnd/mysqlnd.h"

-#      include "ext/mysql/mysql_mysqlnd.h"

 #      include "ext/mysqlnd/mysqlnd_libmysql_compat.h"

 #      define PDO_MYSQL_PARAM_BIND MYSQLND_PARAM_BIND

 #else

------------------------------------------------------------------------
[2011-05-02 20:19:11] public at grik dot net

There is one phpize in the system, and I reinstalled PHP to ensure the
error 

persists.

mysqlnd.h exists and is present in the proper folder



[root@devel php-5.3.6]# whereis phpize

phpize: /usr/local/bin/phpize



[root@devel php-5.3.6]# phpize -v

Configuring for:

PHP Api Version: 20090626

Zend Module Api No: 20090626

Zend Extension Api No: 220090626



[root@devel php-5.3.6]# locate mysqlnd.h

/usr/local/include/php/ext/mysqlnd/mysqlnd.h

/usr/local/include/php/ext/mysqlnd/php_mysqlnd.h

/usr/src/web/php-5.3.6/ext/mysql/mysql_mysqlnd.h

/usr/src/web/php-5.3.6/ext/mysqli/mysqli_mysqlnd.h

/usr/src/web/php-5.3.6/ext/mysqlnd/mysqlnd.h

/usr/src/web/php-5.3.6/ext/mysqlnd/php_mysqlnd.h



[root@devel php-5.3.6]# ll /usr/local/include/php/ext/mysqlnd/mysqlnd.h

-rw-r--r-- 1 root root 17088 2011-05-02 20:49 

/usr/local/include/php/ext/mysqlnd/mysqlnd.h



[root@devel php-5.3.6]# php-config --includes

-I/usr/local/include/php -I/usr/local/include/php/main -

I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -

I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=54644


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54644&edit=1

Reply via email to