0

When I load my Laravel application locally, it works fine. But when I upload it to a CentOS 6 server, I get the following error:

Call to undefined function Illuminate\Encryption\json_decode()

I am using PHP 7.2 and, upon research, this makes no sense at all. Apparently nobody on the internet has reported this error before (!) and the JSON package has been compiled as part of PHP since version 5.2 I believe.

Here's more of the error stack:

in Encrypter.php (line 174)
at Encrypter->getJsonPayload('GA1.2.1735241862.1563529291')
in Encrypter.php (line 123)
at Encrypter->decrypt('GA1.2.1735241862.1563529291')
in EncryptCookies.php (line 95)
at EncryptCookies->decryptCookie('GA1.2.1735241862.1563529291')
in EncryptCookies.php (line 76)
at EncryptCookies->decrypt(object(Request))
in EncryptCookies.php (line 59)
at EncryptCookies->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php (line 102)
at Pipeline->then(object(Closure))
in Router.php (line 574)
at Router->runRouteWithinStack(object(Route), object(Request))
in Router.php (line 533)
at Router->dispatchToRoute(object(Request))
in Router.php (line 511)
at Router->dispatch(object(Request))
in Kernel.php (line 176)

EDIT: Despite being marked as a duplicate, it is not. The solution offered on the other question might work for PHP5.3, but it does not work here. I have tried it. Also, there are other cPanel accounts on this same server, and on those Laravel works just fine.

Does anyone have any idea at all what this might be? I've tried running composer update, but to no avail - it did update a few packages, but it did nothing for the error above.

sveti petar
  • 3,637
  • 13
  • 67
  • 144

0 Answers0