0

Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select

This issue pretains to SMF ( Simple Machines Forum ). One user cannot login with his details and is thrown this error:

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/virtua15/public_html/main/forum/Sources/Subs-Db-mysql.php on line 132

However others can login using the details without fail. What could cause this? We have deleted the user and re-added with a different user name and cleaned out the browser cache but the issue still presents itself.

Community
  • 1
  • 1
  • 1
    We'll need to see some snippets of code to be able to help with this. The second parameter to mysql_real_escape_string() is supposed to be the link to the database connection. If that is missing then something is going wrong. – Night Owl Jul 16 '11 at 04:23
  • @Jacob Krustchinsky: You should report that error to the project as well: http://www.simplemachines.org/ – hakre Jul 16 '11 at 04:26

1 Answers1

0

The resource should be the variable that contains the reference to the database connection created by mysql_connect(). That only returns a boolean value (FALSE) if the database connection fails.

Without having any code to look at, my guess is that the file that contains the login information couldn't be found by the web server (404 error) and so the variables that were supposed to contain the username and password were empty, causing the database login to fail.

This doesn't explain why it would only happen for one user. Database logins happen entirely on the server-side, so whatever is wrong with the user's computer shouldn't have any effect.

Try having that user not only clear his cache and temporary internet files, but also find them on his hard drive and empty the contents of the folder before reloading the page.