Uncaught exception 'ReflectionException' with message 'xx\xxxx\xxx does not exist' in - php

So I was using silex and was refering to documentation.
So when I tried to implement the SecurityServiceProvider I encountered this message.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class Symfony\Component\Security\Http\Firewall\ContextListener does not exist' in
This got me pulling my hairs long enough to come and post here, on SO.

This error is mainly generated because of, the dependency not being required.
In simple language, the code for this function "doesn't exist" in your code base, so you have to run the composer command to require the respective package, once composer downloads and installs the needed files you should be good to go.
So in my case I had to run the following composer command.
composer require symfony/security

Related

Laravel: Interface 'Psr\Http\Message\UriInterface' not found

I am facing this error when trying to call a function that connects to an api.
The full error is:
Symfony\Component\Debug\Exception\FatalErrorException: Interface 'Psr\Http\Message\UriInterface' not found in /path/to/project/vendor/guzzlehttp/psr7/src/Uri.php:13
Cannot find much help on forums.
EDIT
Actually this is all the error I get, see this screenshot:
Even in the logs that are generated in /storage/logs, I only get this message:
[2017-06-08 03:03:35] local.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Interface 'Psr\Http\Message\UriInterface' not found in /path/to/project/vendor/guzzlehttp/psr7/src/Uri.php:13
Stack trace:
#0 {main}
Is your composer version up to date? Have you tried composer dump-autoload -o?

Fatal error while executing cron job in Google AppEngine

I want to execute a cron job in GAE but i got this error.I want to use app engine services without logging in to my email.
PHP Fatal error: Uncaught exception 'Google_AuthException' with message 'Could not json decode the token' in /base/data/home/apps/s~gcdc2013-cloud-daybook/1.371004284914522718/google-api-php-client/src/auth/Google_OAuth2.php:162
Stack trace:
#0 /base/data/home/apps/s~gcdc2013-cloud-daybook/1.371004284914522718/google-api-php-client/src/Google_Client.php(170): Google_OAuth2->setAccessToken(NULL)
Does it work when you're not running it from cron?
It looks like your either missing the service account key, or you're not loading it properly.

cakephp error Uncaught exception 'LogicException'

I'm new to cakePHP and I've been having real difficulty getting it working on my free aws account. I first tried setting up LAMP on my own, but gave up and am now trying to use the bitnami LAMP stack:
https://aws.amazon.com/amis/bitnami-lapp-stack-5-4-13-1-64-bit-ubuntu-12-04
Anyways, that seemed to work, and I was following the cakePHP Blogs tutorial:
http://book.cakephp.org/2.0/en/getting-started.html
I got the mySQL database and tables all set up, and just to test I went to the cakePHP dir:
http://[my amazon instance].compute-1.amazonaws.com/cakephp/
Page loads up with no problems.
But if I reload that page, I get an error:
PHP Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify an existing static method (class 'App' does not have a method 'load')' in /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php:133\nStack trace:\n#0 /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php(133): spl_autoload_register(Array)\n#1 /opt/bitnami/frameworks/cakephp/app/webroot/index.php(77): include('/opt/bitnami/fr...')\n#2 {main}\n thrown in /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php on line 133
At that point, nothing to do but restart apache. Once again the page shows up one time, then reload and it errors as above.
Halp!

Laravel 4 ReflectionException error

exception 'ReflectionException' with message
Class Chrono\Services\Controllers\Frontend\KeywordController does not exist
in /home/legal/vendor/laravel/framework/src/Illuminate/Container/Container.php:296
I am installing a site on liquidweb.com and I am getting the above error.
Has anyone ever gotten this error before?
Don't forget to php composer dump-autoload
It seems that Laravel can't find this class, and won't initialize it.

Fatal error: Uncaught exception 'PDFlibException' with message 'Couldn't find encoding 'cp936'

I encounter this problem
Fatal error: Uncaught exception 'PDFlibException' with message 'Couldn't find encoding 'cp936'...
It gives this error when running on the computer that localization is (Chinese RPC), but localization (English) it works fine.
I am using dompdf plugin.
Anyone has idea on how to solve this problem? thanks
The font you're trying to use isn't installed on the server, or it doesn't support the extended character set.
Also, for PDF generation, I recommend TCPDF. I'm not sure about CI integration though.

Categories