PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » LiveUser » Bug #789

mysql error when username/password is wrong

Details

Submitted2004-02-18 21:16 UTC
Fromlaran at buildagreat dot com
StatusNo Feedback
PackageLiveUser
PHP Version4.3.4
OSWin2K
Roadmaps(Not assigned)

Comments

[2004-02-18 21:16 UTC] laran at buildagreat dot com

Description:
------------
My code contains only:

require_once(dirname(__FILE__).'/live_user_config.inc.php');
$g_liveUser=&LiveUser::factory($live_user_config);

When the login form is submitted with a valid username/password I get no error. When the form is submitted with an invalid username or password I get the error.

I have LiveUser configured to use a connection for database access. I do this instead of giving LiveUser a dsn with which to establish it's own connection.

I close the connection at the end of every script as the very last thing.

Basically something is trying to close the database connection after execution of the script finishes. I know this because the error I see displayed is output after the end of the html that my script outputs.

Reproduce code:
---------------
No code of mine is generating the error.

Expected result:
----------------
There should be no output at all. An attempt should be made to close the connection which simply silently fails b/c the connection is already closed.

Actual result:
--------------
no : 2
str : mysql_close(): 24 is not a valid MySQL-Link resource
file : C:\PHP\PEAR\pear\DB\mysql.php
line : 182
ctx : Array
(
[this] => db_mysql Object
(
[connection] => Resource id #24
[phptype] => mysql
[dbsyntax] => mysql
[prepare_tokens] => Array
(
)

[prepare_types] => Array
(
)

[num_rows] => Array
(
)

[transaction_opcount] => 0
[autocommit] => 1
[fetchmode] => 1
[_db] => sos
[_debug] =>
[_default_error_mode] =>
[_default_error_options] =>
[_default_error_handler] =>
[_error_class] => DB_Error
[_expected_errors] => Array
(
)

[features] => Array
(
[prepare] =>
[pconnect] => 1
[transactions] => 1
[limit] => alter
)

[errorcode_map] => Array
(
[1004] => -15
[1005] => -15
[1006] => -15
[1007] => -5
[1008] => -17
[1022] => -5
[1046] => -14
[1050] => -5
[1051] => -18
[1054] => -19
[1062] => -5
[1064] => -2
[1100] => -21
[1136] => -22
[1146] => -18
[1048] => -3
[1216] => -3
)

[type] =>
[prepared_queries] =>
[prepare_maxstmt] => 0
[last_query] =>
[fetchmode_object_class] => stdClass
[options] => Array
(
[persistent] =>
[optimize] => performance
[debug] => 0
[seqname_format] => %s_seq
[autofree] =>
)

[dbh] =>
[dsn] => Array
(
[phptype] => mysql
[dbsyntax] => mysql
[username] => sos
[password] => sos
[protocol] => tcp
[hostspec] => localhost
[port] => 3306
[socket] =>
[database] => sos
)

)

)

[2004-05-13 10:36 UTC] smith at backendmedia dot com

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.