我有一个基于 X-Cart 的网站.它工作正常。但是,当我转到地址(手动访问链接)时 www.mysite.com/"Xx<XaXaXXaXaX>xX
我收到此错误消息:
INVALID SQL: 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '",)
' LIMIT 1' at line 1<br /><b><font color="darkred">SQL QUERY FAILURE:</font></b>SELECT xid FROM xcart_session_history WHERE ip = INET_ATON('165.193.42.141') AND host = '"XxxXx';",)
' LIMIT 1
INVALID SQL: 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';",)', 'e8bc1df13aab2c25c7560512a5029eb1')' at line 1<br /><b><font color="darkred">SQL QUERY FAILURE:</font></b>REPLACE INTO xcart_session_history (
ip,
host,
xid) VALUES (INET_ATON('165.193.42.141'), '"XxxXx';",)
', 'e8bc1df13aab2c25c7560512a5029eb1')
我发现这是我系统上的一个漏洞,因为它会泄露表名和其他详细信息。
我想阻止 PHP/MYSQL 在屏幕上显示此消息。我怎样才能禁用它?
最佳答案
将config.php中的$debug_mode
设置为2
http://help.x-cart.com/index.php?title=X-Cart:Config.php#Correcting_debug_mode
关于php - 隐藏 PHP/MySQL 错误信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11698434/