Date: 09/15/01
- Next message: php <email protected>: "[PHP-DEV] Bug #13315: problem with function definitions"
- Previous message: rex <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- In reply to: rex <email protected>: "[PHP-DEV] Bug #13314: Warning: Supplied argument is not a valid MySQL result resource"
- Next in thread: mfischer <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 13314
User updated by: rex <email protected>
Reported By: rex <email protected>
Status: Open
Bug Type: MySQL related
Operating System: Red Hat Linux 7.1
PHP Version: 4.0.6
New Comment:
i am assuming so, since the site login validates the password against the database.
I just tried adding die($result) immediately preceding the mysql_fetch_row line again and came up with:
Resource id #2
-- RexPrevious Comments: ------------------------------------------------------------------------
[2001-09-15 05:11:20] rex <email protected>
i am assuming so, since the site login validates the password against the database.
I just tried adding die($result) immediately preceding the mysql_fetch_row line again and came up with: Resource id #2
-- Rex
------------------------------------------------------------------------
[2001-09-15 05:00:32] swm <email protected>
Are you connecting to the MySQL database before you execute your query?
------------------------------------------------------------------------
[2001-09-15 04:53:58] rex <email protected>
Background: I am running RH7.1 with MySQL 3.23, PHP-Nuke 5.0, and phpBB 1.4.1 (both Nuke and the BB are using the same database). After reading through ticket number 10368, I removed PHP4.0.4, and compiled 4.0.6 using --with-mysql=/usr/ --with-apxs
I continue to get the following error: Warning: Supplied argument is not a valid MySQL result resource.
The code that produces this error is this: function cookiedecode($user) { global $cookie, $prefix; $user = base64_decode($user); $cookie = explode(":", $user); $result = mysql_query("select pass from $prefix"._users." where uname='$cookie[1]'"); list($pass)= mysql_fetch_row($result); if ($cookie[2] == $pass && $pass != "") { return $cookie; } else { unset($user); unset($cookie); } }
I have determined that everything works up until the mysql_fetch_row function. i did this by inserting die($result) on the line prior to mysql_fetch_row. The resulting output is this: Resource id #2 I have been able to run the query inside mysql, and went so far as to have php die at the $cookie[1] and $cookie[2], just to verify that it was looking at the right information.
Any ideas or suggestions as far as this is concerned would be a great help.
Thank you,
-- Rex
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13314&edit=1
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: php <email protected>: "[PHP-DEV] Bug #13315: problem with function definitions"
- Previous message: rex <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- In reply to: rex <email protected>: "[PHP-DEV] Bug #13314: Warning: Supplied argument is not a valid MySQL result resource"
- Next in thread: mfischer <email protected>: "[PHP-DEV] Bug #13314 Updated: Warning: Supplied argument is not a valid MySQL result resource"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

