Issue with cache Symfony2 - symfony

I have a problem when I make a change in symfony2 and when I refresh the page, the cache does not get regenerated. The log tells me the following:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' not found in /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache:2812\nStack trace:\n#0 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2769): Symfony\\Component\\HttpKernel\\Kernel->getContainerLoader(Object(Symfony\\Component\\DependencyInjection\\ContainerBuilder))\n#1 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2721): Symfony\\Component\\HttpKernel\\Kernel->buildContainer()\n#2 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2493): Symfony\\Component\\HttpKernel\\Kernel->initializeContainer()\n#3 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2531): Symfony\\Component\\HttpKernel\\Kernel->boot()\n#4 /var/www/vhosts/coosur.com/httpdocs/releases/840/web/app.php(18): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#5 {main}\n thrown in /var/www/vhosts/coo...', referer: https://www.XXXX.com/
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' not found in /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache:2812\nStack trace:\n#0 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2769): Symfony\\Component\\HttpKernel\\Kernel->getContainerLoader(Object(Symfony\\Component\\DependencyInjection\\ContainerBuilder))\n#1 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2721): Symfony\\Component\\HttpKernel\\Kernel->buildContainer()\n#2 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2493): Symfony\\Component\\HttpKernel\\Kernel->initializeContainer()\n#3 /var/www/vhosts/coosur.com/httpdocs/releases/840/app/bootstrap.php.cache(2531): Symfony\\Component\\HttpKernel\\Kernel->boot()\n#4 /var/www/vhosts/coosur.com/httpdocs/releases/840/web/app.php(18): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#5 {main}\n thrown in /var/www/vhosts/XXX...'
Besides, if I make a change and reload the page, the result is the next:
�Tf8utf8_general_ciPRIselect,insert,update,referencesNEVERvarchar(17),8�defpsalocalesactiveNOenumutf8utf8_general_ciselect,insert,update,referencesNEVERtrueenum('false','true')
Any idea?

Related

There has been a critical error on this website. Learn more about troubleshooting WordPress

Fatal error
: Uncaught Error: Call to undefined function wvs_get_wc_attribute_taxonomy() in /var/www/wp-content/themes/pharmacy2/inc/merlin/includes/class-wc-widget-layered-nav.php:329

How to fix WordPress kses error and fatal error handler

I'm new at making website. Even I only know Html Coding. I'm running a website using WordPress, but it is facing problem everyday at same time. Everyday at the same time site is showing Http 500 error.
So as I don't know any kind of coding, every day I have to delete WordPress from my site then again have to install it then I have to restore website using Updraftplus. But I want to fix this oroblem.
I have an option in my cPanel called "Errors". I find this error from there.
I copied what there was said:
1st error:
[Mon Dec 23 03:46:44.895719 2019] [lsapi:error] [pid 1014092:tid 47766993704704] [client 141.8.188.1:46957] [host gokumovie.com] Backend fatal error: PHP Fatal error: Uncaught Error: Call to undefined function esc_url() in /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php:190\nStack trace:\n#0 /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php(147): WP_Fatal_Error_Handler->display_default_error_template(Array, false)\n#1 /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php(52): WP_Fatal_Error_Handler->display_error_template(Array, false)\n#2 [internal function]: WP_Fatal_Error_Handler->handle()\n#3 {main}\n thrown in /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php on line 190\n
2nd error :
Backend fatal error: PHP Fatal error: Uncaught Error: Call to undefined function wp_kses_normalize_entities() in /home/gokumovi/public_html/wp-includes/formatting.php:4316\nStack trace:\n#0 /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php(190): esc_url('https://wordpre...')\n#1 /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php(147): WP_Fatal_Error_Handler->display_default_error_template(Array, false)\n#2 /home/gokumovi/public_html/wp-includes/class-wp-fatal-error-handler.php(52): WP_Fatal_Error_Handler->display_error_template(Array, false)\n#3 [internal function]: WP_Fatal_Error_Handler->handle()\n#4 {main}\n thrown in /home/gokumovi/public_html/wp-includes/formatting.php on line 4316\n

Symfony display exceptions in prod environment

In prod env when error occurured symfony displays a standard error page.
This is the standard default framework error page:
But when PDO can't connect to database symfony display this error to the client:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known' in /homepages/35/d619429344/htdocs/mcg/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /homepages/35/d619429344/htdocs/mcg/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=db63...', 'dbo632759072', 'mgm_mgm', Array) #1 ...
PDO exeptions:
I can't display this error to the client for security reason.
Any ideas on how to disable these messages and redirect to an error page like other error ?
You should have display_errors = off in your PHP.ini anyway to avoid this problem. Errors that reveal details like these come from many places, in addition to PDO.

ReflectionException in Symfony application

i deployed my symfony application on my server and it works fine in dev mode but in prod mode i have this error :
Fatal error: Uncaught exception 'ReflectionException' with message
'Class
Sharincook\MessagerieBundle\Entity\Sharincook\MessagerieBundle\Entity\Message
does not exist
and if i try to clean cache with putty i have this error :
syntax error, unexpected T_STRING, expecting
T_CONSTANT_ENCAPSED_STRING or '(' in ....app/console
so i don't have any ideas
thanks

Fatal error: Uncaught exception 'ReflectionException' with message 'Class Cl\CommonBundle\Entity\integer does not exist

I have developed application in symfony2.3, it's working perfect in development environment but while I move to production it throws error. I tried but it can't resolve.
Following all error comes form different page :
This error comes while I tried to access my home page.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class Cl\CommonBundle\Entity\integer does not exist' in /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php:795 Stack trace: #0 /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(795): ReflectionParameter->getClass() #1 [internal function]: Doctrine\Common\Proxy\ProxyGenerator->generateMethods(Object(Doctrine\ORM\Mapping\ClassMetadata)) #2 /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(276): call_user_func(Array, Object(Doctrine\ORM\Mapping\ClassMetadata)) #3 /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php(155): Doctrine\Common\Proxy\ProxyGenerator->generateProxyClass(Object(Doctrine\ORM\Mapping\ClassMetadata), '/opt/lampp/htdo...') #4 /opt/lampp/htdocs/Cl/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php(71 in /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php on line 51
When I clear cache of production environment in command line, it throws following exception :
[Doctrine\Common\Proxy\Exception\UnexpectedValueException]
The type hint of parameter "user" in method "setUser" in class "Cl\CommonBundle\Entity\GroupEventComment" is invalid.
[ReflectionException]
Class Collegelife\CommonBundle\Entity\integer does not exist
Once this has been solved then it throws to other class, so I can't understand that what's happen.
When I tried to login into page :
it shows me error like :
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/collegelife/app/cache/prod/doctrine/orm/Proxies/__CG__CollegelifeCommonBundleEntityUniversity.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/collegelife/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 207
I had the same question and resolved it.
Because My Entity's setting.
You can't type hint on a scalar type (integer/string/boolean etc) in PHP. e.g.
public function setSortOrder(\integer $sortOrder)
Should be:
public function setSortOrder($sortOrder)

Resources