0

I just installed xampp with php 7.0.4 and a fresh cakephp 3.2.6. I did a lot of research and everything I found shows that they are compatible.

However as soon as I go to open the application with a browser, cake replies with an Internal Error.

The only pointer as to what to do is that xampp logs the following in apache error.log:

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Cake\Error\BaseErrorHandler::handleException() must be an instance of Exception, instance of Error given in D:\Xampp\htdocs\cakephp\vendor\cakephp\cakephp\src\Error\BaseErrorHandler.php:153
Stack trace:
#0 [internal function]: Cake\Error\BaseErrorHandler->handleException(Object(Error))
#1 {main} thrown in D:\Xampp\htdocs\cakephp\vendor\cakephp\cakephp\src\Error\BaseErrorHandler.php on line 153

I tried php 5.6 but it still shows the error in the log.

1
  • Try redownloading. I'm not having that problem anymore, look at the comments below.
    – expora
    Apr 3, 2016 at 23:16

1 Answer 1

2

If that's the error that you are encountering, then I'd doubt that you are using CakePHP 3.2.6, as line 153 is in the middle of a comment

https://github.com/cakephp/cakephp/blob/3.2.6/src/Error/BaseErrorHandler.php#L153

PHP7 errors are handled since CakePHP 3.1.5, so check your CakePHP dependency, and make sure it's actually up to date.

5
  • I'm getting the same error with PHP 7.0.5 (my own build). I downloaded the file cakephp-3-2-6.zip from the releases page. Line 153 points to handleException function signature.
    – expora
    Apr 3, 2016 at 10:05
  • No problems through the composer method, though. I compared the files with diff and are not the same.
    – expora
    Apr 3, 2016 at 10:21
  • 1
    @expora There seems to be something wrong with the package, it actually contains version 3.0.18
    – ndm
    Apr 3, 2016 at 13:00
  • 1
    Jep, the package has been fixed github.com/cakephp/cakephp/issues/8585 @expora
    – ndm
    Apr 4, 2016 at 0:18
  • Thanks a lot everyone. Turns the files on the cakephp site were actually an older version as @ndm said. After downloading from github everything worked Apr 4, 2016 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.