Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony randomly crash - DebugClassLoader.php

I have site based on symfony framework but on develop enviroment i have random crashes with exception: (with bad characters)

Warning: class_implements(): Class ���� does not exist and could not be loaded

or

Warning: class_implements(): Class H�d ���� does not exist and could not be loaded

or

ContextErrorException in DebugClassLoader.php line 203:
Warning: class_implements(): Class multipart/form-data does not exist and could not be loaded

(php is not using symfony forms and request is GET)

or

OutOfMemoryException in DebugClassLoader.php line 203:
Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1141972672 bytes)

(Memory limit is set on 128MB but for request is needed approximately 6MB)

All this different exceptions was thrown on one url with same parameter (for the testing purpose) so they are throwing randomly through whole web.

This bugs aren't on production enviroment only develop.

Develop enviroment is on windows 7 machine with XAMPP/apache.

If i restrat apache and press F5 everything is ok and web working ok.

I was trying clear all caches but without success.

Any ideas?

EDIT:


After activate OPCache the problem persists...

My config from symfony debug bar: enter image description here

If i run command php bin/symfony_requirements from CLI

> 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.

like image 594
Lajdák Marek Avatar asked May 09 '17 10:05

Lajdák Marek


1 Answers

I had the same problem with "Warning: class_implements(): Class ���� does not exist and could not be loaded"

I increased realpath_cache_size in php.ini and now apache works, no errors.

like image 89
YazidPL Avatar answered Nov 12 '22 14:11

YazidPL