Re: [PHP-DEV] Re: PHP 4.0 Bug #9812 Updated: Connection to a MySQL DB

2001-03-18 Thread Laurent LEVIER

Jani,

Stop it. I got it...

There was an error on mysql_error(), and this is what puzzled me to find out what was 
the problem.

The user I used missed a right. So once the right is Ok, no error, and then 
mysql_error does not bring me in a bad direction.

You can consider the case closed at my level.

Thanks!

@+/L


At 10:13 18/03/2001 +0100, Jani Taskinen wrote:
>On Sun, 18 Mar 2001, Laurent LEVIER wrote:
>
>>But I don't use mysql_error() in my basic script. I added it to display the error 
>message.
>>
>>Without it, the error remains, but we just dont know what error it is :)
>>
>>So there is really a problem with connect (and also pconnect, I also tried).
>>Where is that usename ??
>
>Hmm..I can't read minds so please explain WHAT doesn't work?
>
>--Jani

Laurent LEVIER
IT Systems & Networks, Unix System Engineer
Security Specialist

Argosnet Security Server : http://www.Argosnet.com
"Le Veilleur Technologique", "The Technology Watcher"


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: PHP 4.0 Bug #9812 Updated: Connection to a MySQL DB

2001-03-18 Thread Laurent LEVIER

Jani,

  $db=mysql_connect ("localhost", "argosnet", "");
  if ($db<=0)
  {
print ("");
print ("SQL Server error, cannot connect server");
exit;
  }

# Ok at this level

  $rc=mysql_select_db($database,$db);
  if ($rc<=0)
  {
print ("");
print ("SQL Server error, cannot select database");
exit;
  }

# rc<=0, then error! If mysql_error is not trustable, I cannot tell what is 
the error, but there's one



At 10:13 18/03/2001 +0100, Jani Taskinen wrote:
>On Sun, 18 Mar 2001, Laurent LEVIER wrote:
>
>>But I don't use mysql_error() in my basic script. I added it to display the error 
>message.
>>
>>Without it, the error remains, but we just dont know what error it is :)
>>
>>So there is really a problem with connect (and also pconnect, I also tried).
>>Where is that usename ??
>
>Hmm..I can't read minds so please explain WHAT doesn't work?
>
>--Jani

Laurent LEVIER
IT Systems & Networks, Unix System Engineer
Security Specialist

Argosnet Security Server : http://www.Argosnet.com
"Le Veilleur Technologique", "The Technology Watcher"


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: PHP 4.0 Bug #9812 Updated: Connection to a MySQL DB

2001-03-18 Thread Laurent LEVIER

Maybe,

But I don't use mysql_error() in my basic script. I added it to display the error 
message.

Without it, the error remains, but we just dont know what error it is :)

So there is really a problem with connect (and also pconnect, I also tried). Where is 
that usename ??
I upgraded to the last versions of all (PHP 404pl1, Apache 1.3.19 & MySQL 3.23.35), 
problem persists

At 03:44 18/03/2001 +, Bug Database wrote:
>ID: 9812
>Updated by: sniper
>Reported By: [EMAIL PROTECTED]
>Old-Status: Feedback
>Status: Closed
>Bug Type: MySQL related
>Assigned To: 
>Comments:
>
>I can reproduce this one with this script:
>
>
>$db=mysql_connect("localhost", "user", "");
>$rc=mysql_select_db("thisdbdoesnotexist",$db);
>if ($rc<=0) {
>echo mysql_error()."\n";
>mysql_close($db);
>exit;
>}
>
>?>
>
>It's mysql_error() in mysql itself that is broken.
>I can reproduce this within the mysql shell too..
>
>Not a bug in PHP. -> closed.
>
>--Jani
>
>
>
>Previous Comments:
>---
>
>[2001-03-17 15:55:32] [EMAIL PROTECTED]
>Can you please add a shortest possible script into
>this report which can be used to reproduce this?
>
>
>--Jani
>
>
>---
>
>[2001-03-17 15:46:01] [EMAIL PROTECTED]
>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"


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: PHP 4.0 Bug #9812 Updated: Connection to a MySQL DB

2001-03-17 Thread Laurent LEVIER

I thought it was enough, but here it is:

  $db=mysql_connect("localhost", "user", "");
  if ($db<=0)
  {
print ("");
print ("SQL Server error, cannot connect server");
exit;
  }

  $rc=mysql_select_db($database,$db);
  if ($rc<=0)
  {
print ("");
print ("SQL Server error, cannot select 
database:".mysql_error()."");
exit;
  }

$database is defined properly

At 20:55 17/03/2001 +, Bug Database wrote:
>ID: 9812
>Updated by: sniper
>Reported By: [EMAIL PROTECTED]
>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] [EMAIL PROTECTED]
>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"


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]