Re: [PHP]make error
I use php-5.4.0.tar.bz2 and MySQL-5.5.21-1.el6.src.rpm in CentOS 6.2. But I can find the MySQL headers in the MySQL source I used. Is there anything wrong with my installing MySQL? 2012/3/23 Daniel Brown danbr...@php.net 2012/3/23 黄昭源 wongzhaoy...@gmail.com: Hello, I have a problem. When I configure php with the parameter --with-mysql=/usr/local/mysql and make, some errors happen. Below is the errors: ext/mysql/php_mysql.c:995: undefined reference to `_mysqlnd_init' ext/mysql/php_mysql.c:1012: undefined reference to `mysqlnd_connect' ext/mysql/php_mysql.c:876: undefined reference to `_mysqlnd_init' ... and so on. Is there someone also come across this? Can anyone help me? Thanks! Sounds like you're missing the MySQL headers from the source library. You can either download the full source or install just the headers via your system's package manager. If you need more help, let us know what distribution you're using. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP]make error
I use php-5.4.0.tar.bz2 and MySQL-5.5.21-1.el6.src.rpm in CentOS 6.2. But I can find the MySQL headers in the MySQL source I used. Is there anything wrong with my installing MySQL? 2012/3/23 Daniel Brown danbr...@php.net 2012/3/23 黄昭源 wongzhaoy...@gmail.com: Hello, I have a problem. When I configure php with the parameter --with-mysql=/usr/local/mysql and make, some errors happen. Below is the errors: ext/mysql/php_mysql.c:995: undefined reference to `_mysqlnd_init' ext/mysql/php_mysql.c:1012: undefined reference to `mysqlnd_connect' ext/mysql/php_mysql.c:876: undefined reference to `_mysqlnd_init' ... and so on. Is there someone also come across this? Can anyone help me? Thanks! Sounds like you're missing the MySQL headers from the source library. You can either download the full source or install just the headers via your system's package manager. If you need more help, let us know what distribution you're using. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- 黄昭源(Asher Wong) *Best Wishes To You!* -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
I have installed the MySQL-devel and I can find mysql.h, but I still have the error I mentioned above. ext/mysql/php_mysql.c:995: undefined reference to `_mysqlnd_init' ext/mysql/php_mysql.c:1012: undefined reference to `mysqlnd_connect' ext/mysql/php_mysql.c:876: undefined reference to `_mysqlnd_init' ... and so on. Hi, You can just install the mysql headers via the devel package if you don't need the server: # yum install mysql-devel If you want to find where they were installed use: # find / -name mysql.h Regards Ian -- -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
I trid, but it didn't work. 2012/3/24 Daniel Brown danbr...@php.net 2012/3/23 Asher Wong wongzhaoy...@gmail.com: I have installed the MySQL-devel and I can find mysql.h, but I still have the error I mentioned above. ext/mysql/php_mysql.c:995: undefined reference to `_mysqlnd_init' ext/mysql/php_mysql.c:1012: undefined reference to `mysqlnd_connect' ext/mysql/php_mysql.c:876: undefined reference to `_mysqlnd_init' You're using the native driver, so try this instead: --with-mysql=mysqlnd -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
I tried, but it didn't work. 2012/3/24 Daniel Brown danbr...@php.net 2012/3/23 Asher Wong wongzhaoy...@gmail.com: I have installed the MySQL-devel and I can find mysql.h, but I still have the error I mentioned above. ext/mysql/php_mysql.c:995: undefined reference to `_mysqlnd_init' ext/mysql/php_mysql.c:1012: undefined reference to `mysqlnd_connect' ext/mysql/php_mysql.c:876: undefined reference to `_mysqlnd_init' You're using the native driver, so try this instead: --with-mysql=mysqlnd -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
Now I use the command below to configure php: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=mysqlnd --with-mysql=/usr/local/mysql/bin/mysql_config --with-mysqli=mysqlnd --with-pdo-mysql=myslqnd And the error happened: configure: error: Cannot find MySQL header files under /usr/local/mysql/bin/mysql_config. -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
Now I use the command below to configure php: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=mysqlnd --with-mysql=/usr/local/mysql/bin/mysql_config --with-mysqli=mysqlnd --with-pdo-mysql=myslqnd And the error happened: configure: error: Cannot find MySQL header files under /usr/local/mysql/bin/mysql_config. Note that the MySQL client library is not bundled anymore! -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
I droped it but now the new error happened: checking for mysql_config... not found configure: error: Unable to find your mysql installation And I'm sorry to send more than one reply. Maybe there are something wrong with the network here. 2012/3/24 Daniel Brown danbr...@php.net 2012/3/23 Asher Wong wongzhaoy...@gmail.com: Now I use the command below to configure php: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=mysqlnd --with-mysql=/usr/local/mysql/bin/mysql_config --with-mysqli=mysqlnd --with-pdo-mysql=myslqnd And the error happened: configure: error: Cannot find MySQL header files under /usr/local/mysql/bin/mysql_config. Note that the MySQL client library is not bundled anymore! Drop this: --with-mysql=/usr/local/mysql/bin/mysql_config and please only send one reply. I keep getting your first reply, then a second reply one or two minutes later. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- 黄昭源(Asher Wong) *Best Wishes To You!*
Re: [PHP] Re: make error
This is the result of locate mysql_config: [zhaoyuan@localhost php-5.4.0]$ locate mysql_config /home/zhaoyuan/下载/MySQL-5.5.21-1.el6.src/mysql-5.5.21/man/mysql_config.1 /home/zhaoyuan/下载/MySQL-5.5.21-1.el6.src/mysql-5.5.21/scripts/mysql_config /home/zhaoyuan/下载/MySQL-5.5.21-1.el6.src/mysql-5.5.21/scripts/ mysql_config.pl.in /home/zhaoyuan/下载/MySQL-5.5.21-1.el6.src/mysql-5.5.21/scripts/mysql_config.sh /usr/bin/mysql_config /usr/local/mysql/bin/mysql_config /usr/local/mysql/man/man1/mysql_config.1 /usr/share/man/man1/mysql_config.1.gz -- 黄昭源(Asher Wong) *Best Wishes To You!*