I've faced very strange behavior of Laravel 5.3 on PHP7/Apache (Windows).
My application is working perfect for several hours, but in unpredictable moment site crashes with errors like:
- Symfony\Component\Debug\Exception\FatalThrowableError: Call to
undefined method DateTime::format() in
C:\site\telemed\bootstrap\cache\compiled.php:14049
- Symfony\Component\Debug\Exception\FatalThrowableError: Call to
undefined method Carbon\Carbon::modify() in
C:\site\telemed\vendor\nesbot\carbon\src\Carbon\Carbon.php:1806
- and so on...
Also found in Apache Error Log:
- Cannot make non static method DateTime::b\x10Y7I\xc0\xf1\xbdff() static in class DateTime
It looks like PHP forgets about some part of system code... Carbon stops working even in Monolog.
After Apache restart things get normal. Or sometimes it can get normal without any actions after ~30mins.
Any ideas what is happening?
Thank you in advance!
UPDATE:
After composer update and php upgrade to latest 7.1 things get even more weird of 4 hours of normal work:
Symfony\Component\Debug\Exception\FatalErrorException: Allowed memory size of 838860800 bytes exhausted (tried to allocate 8083526415852724616 bytes) in C:\site\telemed\vendor\nesbot\carbon\src\Carbon\Carbon.php:1112 Stack trace: #0 {main}