#23492 [Opn]: mysql_connect() sometimes fails to use password

From: Date: Thu, 08 May 2003 13:15:10 +0000
Subject: #23492 [Opn]: mysql_connect() sometimes fails to use password
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39300@lists.php.net to get a copy of this message
 ID:               23492
 User updated by:  dziugas dot baltrunas at m-1 dot lt
 Reported By:      dziugas dot baltrunas at m-1 dot lt
 Status:           Open
 Bug Type:         MySQL related
 Operating System: FreeBSD 4.8-RELEASE
 PHP Version:      4.3.1
 New Comment:

Today I recompiled PHP with bundled mysql library as you recommended
but the problem still persists:
[08-May-2003 16:09:48] PHP Warning:  mysql_connect() [<a
href='http://www.php.net/function.mysql-connect'>function.mysql-connect</a>]:
Access denied for user: 'public@10.10.12.254' (Using password: NO) in
/my/web/space/lib/mysql.php on line 10

here is info from "my error log":
/index.php:2003-05-08 16:09:48:db1.m-1.lan:public:secret - :Access
denied for user: 'public@10.10.12.254' (Using password: NO)

here "public" is the username and "secret" is the password.

current phpinfo() about mysql:
Active Persistent Links  0  
Active Links  0  
Client API version  3.23.49  
MYSQL_MODULE_TYPE  builtin  
MYSQL_SOCKET  /tmp/mysql.sock  
MYSQL_INCLUDE  no value  
MYSQL_LIBS  no value


Previous Comments:
------------------------------------------------------------------------

[2003-05-07 07:13:29] dziugas dot baltrunas at m-1 dot lt

thanks for the comments. we are using Apache/1.3.27. actually, I can't
asure that this problem was with earlier versions of PHP, i.e. < 4.3.1,
because only from version 4.3.0 I started to write every warning/error
to the file. 

I will try to find time to recompile php with bundled version of mysql,
because I can't do this during the peak hours. Futhermore, I'm building
php from FreeBSD mod_php4's port and "by default" it tries to find
installed mysql-client.  

One more thing which needs to be mentioned - this issue occurs in "web
portals" which are build from different files, i.e. using
include/require functions. 

I'm still concerned about the error of not using password (Using
password: NO), because AFAIK this error is being produced by mysql
library as well as the whole possible mysql_error() output. maybe this
error could mean something different?

------------------------------------------------------------------------

[2003-05-06 18:33:50] sniper@php.net

And did the 'earlier php version (?)' have this problem when it was
using the 3.23.55 mysql??


------------------------------------------------------------------------

[2003-05-06 18:33:04] sniper@php.net

Under what webserver are you getting this?
Does it make any difference if you use the bundled mysql library
instead? (don't pass any path to --with-mysql)


------------------------------------------------------------------------

[2003-05-06 01:18:14] dziugas dot baltrunas at m-1 dot lt

here is snip from phpinfo() about mysql:
MySQL Support enabled 
Active Persistent Links  0  
Active Links  0  
Client API version  4.0.12  
MYSQL_MODULE_TYPE  external  
MYSQL_SOCKET  /tmp/mysql.sock  
MYSQL_INCLUDE  -I/usr/local/include/mysql  
MYSQL_LIBS  -L/usr/local/lib/mysql -lmysqlclient  

mysql servers lives not in the same place webserver does. earlier php
was compiled with 3.23.55 client library, then I decided to compile it
with 4.0.12. it didn't make sense. I'm not sure it's PHP bug natively,
but I'm mainly curious about why it "fails to use password" ?

one more thing to say - these systems are loaded enough, i.e.
mysqladmin reports 15.968 queries per second, so I said before, it's
hard to repeat this error in, to say, normal conditions.

------------------------------------------------------------------------

[2003-05-05 16:25:21] sniper@php.net

What makes you think it's PHP bug, and not bug in the 
fairly new Mysql4 ?? Did this happen with Mysql 3.23.xx ?

Are you using the bundled mysql library or did you compile 
PHP with the mysql4 client library? Check your phpinfo() 
output for mysql section for the API version.

Does this happen with CLI or with some server module?


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/23492

-- 
Edit this bug report at http://bugs.php.net/?id=23492&edit=1



Thread (16 messages)

« previous php.bugs (#39300) next »