Recieving I/O error while uploading photo, or Max Execute time error


While trying to upload a photo in my media manager, I am recieving either an I/O error or this: "Fatal error: Maximum execution time of 30 seconds exceeded in /wp-includes/media.php on line 435"

I tried to edit the media.php file on line 435, but for some reason my code editor in my cpanel is being buggy and wont open up, therefore I cannot find line 435 to change the execute time. Would that fix the issue, or can it be resolved by another way?

Thank you for your help!


  • Fullworks
    • The Bug Hunter

    30 seconds is along time, why is your upload taking so long. On my host my max execution is set to 30 seconds and I can easiiy upload 6mb files if I wanted.

    You could change a php.ini setting for max_execution_time, if you don't have access to php.ini may need to ask your host.

    checking your current setting is simple see

  • WebSeedsSolutions
    • New Recruit

    I agree that 30 seconds is a long time. The file I am trying to upload is only 5MB. I can upload other files and it's fine, but for some reason it's this specific image. I tried using both uploaders, two different browsers (IE and Chrome), uninstalled flash and reinstalled.... I've tried just about solution I can find that is available on the web. Is there a way to manually FTP an image file into the media database? If so, where can the database be found? I tried looking under all of the image folders but I can't find one that holds my images in them.

  • Fullworks
    • The Bug Hunter

    Not a good idea to try and do it manually as wordpress creates multiple image files of different sizes.

    It is likely that the script is timing out whilst trying to re-size the image to thumbnail, I have had this before with slightly corrupt image files.

    Try pre-processing the file into another format e.g. if it is png use a program to change it to jpg.

    In any case why don't you pre-process the image and make it smaller before uploading, 5mb is massive for a web image unless you really need hi-res for later down load?

    The free program 'photoscape' is useful for pre-processing / re-sizing, it even has batch conversion.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.