|  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
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: u60149431 at bedug dot com
New email:
PHP Version: OS:


 [2004-05-31 10:04 UTC] u60149431 at bedug dot com
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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-01 22:39 UTC]
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]
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 \

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 \
 [2004-12-13 01:14 UTC]
You're doing something wrong. This works fine for me too on dozen different servers and configurations from Linux to MacOSX.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jun 03 19:03:38 2023 UTC