M
M
Maxim2016-09-10 15:56:51
PHP
Maxim, 2016-09-10 15:56:51

How to make json work?

In general, I have a machine with Ubuntu server 16.04, nginx + php 7.0 + php-json of the latest version, the extension is enabled in the configs, the admin panel on the site shows that everything is working, but when I receive requests, I get errors like:
PHP Fatal error: Uncaught RuntimeException: PHP's json extension is required to use Monolog's NormalizerFormatter in /var/www/html/marcusmebel.ru/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:34
Stack trace:
#0 /var/www/html/marcusmebel. en/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php(42): Monolog\Formatter\NormalizerFormatter->__construct(NULL)
#1 /var/www/html/marcusmebel.ru/vendor/monolog/monolog /src/Monolog/Handler/AbstractHandler.php(184): Monolog\Formatter\LineFormatter->__construct()
#2 /var/www/html/marcusmebel.ru/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(112): Monolog\Handler\AbstractHandler->getDefaultFormatter()
#3 /var/www/html /marcusmebel.ru/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(35): Monolog\Handler\AbstractHandler->getFormatter()
#4 /var/www/html/marcusmebel.ru/vendor/monolog /monolog/src/Monolog/Logger.php(336): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#5 /var/www/html/marcusmebel.ru/vendor/monolog/mon in /var/www/html /marcusmebel.ru/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php on line 34
if anyone can tell me how to fix it I will be very grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-09-11
@MiF36rus

console puff and puff for the site have different configs.
execute in consolephp --ini

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question