由于某种原因,我无法再访问HostPapa cpanel,这是说:
The www.hostpapa.ca page isn’t working
www.hostpapa.ca is currently unable to handle this request.
HTTP ERROR 500
我检查了错误日志,并看到在不同的日期/时间重复了此相同的错误:
[07-Jun-2016 14:30:26 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[07-Jun-2016 19:26:50 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[08-Jun-2016 08:45:14 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[08-Jun-2016 20:35:00 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
[08-Jun-2016 23:14:13 America/Toronto] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/saltn168/public_html/tripepic.com/tripepic-theme/List/tripepic-theme.php on line 1160
我检查了文件,第1160行是:
if(isset($r[2]) && @$r[2] == 'img' && preg_match('/MSIE [5-7]/',$_SERVER['HTTP_USER_AGENT']) == 0) {
对我来说这看起来像胡言乱语,所以我不确定该怎么做。昨天,我的搭档使我成为该网站的“ super 管理员”-不确定它是否可能与此相关?或为什么会这样。
如果有人能指出我正确的方向,我将非常感激。
谢谢
最佳答案
用户代理 header 是可选 header 。可能正在过滤某些内容(例如防火墙),或者人们可以将其客户端配置为忽略 header 。
您可能要检查 header 是否存在isset()
。
关于php - 无法访问cpanel,获取 “HTTP ERROR 500”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37728704/