2

I've just run an update for my CakePHP version (3.1.7). And now I'm unable to run my app, with a fatal error :

Fatal error: Class 'DateTimeImmutable' not found in /opt/lampp/htdocs/my-app/vendor/cakephp/chronos/src/Chronos.php on line 50

I found this issue on Github, where I noticed that

DateTimeImmutable was not present in 5.4

So I install PHP5.6.20 on my PC, but after restarting Xampp, I still get the same error. How can I fix this ?

sk001
  • 561
  • 6
  • 27

2 Answers2

3

PHP's installation on the PC is not related to Xampp. So installing PHP doesn't solve the problem. But installing a new version of Xampp with PHP 5.6.

sk001
  • 561
  • 6
  • 27
1

It's a PHP Version Problem make sure You're using PHP > 5.5v