In this article, we will be discussing the issue of slow form submission when using the Really Simple Captcha plugin for Contact Form 7 in WordPress. The problem is caused by a permission issue where the plugin is unable to create the captcha image in the temp folder. We will be going over a simple solution to fix this problem by making a small change in the plugin’s code. Specifically, we will be altering the file permission settings for the temporary image files and the temporary answer text files. This will allow the plugin to create the captcha image and solve the issue of slow form submission. By the end of this article, you will have a better understanding of how to troubleshoot and fix this problem, and your forms will be submitting quickly and smoothly.

Open really simple captcha folder from plugin folder -wp-content/plugin/really-simple-captcha/really-simple-captcha.php

really-simple-captcha.php:

old:

/* Image type. 'png', 'gif' or 'jpeg' */
        $this->img_type = 'png';

        /* Mode of temporary image files */
        $this->file_mode = 0444;

        /* Mode of temporary answer text files */
        $this->answer_file_mode = 0440;

Change to:

/* Image type. 'png', 'gif' or 'jpeg' */
        $this->img_type = 'png';

        /* Mode of temporary image files */
        $this->file_mode = 0777;

        /* Mode of temporary answer text files */
        $this->answer_file_mode = 0770;
 

The above code is a solution to a common issue that users may face when using the plugin “Really Simple Captcha” for Contact Form 7. The issue is that the captcha image is not being created in the temp folder, which results in a long delay when submitting the form.

The problem is caused by a lack of permissions on the temp folder, which prevents the plugin from creating the captcha image. To fix this, we need to change the file permissions on the temp folder.

The code snippet provided above is from the file “really-simple-captcha.php” which is located in the “really-simple-captcha” folder in the “wp-content/plugins” directory. The original code sets the file permissions for the image and text files to 0444 and 0440 respectively. By changing these permissions to 0777 and 0770 respectively, we are allowing full read and write access to the temp folder, which allows the plugin to create the captcha image.

It’s important to note that changing file permissions to 0777 is a security risk, if you’re unsure of how to change the file permission or what is the best permission level to set, it’s recommended to consult with your web host or a server administrator.

After making these changes, save the file and refresh your Contact Form 7 page. You should now be able to submit the form without any delays caused by the missing captcha image.

In conclusion, if you’re facing this issue, it’s likely that the problem is caused by a lack of permissions on the temp folder. By changing the file permissions in the “really-simple-captcha.php” file, you can solve this problem and ensure that the captcha image is created correctly. However, be careful with file permission, as this could pose a security risk, so it’s important to consult with a server administrator or web host to ensure that you are taking the necessary precautions to secure your website.