【问题标题】:CakePHP ErrorHandler errorCakePHP ErrorHandler 错误
【发布时间】:2016-02-14 17:53:07
【问题描述】:

我将 cakePhp 应用程序更改为其他服务器,当我在浏览器中打开应用程序时,设置了 500 错误。

这在日志文件中

[Sun Feb 14 13:21:03.163058 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(/var/www/html/orangescrum/lib/Cake/Error/ErrorHandler.php): failed to open stream: No such file or directory in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.163643 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(): Failed opening '/var/www/html/orangescrum/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.164255 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  set_error_handler() expects the argument (ErrorHandler::handleError) to be a valid callback in /var/www/html/scrum/lib/Cake/Core/Configure.php on line 441
[Sun Feb 14 13:21:03.165066 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(/var/www/html/orangescrum/lib/Cake/Error/ErrorHandler.php): failed to open stream: No such file or directory in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.165575 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(): Failed opening '/var/www/html/orangescrum/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.168452 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  set_exception_handler() expects the argument (ErrorHandler::handleException) to be a valid callback in /var/www/html/scrum/lib/Cake/Core/Configure.php on line 444
[Sun Feb 14 13:21:03.169506 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(/var/www/html/orangescrum/lib/Cake/Log/CakeLog.php): failed to open stream: No such file or directory in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.169994 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(): Failed opening '/var/www/html/orangescrum/lib/Cake/Log/CakeLog.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.170466 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Fatal error:  Class 'CakeLog' not found in /var/www/html/scrum/app/Config/bootstrap.php on line 184
[Sun Feb 14 13:21:03.171738 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(/var/www/html/orangescrum/lib/Cake/Error/ErrorHandler.php): failed to open stream: No such file or directory in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.172466 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Warning:  include(): Failed opening '/var/www/html/orangescrum/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/scrum/lib/Cake/Core/App.php on line 545
[Sun Feb 14 13:21:03.172844 2016] [:error] [pid 29544] [client 201.242.221.40:28717] PHP Fatal error:  Class 'ErrorHandler' not found in /var/www/html/scrum/lib/Cake/Core/App.php on line 916

实际文件夹是scrum,应用程序调用文件夹orangescrum中的库。

知道在哪里可以更改文件夹的名称吗?

谢谢。

【问题讨论】:

  • 您是否也更改了登录名和密码以连接到您的数据库?如果不尝试这样做,它将解决问题

标签: php cakephp


【解决方案1】:

您可以在 /var/www/html/scrum/lib/Cake/Core/App.php 中找到该文件

消息告诉我们,文件丢失了


无法打开流:第 545 行的 /var/www/html/scrum/lib/Cake/Core/App.php 中没有这样的文件或目录

【讨论】:

    【解决方案2】:

    检查app/webroot/index.php(和test.php)文件中的CAKE_CORE_INCLUDE_PATH 常量,烘焙时它可能会被硬编码的环境特定路径覆盖。

    https://github.com/cakephp/cakephp/blob/2.8.0/app/webroot/index.php#L60

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-11-18
      • 1970-01-01
      • 2018-12-18
      • 2020-06-09
      • 2021-08-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多