【问题标题】:CakePHP - GoDaddy Shared hosting - HTTP ERROR 500CakePHP - GoDaddy 共享主机 - HTTP 错误 500
【发布时间】:2017-04-16 01:25:08
【问题描述】:

我有以下.htaccess 配置

####### In the root directory
<IfModule mod_rewrite.c> 
   RewriteEngine on 
   RewriteBase / 
   RewriteRule    ^$ app/webroot/    [L] 
   RewriteRule    (.*) app/webroot/$1 [L] 

</IfModule> 


####### In the app directory
<IfModule mod_rewrite.c> 
    RewriteEngine on 
    RewriteBase / 
    RewriteRule    ^$    webroot/    [L] 
    RewriteRule    (.*) webroot/$1    [L] 
 </IfModule>


###### In the webroot
<IfModule mod_rewrite.c> 
  RewriteEngine On 
  RewriteBase / 
  RewriteCond %{REQUEST_FILENAME} !-d 
  RewriteCond %{REQUEST_FILENAME} !-f 
  RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]  
</IfModule> 

我收到以下错误

HTTP 错误 500

来自GoDaddy的错误日志

[Thu Dec 01 05:33:59.885650 2016] [fcgid:warn] [pid 149973:tid 140591985846016] [client 85.17.24.76:43828] mod_fcgid: stderr: PHP Fatal error:  Class 'ErrorHandler' not found in /home/mink7/public_html/sites/prayag.mink7.com/lib/Cake/Core/App.php on line 918
[Thu Dec 01 05:33:59.885627 2016] [fcgid:warn] [pid 149973:tid 140591985846016] [client 85.17.24.76:43828] mod_fcgid: stderr: PHP Warning:  include(): Failed opening '/var/www/clients/client1/web2/web/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='/home/mink7/public_html/sites/prayag.mink7.com/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/mink7/public_html/sites/prayag.mink7.com/lib/Cake/Core/App.php on line 547
[Thu Dec 01 05:33:59.878469 2016] [fcgid:warn] [pid 149973:tid 140591985846016] [client 85.17.24.76:43828] mod_fcgid: stderr: PHP Warning:  include(/var/www/clients/client1/web2/web/lib/Cake/Error/ErrorHandler.php): failed to open stream: No such file or directory in /home/mink7/public_html/sites/prayag.mink7.com/lib/Cake/Core/App.php on line 547

【问题讨论】:

  • 这意味着您必须检查错误日志以查看问题所在。在共享主机中,您通常在控制面板中有一个工具。
  • @ÁlvaroGonzález 错误日志中没有任何内容
  • GoDaddy 提供哪些错误日志? Apache、PHP 还是两者兼而有之?
  • @ÁlvaroGonzález 是的 :( 任何我可以开始寻找的地方?如果它抛出任何错误会更容易
  • 恐怕我只能建议您自己可能已经想到的:一次尝试一件事,看看它什么时候开始 500ing。对不起。

标签: apache .htaccess cakephp mod-rewrite


【解决方案1】:

您的网站托管在:

/home/mink7/public_html/sites/prayag.mink7.com

但是,CakePHP 正在尝试在以下位置加载内容:

/var/www/clients/client1/web2/web

您一定是在配置中的某处硬编码了错误的路径。

【讨论】:

  • 该死!!这是以前托管的缓存文件:(
猜你喜欢
  • 1970-01-01
  • 2018-02-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-12-27
  • 2018-05-26
  • 2021-10-18
相关资源
最近更新 更多