Symptoms
When listing domains within a cPanel, the domains do not appear and you encounter the following error:
Error: Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/local/cpanel/Cpanel/API/DomainInfo.pm line 132.
Description
This error may occur if the cache files that cPanel reads contain invalid data. Rebuilding the cache and restarting relevant services will clear the error.
Workaround
- Access the server using SSH as the root user.
- Rebuild the cPanel userdata cache files with the following command:
/usr/local/cpanel/bin/userdata_update && /usr/local/cpanel/bin/build_userdata_cache && /usr/local/cpanel/bin/fix_userdata_perms && /usr/local/cpanel/scripts/updateuserdatacache
- Rebuild the Apache configuration:
/scripts/rebuildhttpdconf
- Restart Apache:
/scripts/restartsrv_httpd
- Reload the "Domains" page within cPanel, the error will be cleared.
Comments
0 comments
Article is closed for comments.