Symfony随机崩溃 - DebugClassLoader.php

时间:2017-05-09 10:56:43

标签: php apache symfony caching

我有基于symfony框架的网站,但在开发环境时,我有随机崩溃,例外:(有坏字符)

  

警告:class_implements():Class    ����不存在且无法加载

  

警告:class_implements():ClassH�d    ����不存在且无法加载

  

DebugClassLoader.php第203行中的ContextErrorException:
警告:class_implements():类multipart / form-data不存在且无法加载

(php不使用symfony表单,请求是GET)

  

DebugClassLoader.php第203行中的OutOfMemoryException:
错误:允许的内存大小为134217728字节耗尽(尝试分配1141972672字节)

(内存限制设置为128MB,但需要大约6MB)

所有这些不同的异常都被抛到一个具有相同参数的URL上(用于测试目的),因此它们会随机抛出整个网络。

这个错误不在生产环境只能开发

使用XAMPP / apache在Windows 7机器上开发环境。

如果我重新启动apache并按F5,一切正常,网络正常工作。

我正在尝试清除所有缓存,但没有成功。

有什么想法吗?

编辑:

激活OPCache 后,问题仍然存在......

我在symfony调试栏中的配置: enter image description here

如果我从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.

1 个答案:

答案 0 :(得分:5)

我遇到了同样的问题“警告:class_implements():类 不存在且无法加载”

我在php.ini中增加了realpath_cache_size,现在apache正常工作,没有错误。