php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28590 configure --with-mysql-sock is ignored
Submitted: 2004-05-31 10:04 UTC Modified: 2004-12-13 01:14 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: u60149431 at bedug dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.6 OS: Fedora Core 2
Private report: No CVE-ID: None
 [2004-05-31 10:04 UTC] u60149431 at bedug dot com
Description:
------------
The option --with-mysql-sock to the configure script is completely ignored, and causes PHP to still access /tmp/mysql.sock, which is the hard-coded value from header files.

Any alternate values from /etc/my.cnf are also ignored.

Use of php.ini is not feasible in my specific application.


Expected result:
----------------
That --with-mysql-sock indicates the default value for the mysql socket. (which may be altered by a config file)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-01 22:39 UTC] iliaa@php.net
Are you compiling the MySQL extension against external or 
bundled libmysql? 
Check your phpinfo() output, what does MYSQL_SOCKET show 
for it's value? 
 [2004-06-10 17:28 UTC] u60149431 at bedug dot com
I linked it against a MySQL built from sources.

I was able to make a workaround for this bug by editing the MySQL header file where a default was defined.

What meaning does --with-mysql-sock have if it doesn't have any effect???
 [2004-06-11 15:39 UTC] iliaa@php.net
It works fine here and it worked fine before. 
 [2004-06-25 10:14 UTC] u60149431 at bedug dot com
Further analysis has revealed that the problem originates with PHP taking the socket defined in /usr/local/include/mysql/mysql_version.h for granted, even though MySQL is built with an alternate socket. The issue that PHP:s configure script completely ignores the --with-mysql-sock remains.

To re-create the error:
Build MySQL from sources using:
?	./configure \
        --enable-assembler \
        --with-unix-socket=/var/run/mysql/mysql.sock \
        --without-debug \
        --with-openssl \
        --with-openssl-includes=/usr/local/ssl/include \
        --with-openssl-libs=/usr/local/ssl/lib

And build PHP with:
?	./configure \
        --with-apxs2=/usr/local/apache2/bin/apxs \
        --with-zlib \
        --enable-calendar \
        --with-mysql=/usr/local \
        --with-mysql-sock=/var/run/mysql/mysqld.sock \
        --with-ncurses \
        --with-gettext \
        --with-xml \
        --with-imap=/root/download/imap-2004 \
        --with-imap-ssl=/usr/local/ssl \
        --with-java=$JAVA_HOME
 [2004-12-13 01:14 UTC] sniper@php.net
You're doing something wrong. This works fine for me too on dozen different servers and configurations from Linux to MacOSX.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC