Error running Laravel on a hosting

0

When loading Laravel in a shared hosting and the project within a subdirectory the following error started to appear:

  

PHP's json extension is required to use Monolog's NormalizerFormatter

I currently use version 5.6 of Laravel and within the server modify the version of PHP to 7.2 .

    
asked by Juan Mellado J. 08.04.2018 в 19:17
source

2 answers

0

If it's a shared hosting, I do not think you have package installation privileges like that, so you should probably contact them to install or enable the php-json extension.

For future visitors of this question, depending on the Linux distribution, you can use:

Centos

sudo yum install php72-php-json 

Ubuntu

sudo apt-get install php7.0-json
    
answered by 08.04.2018 в 21:08
0

You have to enable the extension for json as a php module. This may not be available to be a shared hosting and the solution may vary depending on the company you use and the panel you have to manage it.

Some are enabled in a directory of the root where there are files with the settings (they are usually few and you will quickly detect it if you find a php.ini file) but the most common is to find a section in the part where you edit the preferences for the virtual site that you manage.

Perhaps the best option would be to look in the documentation of the own panel of your hosting or to ask directly to the support of this.

Even so, as a guide I show you an example with the capture of one of my hosts where I have all the installed modules by default but I activate them by means of configuration files:

    
answered by 09.04.2018 в 00:49