You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When visiting the browse page, I see php warnings:
[Thu Sep 18 15:11:05 2014] [error] [client 10.0.2.2] PHP Warning: mysql_real_escape_string(): Access denied for user 'apache'@'localhost' (using password: NO) in /opt/webapps/FossilCalibrations/FCD-helpers.php on line 354, referer: https://xxxx/search.php?x=4&y=18&SimpleSearch=f
[Thu Sep 18 15:11:05 2014] [error] [client 10.0.2.2] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /opt/webapps/FossilCalibrations/FCD-helpers.php on line 354, referer: https://xxxx/search.php?x=4&y=18&SimpleSearch=f
Based on the documentation for mysql_real_escape_string, it will use the last DB link connected with mysql_connect. However, if you connected with mysqli_connect (and not mysql_connect), the link will not be set. In this case, mysql_real_escape_string falls back to trying to connect with the local user, which fails.
So I'd suggest to change this to mysqli_real_escape_string, but that may trigger the opposite warning for code that's using mysql_connect.
The text was updated successfully, but these errors were encountered:
When visiting the browse page, I see php warnings:
Based on the documentation for mysql_real_escape_string, it will use the last DB link connected with
mysql_connect
. However, if you connected withmysqli_connect
(and notmysql_connect
), the link will not be set. In this case,mysql_real_escape_string
falls back to trying to connect with the local user, which fails.So I'd suggest to change this to
mysqli_real_escape_string
, but that may trigger the opposite warning for code that's usingmysql_connect
.The text was updated successfully, but these errors were encountered: