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:
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:
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:
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:
✅ 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.