|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50240 pdo_mysql.default_socket in php.ini shouldn't used if it's empty
Submitted: 2009-11-20 12:29 UTC Modified: 2009-11-23 15:45 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: foutrelis at gmail dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.3.1 OS: Arch Linux
Private report: No CVE-ID:
 [2009-11-20 12:29 UTC] foutrelis at gmail dot com
When pdo_mysql.default_socket in php.ini is empty, it shouldn't be used and pdo_mysql should fallback to PDO_MYSQL_UNIX_ADDR.

It appears that OnUpdateStringUnempty should be used in the related STD_PHP_INI_ENTRY definition in ext/pdo_mysql/pdo_mysql.c, instead of OnUpdateString. Also, OnUpdateStringUnempty is used by the mysql and mysqli extensions for their default_socket directives, so it makes sense to use it here as well.

Proposed patch:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-23 15:45 UTC]
Automatic comment from SVN on behalf of iliaa
Log: Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't used if it is empty).
 [2009-11-23 15:45 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Fri Oct 09 10:01:34 2015 UTC