How to fix Interface JsonSerializable not found

Fix "Interface 'JsonSerializable' not found" Error on LiteSpeed cPanel Server

✅ Step 1: Enable the JSON Extension

  • Log in to cPanel.
  • Scroll down to the Software section.
  • Click Select PHP Version.
  • Check the current PHP version (it should be 7.4 or higher, preferably 8.1 or 8.2).
  • If it's lower than 7.4, change it to PHP 8.1 or PHP 8.2.
  • In the extensions list, tick (enable) the following:
    • json
    • mbstring
    • intl
    • pdo
    • openssl
    • fileinfo
    • tokenizer
  • Click Save or Set as Current.

✅ Step 2: Clear Laravel Cache

Since you don’t have SSH access, clear the Laravel cache manually:

  • Go to cPanel → File Manager.
  • Navigate to your SalePro installation folder (e.g., public_html/salepos/).
  • Delete the contents inside the following folders:
storage/framework/cache/* storage/framework/views/* bootstrap/cache/*

Now, refresh your website.

✅ Step 3: Enable PHP JSON Extension via MultiPHP INI Editor

If the error persists:

  • Go to cPanel → MultiPHP INI Editor.
  • Select the correct PHP version used for your site.
  • Ensure that the following settings exist:
extension=json memory_limit = 512M max_execution_time = 300 post_max_size = 128M upload_max_filesize = 128M

Click Save.

✅ Step 4: Reinstall Dependencies via cPanel File Manager

Since you don’t have SSH access, do this manually:

  • Open File Manager in cPanel.
  • Go to your SalePro directory (public_html/salepos/).
  • Delete the following:
vendor/ folder composer.lock file

Upload a fresh copy of the vendor/ folder from a working SalePro installation.

If you have access to a working system, zip the vendor/ folder, upload it via File Manager, and extract it in cPanel.

✅ Step 5: Verify .htaccess Settings

If LiteSpeed caching is causing issues:

  • Go to File Manager → Open .htaccess (in the SalePro root folder).
  • Add these lines at the top:
AddHandler application/x-lsphp81 .php

✅ Final Steps

✔ Enable JSON Extension (cPanel → Select PHP Version).

✔ Clear Laravel Cache (Delete cache files in File Manager).

✔ Ensure PHP 8.1 or higher is selected.

✔ Delete & Re-upload vendor folder if needed.

✔ Check .htaccess (add AddHandler application/x-lsphp81 .php).

Now refresh your site. If it still doesn’t work, read error logs again and resolve other issues. 

  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

File Manager Access in cPanel

If you're a web hosting user looking to manage your server using cPanel, accessing the File...

Reset cPanel File Manager

If you want to start fresh with cPanel, resetting the File Manager is a great way to get a clean...

cPanel File Manager Backup: Complete Guide

The cPanel control panel is widely used to manage backend operations of websites. One useful...

AutoSSL in cPanel

cPanel has many features, like website backup and more. One of its important features is AutoSSL....

How to Create a Subdomain In cPanel

Creating a subdomain in cPanel is a simple way to organize your website and create separate...