Symptoms
When submitting the contents of a contact form created by Sitejet, the submission fails and you can find the PHP warnings in the following file:
/home/$user/logs/$domain_tld.php.error.log
The warnings will resemble the following:
[01-Jan-20XX 00:00:00 UTC] PHP Warning: Undefined array key "form_196935989" in /home/user/public_html/api.php on line 240
[01-Jan-20XX 00:00:00 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home/user/public_html/api.php on line 240
Description
Once the form is submitted to the server, the local PHP settings take over and certain configurations can cause warnings to appear. Ensuring that the PHP settings are properly configured, the PHP is running the appropriate version, and that the Sitejet plugin is the latest available version should resolve these warnings.
Workaround
- Ensure that the site is using a version of PHP 7.1, 8.1 or higher:
How to change the PHP version for a domain in cPanel or WHM - Ensure that the option "allow_url_fopen" is enabled for your selected version of PHP:
Changing the "allow_url_fopen" Setting for PHP - Ensure the package "cpanel-sitejet-plugin" is the latest available version:
How to manually start package updates
If all of these conditions have been satisfied, this issue can often be corrected by republishing the site from Sitejet. If the site has been republished and you continue to see issues, please open a ticket with our Technical Support department for further review.
Comments
0 comments
Article is closed for comments.