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.Â