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?
Related
I created a page for tests using easyphp, in easyphp the classes are loaded normally and everything works fine, but when sending the files to the hosting, the classes are no longer recognized for some reason I don't know... does anyone know how to help me?
Page: https://spetests.000webhostapp.com/gerar-qrcode-dinamico.php
Error: Fatal error: Uncaught Error: Class 'App\Pix\Api' not found in /storage/ssd4/870/19749870/public_html/gerar-qrcode-dinamico.php:12 Stack trace: #0 {main} thrown in /storage/ssd4/870/19749870/public_html/gerar-qrcode-dinamico.php on line 12
Files(from tutorial): https://github.com/william-costa/wdev-qrcode-pix-php
hi I'm using php/symfony ( symfony 1.0 ) and im getting following exception at the very first page
PHP Fatal error: Class 'sfContext' not found
I tried symfony cc at the root and its working but error is still there ,
may be its due to failure in autoloading files and following line from the code gives me the exception
$customerName = sfContext::getInstance()->getUser()->getAttribute('meta.customerName');
I'm assuming it might be a symfony exception
Sorry for the less information , actually I was installing a web based application and thats all printed in the log , anyhow I managed to find the fault with adding some var_dumps on the flow methods ,
missing php-mysqli extension caused the problem and unfortunately it's not handled from the application level so only a symfony level single line exception printed.
Here is the stack trace :
PHP Fatal error: Uncaught Error: Class 'sfContext' not found in /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php:171\nStack trace:\n#0 [internal function]: sfCore::splAutoload('sfContext')\n#1 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php(171): spl_autoload_call('sfContext')\n#2 [internal function]: sfCore::splAutoload('sfPhpConfigHand...')\n#3 /usr/local/rms/evt/uranai/cache/pc/prod/config/config_config_handlers.yml.php(7): spl_autoload_call('sfPhpConfigHand...')\n#4 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(279): require_once('/usr/local/rms/...')\n#5 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(60): sfConfigCache->loadConfigHandlers()\n#6 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(190): sfConfigCache->callHandler('config/settings...', Array, '/usr/local/rms/...')\n#7 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/symfony.php(87): sfConfigCache->checkConfig('config/settings...')\n#8 /usr/local/rms/evt in /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php on line 171
When I try to run zend program its shows error as follows
PHP Fatal error: Uncaught exception
'Zend\ModuleManager\Listener\Exception\RuntimeException' with message
'Could not find a valid ServiceManager for RoutePluginManager' in
/Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php:202
Stack trace:
#0 /Documents/zf2-example-login/vendor/zendframework/zend-eventmanager/src/EventManager.php(271):
Zend\ModuleManager\Listener\ServiceListener-onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))
#1 /Documents/zf2-example-login/vendor/zendframework/zend-eventmanager/src/EventManager.php(143):
Zend\EventManager\EventManager-triggerListeners(Object(Zend\ModuleManager\ModuleEvent))
#2 /Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/ModuleManager.php(129):
Zend\EventManager\EventManager-triggerEvent(Object(Zend\ModuleManager\ModuleEvent))
#3 /Documents/zf2-example-login/vendor/zendframework/zend-mvc/src/Application.php(264): Zend\ModuleManager\ModuleManager-> in
/Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php
on line 202
I'm newbie to zend, I tried googling but unable to find the solution.Help me.
Found a clue here:
https://github.com/zendframework/zend-modulemanager/issues/42
You first need to check to see if you have ZF3 installed. One quick way to check is to look under "vendor/zendframework" and see if you have a subdirectory "zend-router".
If so, add this to your application.config.php file under the "modules" key:
'Zend\Router'
We used "cPanel API2" library to create park domain in our server and it was working fine until last cPanel up-gradation.
We created file mytest.live.php on server to create a object of "CPANEL class" for troubleshooting the issue, but unfortunately it returns error as below.
<?php
require_once "/usr/local/cpanel/php/cpanel.php";
$cpanel = new CPANEL(); ?>
And Output Returns:
Fatal error: Uncaught exception 'RuntimeException' with message 'There was a problem fetching the env variablecontaining the path to the socket' in /usr/local/cpanel/php/cpanel.php:146 Stack trace: #0 /home/cityusa/public_html/mytest.live.php(4): CPANEL->__construct() #1 {main} thrown in /usr/local/cpanel/php/cpanel.php on line 146
So please help for resolve this issue.
You should try naming your file as ".live.php" or ".livephp". That worked for me.
I am elbows deep in Laravel 5 and it's proving to be quite the bugger with the lack of autoloading. I am running into the weirdest of errors. I can't Log anything on my localhost. If it's a PHP error, it logs just fine, but if I try to write to the log, it throws an error. It's a Windows so no File Permission errors. Here's the error I get:
[2015-02-11 20:09:40] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'App\Http\Controllers\Log' not found' in C:\xampp\htdocs\bg_checks\laravel\app\Http\Controllers\BgInfoController.php:44
Stack trace:
#0 C:\xampp\htdocs\bg_checks\laravel\storage\framework\compiled.php(1721): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalExceptionFromError(Array)
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
Laravel 5 is still pretty new so there's not a lot of info on it. I've tried to find something and can only find a forum on Laracast's forum and nothing they suggested worked.
Help!
I don't think you have a Log class file in App\Http\Controllers directory. So you must add
use Log;
if you are using Laravel's logger, or
use Path\To\Your\Log;
for a custom logger.