Re: PHP 4.0 Bug #9812 Updated: Connection to a MySQL DB

From: Date: Sat, 17 Mar 2001 20:59:25 +0000
Subject: Re: PHP 4.0 Bug #9812 Updated: Connection to a MySQL DB
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-49253@lists.php.net to get a copy of this message
I thought it was enough, but here it is: $db=mysql_connect("localhost", "user", ""); if ($db<=0) { print ("<FONT COLOR=\"Red\"><STRONG>"); print ("SQL Server error, cannot connect server</STRONG></FONT><BR>"); exit; } $rc=mysql_select_db($database,$db); if ($rc<=0) { print ("<FONT COLOR=\"Red\"><STRONG>"); print ("SQL Server error, cannot select database:".mysql_error()."</STRONG></FONT><BR>"); exit; } $database is defined properly At 20:55 17/03/2001 +0000, Bug Database wrote: >ID: 9812 >Updated by: sniper >Reported By: llevier@argosnet.com >Status: Open >Bug Type: MySQL related >Assigned To: >Comments: > >Can you please add a shortest possible script into >this report which can be used to reproduce this? > > >--Jani > > >Previous Comments: >--------------------------------------------------------------------------- > >[2001-03-17 15:46:01] llevier@argosnet.com >mysql_connect("localhost","user","") >report an error that should not exist: >SQL Server error, cannot select databaseAccess denied for user: '@localhost' to >database xxx > >@localhost ? shouldn't it be user or user@localhost? > >--------------------------------------------------------------------------- > > > >ATTENTION! Do NOT reply to this email! >To reply, use the web interface found at >http://bugs.php.net/?id=9812&edit=2 Laurent LEVIER IT Systems & Networks, Unix System Engineer Security Specialist Argosnet Security Server : http://www.Argosnet.com "Le Veilleur Technologique", "The Technology Watcher"

« previous php.dev (#49253) next »