From:             daniel dot fallon at nuim dot ie
Operating system: CentOS 4.5
PHP version:      5.2.6
PHP Bug Type:     Compile Failure
Bug description:  --with-mysql-sock fails to compile & work

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.



-- 
Edit bug report at http://bugs.php.net/?id=45179&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45179&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45179&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45179&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45179&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45179&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45179&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45179&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45179&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45179&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45179&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45179&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45179&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45179&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45179&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45179&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45179&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45179&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45179&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45179&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45179&r=mysqlcfg

Reply via email to