• Resolved klaggy

    (@klaggy)


    Hi there,

    I’ve tried to change pretty much all the settings for this form, I made sure that PHP parameters are compatible with your plugin:
    php_admin_value[memory_limit]=256M
    php_admin_value[max_execution_time]=120
    php_admin_value[max_input_time]=300
    php_admin_value[post_max_size]=25M
    php_admin_value[upload_max_filesize]=20M
    php_admin_value[max_file_uploads]=20

    But when users submit photos, they get the message “An error occurred while processing the form. Please try again”. If they submit only a couple of photos and they’re not too big, it works fine so it looks like a timeout but not sure if there’s anything else that should be changed to make it work.

    When I look at the log, this is what I find so it doesn’t look like a timeout, more like a memory problem even though files that I try to upload are not very large:

    [proxy_fcgi:error [pid 11061:tid 139689801094912 [client 173.181.86.44:0 AH01071: Got error ‘PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194312 bytes) in /home/661644.cloudwaysapps.com/fnszwgpysf/public_html/wp-includes/PHPMailer/SMTP.php on line 744’, referer: https://smallplanetenergy.ca/small-planet-energy-clean-up-contest-2024/

    Here’s the form: https://drive.google.com/file/d/1aLf4vtfJ7yl6F4YZ01YwkhrACou8lbaQ/view?usp=sharing

    Many thanks for your help! ??

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @klaggy

    I hope you are doing well today.

    The file you have shared is empty. Can you double-check this and upload the file again to Google Drive?

    Also, can you change your memory limit from 256 to 512 and see if that helps? It seems that while sending the form there is not enough memory.

    Kind Regards,
    Kris

    Thread Starter klaggy

    (@klaggy)

    I changed the memory but people are still struggling to upload files, the server doesn’t have any issues, only this form does.

    Here’s the link: https://drive.google.com/file/d/1aP_8Xv3gRiuytY14x9V5x9gys-UrCi18/view?usp=sharing

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @klaggy

    Thanks for sharing the form.

    I noticed that it currently has upload field configured to “On form submission” upload method. This is something that may in some cases result e.g. in some timeout issues or similar – e.g. if the site/server is temporarily overloaded or even user’s connection is a bit too slow or “wonky” and so on.

    Could you try switching it (it’s in settings of Upload field) to the “AJAX” upload method, update the form, purge all caches and see if that helps or not?

    Kind regards,
    Adam

    Thread Starter klaggy

    (@klaggy)

    That’s what it was initially and I changed it to see if it would help but it didn’t. I switched it back to AJAX now in case you want to test it on the actual website.

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @klaggy,

    I tried to test in my system with the given form export, but it generally works fine. Possible to know what’s the average size of photos that gets uploaded and with how many files uploaded you notice the issue in common? ie with 3 or 5 files uploaded etc?

    Could you also create a PHP file in the root directory with the following code and check what are the values picked in the server side for the resources? ie

    <?php phpinfo(); ?>

    Once the PHP file is created, for example info.php, you can load the file by accessing the path as:
    yoursiteurl.com/info.php

    You’ll have to replace the yoursiteurl.com with your domain URL and check what are the values for memory_limit, max_execution_time, post_max_size and upload_max_filesize. Please do share the values you get for the above when checked using the mentioned php file.

    The above steps helps in confirm the correct resources are reflected on the server and you’ll have to make sure they are at least having the following values:

    upload_max_filesize = 128M
    post_max_size = 256M
    memory_limit = 512M
    file_uploads = On
    max_execution_time = 300

    Please do let us know how that goes, so that we could check further.

    Kind Regards,

    Nithin

    Thread Starter klaggy

    (@klaggy)

    Thank you, it was the post_max_size that was the problem, setting it to 256MB did the job. Thank you for your assistance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error message when uploading files’ is closed to new replies.