我有基于symfony框架的网站,但在开发环境我有随机崩溃,例外:(有坏字符)
Warning: class_implements(): Class
���� does not exist and Could not be loaded
要么
Warning: class_implements(): Class H�d
���� does not exist and Could not be loaded
要么
ContextErrorException in DebugClassLoader.PHP line 203:
Warning: class_implements(): Class multipart/form-data does not exist and Could not be loaded
(PHP不使用symfony表单,请求是GET)
要么
OutOfMemoryException in DebugClassLoader.PHP line 203:
Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1141972672 bytes)
(内存限制设置为128MB,但需要大约6MB)
所有这些不同的异常都被抛在一个具有相同参数的URL上(用于测试目的),因此它们随机抛出整个Web.
这个错误不仅仅是生产环境的发展.
使用XAMPP / apache在Windows 7机器上开发环境.
如果我重新启动apache并按F5一切正常,网络正常工作.
我试图清除所有缓存但没有成功.
有任何想法吗?
编辑:
激活OPCache后问题仍然存在……
如果我从CLI运行命令PHP bin / symfony_requirements
> PHP is using the following PHP.ini file: C:\xampp7.0.9\PHP\PHP.ini > Checking Symfony requirements: ...........................WW....... [OK] Your system is ready to run Symfony projects Optional recommendations to improve your setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * intl extension should be available > Install and enable the intl extension (used for validators). * a PHP accelerator should be installed > Install and/or enable a PHP accelerator (highly recommended). Note The command console Could use a different PHP.ini file ~~~~ than the one used with your web server. To be on the safe side, please check the requirements from your web server using the web/config.PHP script.
解决方法:
我遇到了同样的问题“警告:class_implements():类 不存在且无法加载”