CakePHP - GoDaddy共享主机 - HTTP错误500

时间:2016-12-01 11:57:34

标签: apache .htaccess cakephp mod-rewrite

我有以下.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 ERROR 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

1 个答案:

答案 0 :(得分:1)

您的网站位于:

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

但是,CakePHP正在尝试加载:

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

您必须在配置中的某处硬编码错误的路径。