|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-04 18:21 UTC] teefee at test dot com
[2008-07-21 18:14 UTC] andrey@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 08:00:02 2025 UTC |
Description: ------------ When using --with-mysql=/usr/local/mysql and having a nonstandard socket (/home/databases/mysql/mysql.sock), the compiler throws a warning and fails to compile PHP with the socket that was given via the --with-mysql-sock option I'm using PHP 5.2.6 and mySQL 5.0.51b (compiled from source) /bin/sh /usr/src/php-5.2.6/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/mysql/ -I/usr/src/php-5.2.6/ext/mysql/ -DPHP_ATOM_INC -I/usr/src/php-5.2.6/include -I/usr/src/php-5.2.6/main -I/usr/src/php-5.2.6 -I/usr/include/libxml2 -I/usr/src/php-5.2.6/ext/date/lib -I/usr/local/mysql/include/mysql -I/usr/src/php-5.2.6/TSRM -I/usr/src/php-5.2.6/Zend -g -O2 -prefer-non-pic -c /usr/src/php-5.2.6/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.lo In file included from /usr/local/mysql/include/mysql/mysql.h:71, from /usr/src/php-5.2.6/ext/mysql/php_mysql.c:67: /usr/local/mysql/include/mysql/mysql_version.h:18:1: warning: "MYSQL_UNIX_ADDR" redefined In file included from /usr/src/php-5.2.6/TSRM/tsrm_config.h:1, from /usr/src/php-5.2.6/TSRM/tsrm_config_common.h:13, from /usr/src/php-5.2.6/TSRM/tsrm_virtual_cwd.h:26, from /usr/src/php-5.2.6/main/php.h:412, from /usr/src/php-5.2.6/ext/mysql/php_mysql.c:32: /usr/src/php-5.2.6/include/../main/php_config.h:1891:1: warning: this is the location of the previous definition Reproduce code: --------------- ./configure --with-pear=/usr/lib/pear --with-mysql=shared,/usr/local/mysql --with-mysql-sock=/home/databases/mysql/mysql --with-zlib-dir=/usr/include --with-zlib=shared --with-apxs2=/usr/local/apache2/bin/apxs Expected result: ---------------- PHP to throw no warnings during compile and use the new socket that I defined through configure. I expect phpinfo()'s MYSQL_SOCKET value to report the specified socket Actual result: -------------- phpinfo() shows MYSQL_SOCKET as /tmp/mysql.sock which is the value in mysql_version.h There's a number of previous bug reports for this same issue, I don't know what's happening to the fixes but it's not working at the minute.