Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gmxtrr's avatar

LARAVEL OR PHP VERSION ISSUE !!

The laravel app works fine in the localhost, after deploying the app to a sharing host it doesn't works !! after checking error logs via cpanel i get something like this :

od_fcgid: stderr: PHP Fatal error: Interface 'JsonSerializable' not found in /home/beautybook/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 17

Laravel V 5.4 PHP V 7.1 json extension enabled !

What's wrong ??? and thank you !

0 likes
11 replies
Cronix's avatar

How did you "deploy" it? Did you run composer install to pull in all of the dependencies?

gmxtrr's avatar

Hey Cronix, i mean upload it to a sharing hosting ! it works fine on my localhost, but trying to uploading on a sharing host i get the error above !!

Dalma's avatar

You may want to try and hit phpinfo() to ensure that you don't have multiple php.ini files and the one actually being used does NOT have json enabled.

Cronix's avatar

i mean upload it to a sharing hosting

How? There are many ways to "upload" it. Did you ftp all files? Did you use a git repo and clone it? How did you copy the files to your host?

gmxtrr's avatar

I did compress it to zip file then upload it via FTP ! the traditional way ! if you enter to the link i shared you'll not find json !!! that crazyyyyy bcz i've enabled in my cpanel, i should change the hosting company now

gmxtrr's avatar

A supid Hosting company, i installed all the requirements i check them on, but not giving me result when using phpinfo();

Please or to participate in this conversation.