php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #25253 mysql_{p}connect could use default parameters if supplied arguments are NULL
Submitted: 2003-08-26 11:51 UTC Modified: 2003-08-30 02:48 UTC
From: uhlar at fantomas dot sk Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.3.3 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: uhlar at fantomas dot sk
New email:
PHP Version: OS:

 

 [2003-08-26 11:51 UTC] uhlar at fantomas dot sk
Description:
------------
mysql_connect() and mysql_pconnect(), when called without arguments, use default values mysql.detault_* variables to detect what host/username/password to use. But they do so only if they are calles withou any argument. Could be this enhanced to use default variables whenever NULL is used as value?

e.g. mysql_connect("new.host.name", NULL, NULL, MYSQL_CLIENT_COMPRESS) would take mysql.default_user and mysql.default_password as username and password.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-30 02:48 UTC] georg@php.net
If (mysql)user is not specified (NULL) the current (system) user will be 
assumed. 
Changing this to a default value would break BC. 
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Jan 31 21:00:01 2026 UTC