|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-04-24 19:23 UTC] adambaratz@php.net
-Package: PDO related
+Package: PDO MySQL
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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