Error 500 laravel after install - php

I installed LAMP on centos7 with php 7.
Then I installed Laravel using composer but I get error 500 in the browser and the following error in apache:
PHP Fatal error: Uncaught RuntimeException: PHP's json extension is required to use Monolog's NormalizerFormatter in /var/www/html/blog/vendor/monolog/monolog/src/Mon$PHP
Fatal error: Uncaught RuntimeException: PHP's json extension is required to use Monolog's NormalizerFormatter in /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:34
Stack trace:\n#0 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php(42): Monolog\Formatter\\NormalizerFormatter->__construct(NULL)
#1 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(184): Monolog\\Formatter\LineFormatter->__construct()
#2 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(112): Monolog\\Handler\\AbstractHandler->getDefaultFormatter()
#3 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(35): Monolog\\Handler\\AbstractHandler->getFormatter()
#4 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)
#5 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\\Logger->addRecord(400, Objec in /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php on line 34
Can anybody please point me to the right direction?

Laravel 5.3, 5.2, 5.1 ,5.0 and lower are not supported yet by PHP 7.
Hope newer version will support the php 7

Related

PHPOffice: PHP Fatal error: Interface 'Psr\SimpleCache\CacheInterface' not found

I have custom WordPress plugin where I giving option for admins to download export of survey. The plugin using package phpoffice
I have test hosting with PHP 7.3 where export goes well and the production hosting is on PHP 7.3.3 (before it was PHP 7.4) where the exactly same problem does not work.
I'm expecting to resolve this error and make the option for download exports working..
I've tried searching for google but I didn't find solution exactly for my problem.
I tried this stuffs:
Upgrade memory_limit from 256MB to 512MB
Tried to downgrade production hosting PHP version from 7.4 to 7.3.3
When production hosting PHP version was 7.4 it gived this error in PHP error log:
[22-Dec-2022 08:45:24 UTC] PHP Fatal error: Uncaught Error: Interface 'Psr\SimpleCache\CacheInterface' not found in /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Memory.php:14
Stack trace:
#0 /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/composer/ClassLoader.php(571): include()
#1 /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/www/doc/www.di...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('PhpOffice\\PhpSp...')
#3 /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php(164): spl_autoload_call('PhpOffice\\PhpSp...')
#4 /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/CellsFactory.php(19): PhpOffice\PhpSpreadsheet\Settings::getCache()
#5 /www/doc/www.digitalniagora.cz/www/wp-content/ in /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Memory.php on line 14
After I downgraded the PHP version to 7.3.3 (because I haven't option to downgrade to PHP 7.3) I getting just this error:
[27-Dec-2022 15:43:23 UTC] PHP Fatal error: Interface 'Psr\SimpleCache\CacheInterface' not found in /www/doc/www.digitalniagora.cz/www/wp-content/plugins/agora_survey/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Memory.php on line 14
EDIT 29.12.2022:
I tried update PHP version on test hosting to the same version as production hosting is but on test version it working well and production version code does not work.
But the code is exactly same as on test hosting where everything works well and also the code is exactly same after downgrade PHP version..
Can anybody give me some hints to find the solution?

PHP fatal error uncaught exception after installing magento2

I have installed magento2 in my linux centos7. After installing magento2 successfully while accessing the web page is getting following error with empty content.
{{menuState.title}}
PHP version:7.1.3
OS: centos7
And the PHP-fpm error log has following error.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Zend_Controller_Plugin_Abstract::setResponse() must be an instance of Zend_Controller_Response_Abstract, instance of Magento\Framework\HTTP\PhpEnvironment\Response given, called in /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php on line 61 and defined in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Controller/Plugin/Abstract.php:70
Stack trace:
#0 /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php(61): Zend_Controller_Plugin_Abstract->setResponse(Object(Magento\Framework\HTTP\PhpEnvironment\Response))
#1 /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard.php(195): Magento\Framework\Profiler\Driver\Standard\Output\Firebug->display(Object(Magento\Framework\Profiler\Driver\Standard\Stat))
#2 [internal function]: Magento\Framework\Profiler\Driver\Standard->display()
#3 {main}
thrown in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Controller/Plugin/Abstract.php on line 70
How can I resolve this error?
This was a Magento Bug reported ...
But it's already been ...
https://github.com/magento/magento2/issues/7068
So, come on ...
Did you update the magento? What is the current version?
I found this information at the base of Magento: https://devdocs.magento.com/guides/v2.3/config-guide/bootstrap/mage-profiler.html
You have this option ...
The temporary fix is install symfony / yaml from dev branch and then our module:
              composer require symfony/yaml: dev-issue-814
    
          composer require mirasvit/module-profiler
Try using / installing php7.2
See this Magento Project reference >>>
https://magento.stackexchange.com/questions/49000/magento-2-is-there-a-profiler
Be sure to back up before the above procedures ...
Since I don't know the correct version of your current Magento, I looked for alternatives to fix.
I hope it helps you ...
Good luck! Send news about your progress ...

Lumen 5.3 & PHP 7: Symfony Error ExceptionHandler

We have a project that uses Lumen 5.3, however when we always install PHP7 on the server it gives this error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ExceptionHandler::handle() must be an instance of Exception, instance of Error given in /var/www/retail-api/vendor/symfony/symfony/src/Symfony/Component/Debug/Excepti
onHandler.php:105
Stack trace:
#0 [internal function]: Symfony\Component\Debug\ExceptionHandler->handle(Object(Error))
#1 {main}
thrown
When we revert it back to PHP5.6 it works. Based on my research this was supposed to be fixed in Symfony > 2.6 is this correct? If so why is this happening on our environment. Most of our Laravel projects are already using PHP7. This, however is an exception, is there something that I am missing?

Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:

I use Ubuntu 16.04 LTS
PHP 7.0.13
NetBean
I try to run some actions linked with composer in the NetBeans environment
I had these logs
"/usr/local/ampps/php-7.0/bin/php" "/home/arfa/www/composer.phar" "--ansi" "--no-interaction" "self-update"
Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///home/arfa/www/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:520
Stack trace:
#0 phar:///home/arfa/www/composer.phar/vendor/symfony/polyfill-mbstring/bootstrap.php(46): Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth(' [Composer\\Exc...', 'ASCII')
#1 phar:///home/arfa/www/composer.phar/vendor/symfony/console/Application.php(1106): mb_strwidth(' [Composer\\Exc...', 'ASCII')
#2 phar:///home/arfa/www/composer.phar/vendor/symfony/console/Application.php(650): Symfony\Component\Console\Application->stringWidth(' [Composer\\Exc...')
#3 phar:///home/arfa/www/composer.phar/vendor/symfony/console/Application.php(131): Symfony\Component\Console\Application->renderException(Object(Composer\Exception\NoSslException), Object(Symfony\Component\Console\Output\StreamOutput))
#4 phar:///home/arfa/www/composer.phar/src/Composer/Console/Application.php(100): Symfony\Component\Console\Application->run(Object(Symfony\Component\ in phar:///home/arfa/www/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 520
Done.
The issue is linked to my project, symfony, settings.
Do you have the iconv extension enabled?
Please post the reply of this command:
php -i | grep -i "iconv support"
Or, search your php.ini file for "extension=iconv.so", if it's commented out, uncomment it and make sure you restart Apache.
If that fails, try installing the composer package:
composer require symfony/polyfill-iconv

Fatal error: Uncaught Error: Class 'mysqli' not found -- IIS- Windows 7

I got this error whenever I open my project. This project can run on my other laptop which is using XAMPP.
I want to use IIS 6.0 on my Windows 7 Pro.
I already installed IIS, Setting environment variable, remove semicolon on my php.ini-development, add handler. So confusing and still not get the right answer.
Fatal error: Uncaught Error: Class 'mysqli' not found in C:\inetpub\wwwroot\SIA-2\general\function.php:8 Stack trace: #0 C:\inetpub\wwwroot\SIA-2\general\initial.php(10): open_connection() #1 C:\inetpub\wwwroot\SIA-2\index.php(41): include_once('C:\inetpub\wwwr...') #2 {main} thrown in C:\inetpub\wwwroot\SIA-2\general\function.php on line 8
https://drive.google.com/folderview?id=0B66OIQlx1mwzc0JVbVhjX0U0aDQ&usp=sharing
please do not give me any documentation. i'm sick of it. thank you.

Categories