1
votes

During symfony install with

symfony new my_project 3.4

I have this error:

PHP Notice: Use of undefined constant JSON_ERROR_DEPTH - assumed 'JSON_ERROR_DEPTH' in phar:///usr/local/bin/symfony/vendor/guzzlehttp/guzzle/src/Utils.php on line 140 PHP Notice: Use of undefined constant JSON_ERROR_STATE_MISMATCH - assumed 'JSON_ERROR_STATE_MISMATCH' in phar:///usr/local/bin/symfony/vendor/guzzlehttp/guzzle/src/Utils.php on line 140 PHP Notice: Use of undefined constant JSON_ERROR_CTRL_CHAR - assumed 'JSON_ERROR_CTRL_CHAR' in phar:///usr/local/bin/symfony/vendor/guzzlehttp/guzzle/src/Utils.php on line 140 PHP Notice: Use of undefined constant JSON_ERROR_SYNTAX - assumed 'JSON_ERROR_SYNTAX' in phar:///usr/local/bin/symfony/vendor/guzzlehttp/guzzle/src/Utils.php on line 140 PHP Notice: Use of undefined constant JSON_ERROR_UTF8 - assumed 'JSON_ERROR_UTF8' in phar:///usr/local/bin/symfony/vendor/guzzlehttp/guzzle/src/Utils.php on line 140 PHP Fatal error: Call to undefined function json_decode() in phar:///usr/local/bin/symfony/vendor/guzzlehttp/guzzle/src/Utils.php on line 142

My PHP is:

PHP 5.6.30-10+deb.sury.org~trusty+2 (cli) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Do you know how to help me?

1
Just a guess but maybe the json extension is not installed for some strange reason. - Cerad
as a note: if you are using multiple php version user php5.6-json if not php-json as php extension name when you want install it. - Mehmet Soylu
i have installed php5.6-json, restart pc but same error remain. I'm doing not in a server but on my pc, that can be a problem? I presume not. - NicolaPez

1 Answers

0
votes

Try php -m in a terminal to see if php5.6-json is correctly loaded

Then php --ri json | grep version if you want to check the module version