This error usually occurs when the PHP JSON extension is not enabled or your PHP environment is misconfigured. Follow these steps to resolve it.
Step 1: Enable the JSON Extension in cPanel
-
Log into your cPanel.
-
Scroll down to the Software section.
-
Click Select PHP Version.
-
Check your current PHP version. It should be 7.4 or higher, preferably 8.1 or 8.2.
-
If lower, change to PHP 8.1 or 8.2.
-
-
In the extensions list, enable the following (tick the checkboxes):
-
json
-
mbstring
-
intl
-
pdo
-
openssl
-
fileinfo
-
tokenizer
-
-
Click Save or Set as Current.
Step 2: Clear Laravel Cache Manually
Since you don’t have SSH access, clear the cache via cPanel:
-
Open File Manager in cPanel.
-
Navigate to your Laravel project directory (e.g.,
public_html/salepos/
). -
Delete the contents (files inside) of these folders:
-
storage/framework/cache/
-
storage/framework/views/
-
bootstrap/cache/
-
-
Refresh your website and check if the error persists.
Step 3: Use MultiPHP INI Editor to Enable JSON Extension
-
In cPanel, go to MultiPHP INI Editor under the Software section.
-
Select the PHP version your site is using.
-
Make sure these directives are set (add if missing):
-
Click Save.
Step 4: Reinstall PHP Dependencies Manually
Without SSH, you can manually refresh your Laravel dependencies:
-
Open File Manager.
-
Navigate to your Laravel installation folder (
public_html/salepos/
). -
Delete the
vendor/
folder andcomposer.lock
file. -
From a working environment, zip the
vendor/
folder and upload it via File Manager. -
Extract the zip in your Laravel folder.
Step 5: Verify and Update .htaccess Settings
Sometimes LiteSpeed caching can interfere:
-
In File Manager, open
.htaccess
in your Laravel root directory (public_html/salepos/
). -
Add this line at the very top:
(Replace
81
with your actual PHP version if different.)
Final Checklist
-
✅ PHP version is 7.4 or higher (preferably 8.1 or 8.2).
-
✅ JSON extension is enabled via Select PHP Version.
-
✅ Laravel cache cleared manually via File Manager.
-
✅ PHP directives set via MultiPHP INI Editor.
-
✅
vendor/
folder re-uploaded if needed. -
✅
.htaccess
updated with LiteSpeed handler.
After these steps, refresh your site.
If issues persist, check your PHP error logs for more clues or contact your hosting support for assistance.