From:             raphael dot droz+floss at gmail dot com
Operating system: 
PHP version:      5.4.6
Package:          PDO related
Bug Type:         Feature/Change Request
Bug description:Support for more pdo_mysql.default_* configuration directives

Description:
------------
PDO currently supports the following directives:
pdo_mysql.default_socket
pdo_mysql.debug

PDO constructor ignores any of mysql[i].default_* directives.

Because it's both a missing feature and lacks consistency, supporting
default_user, default_password (and why not default_host and default_port)
would be great.

Defaulting to the corresponding mysql.* or mysqli.* directives according to
the select DB driver may also be an option (while adding a bit more
magic).

Stated that, as for mysql[i]_connect, these values are taken into account
only if $user and $password are either NULL or omitted.


Test script:
---------------
// php_value    pdo_mysql.default_user  "test" // in httpd configuration
// or ini_set('pdo_mysql.default_user', 'test')
new PDO('mysql:host=localhost;dbname=test'); // $user and $password
parameters omitted
// success



-- 
Edit bug report at https://bugs.php.net/bug.php?id=62888&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62888&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62888&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62888&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62888&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62888&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62888&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62888&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62888&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62888&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62888&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62888&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62888&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62888&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62888&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62888&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62888&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62888&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62888&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62888&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62888&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62888&r=mysqlcfg

Reply via email to