• Resolved sharonlandis

    (@sharonlandis)


    Yesterday I fixed the problem, today it’s back.

    First, I tried setting up a php.ini file containing
    upload_max_file_size = 64M
    max_execution_time = 300M

    That didn’t work. Next I added “SetEnv MAGICK_THREAD_LIMIT 1” to the top of .htaccess.
    That worked yesterday. Today I am back to not being able to upload images.

    This is the error log entry
    [Wed Nov 30 15:06:42 2016] [warn] [client 173.34.238.99] mod_fcgid: stderr: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/csres380/public_html/wp-includes/class-wp-image-editor-imagick.php on line 360, referer: https://csresume.com/wp-admin/upload.php

    How can I fix this?

    Thanks
    Sharon

Viewing 3 replies - 1 through 3 (of 3 total)
  • Indexed

    (@peter_indexed)

    try set_time_limit(300); at the top of the script

    Thread Starter sharonlandis

    (@sharonlandis)

    I tried this as the first line of .htaccess (“set_time_limit(300)”). It my site to not load at all,

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    Apache Server at csresume.com Port 80

    Then I tried
    php_value max_execution_time 300 in .htaccess, causing the same ugly error

    I also tried this in php.ini
    max_execution_time = 300 – this didn’t do anything, the error log entry indicates the 30s max was not overridden
    [Wed Nov 30 16:04:26 2016] [warn] [client 173.34.238.99] mod_fcgid: stderr: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/csres380/public_html/wp-includes/class-wp-image-editor-imagick.php on line 360, referer: https://csresume.com/wp-admin/upload.php

    What did I do wrong?

    Your webhost, which appears to be these folks, can limit what options you can set in php.ini and/or .htaccess. Consult with your web host on the issue(s), or have a look at recommended hosts here.

    Meanwhile, do a speed test (upload speed) on your local machine. If you are at slow speeds, it may take even more than 300s to upload a big file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTTP error 500 when uploading image’ is closed to new replies.