Host doesn't recognize my psr-4 class on composer - php

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

Related

Fatal error: Uncaught Error: Call to undefined function wp() in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php:16 Stack trace:

Fatal error: Uncaught Error: Call to undefined function wp() in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php:16 Stack trace: #0 /home/customer/www/monkinsider.com/public_html/index.php(17): require() #1 {main} thrown in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php on line 16
I don't know but since last week I am getting this error. My site is hosted on siteground and there are no updates from my side. Also, when I contacted them they said its Wordpress issue and they cant help. I tried to restore backup but only it works for 5 minutes after that error shows up again. Also, I referred to previous articles and everything seems fine the file wp-config and all. Also,I cannot even open my admin Wordpress panel.
That's a malware.
You should scan your server and restore wp-blog-header.php with a default one.
You can download a fresh version here: https://wordpress.org/download/releases/
You won't be able to restore the account until the malware is deleted
I had the same issue. In my case wp-load.php was empty for some reasons, not sure what caused it. I copied the files content from a different website and it fixed the issue.

error class not found Slim subfolder

I'm putting my website on server but I have some issues to do so.
Indeed, I made it the simpliest way I know, I only copy-paste my files to my server.
I developed my website in php with Slim. It work perfectly locally, but not on the OVH server (mutualised Pro version).
It throw this error :
Fatal error: Uncaught Error: Class
'App\Middleware\ValidationErrorsMiddleware' not found in
/home/username/www/jobs/bootstrap/app.php:154 Stack trace: #0
/home/username/www/jobs/public/index.php(9): require() #1 {main} thrown
in /home/username/www/jobs/bootstrap/app.php on line 154
I'm not sure, but maybe it's because I placed it in a subfolder.
If somebody have a solution :)
Thank you in advance and sorry for the inconvenience, I'm nearly sure that it's due to a stupid mistake I made.

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?

PHP Fatal error: Class 'sfContext' not found

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

cpanel php class not creating object

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.

Categories