PHP Upload Timesout?

Discussion in 'General' started by crypted, Apr 23, 2008.

  1. crypted

    crypted New Member

    Users are having timeout issues when uploading files via Gallery 2.0's PHP upload scripts. Files smaller than 500K were working fine. I changed the PHP.INI limits and now they cannot upload one image of 2.5MB or multiple for that matter. It gives a timeout (white page) and doesn't complete the process on multiple images. Anyidea how to perfect the PHP.INI/HTTPD setup to allow for much more uploading? The average upstream if 40K/s. It also may be well to know that aside from these settings I have kept the files as default from the ISPConfig installations.

    Current setting:
    max_execution_time = 400 ; Maximum execution time of each script, in
    max_input_time = 400 ; Maximum amount of time each script may spend parsing
    request data
    memory_limit = 30M ; Maximum amount of memory a script may consume
    post_max_size = 30M ; Maximum size of POST data that PHP will accept.
    upload_tmp_dir = /tmp/ ; Temporary directory for HTTP uploaded files.

    Also, check the for the PHP-INFO output...

    It's worth noting that the PHP Upload Script will work properly for 1.2MB files and multiple 800KB files.
    Last edited: Apr 23, 2008
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which php.ini file did you edit?
  3. crypted

    crypted New Member

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The settings looks ok so far. I have no idea what may cause this at the moment.
  5. denebstar

    denebstar New Member

    Same problem

    I am facing exactly the same problem :

    max_execution_time = 300
    max_input_time = 600
    memory_limit = 64M
    file_uploads = On
    upload_max_filesize = 100M
    default_socket_timeout = 60

    But for files of more than 2M the upload fails ??????????
  6. denebstar

    denebstar New Member

    In the following forum :

    I see that comment :
    Additonal Comments
    Apache Settings
    The apache webserver has a LimitRequestBody configuration directive that restricts the size of all POST data regardless of the web scripting language in use. Some RPM installations sets limit request body to 512Kb. You will need to change this to a larger value or remove the entry altogether.

    But it doesn"'t say where I should change that "LimitRequestBody"
    Any Idea ?

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely you edited the wrong php.ini file. Please crete a file containing:


    and upload it to your webspace. Open the file in a browser and search in the content which php.ini is used for this script. Then edit this php.ini file.

    Aditionally, you seem not to have set post_max_size to a lerger sire in the php.ini.
  8. denebstar

    denebstar New Member

    Hi Till
    I edited the /etc/php.ini file
    When I tried to upload directly from the server (to the server) it worked for a 41Mo file

    Now that I try from a different location it just seems to time out

    How can I send you the result of the php command ?

  9. denebstar

    denebstar New Member

    Here are some of the PHP values
    I have removed those that seemed totally un interresting for that problem

    max_execution_time 600 600
    max_input_nesting_level 64 64
    max_input_time 600 600
    memory_limit 250M 250M
    open_basedir no value no value
    output_buffering 4096 4096
    output_handler no value no value
    post_max_size 200M 200M
    realpath_cache_size 16K 16K
    realpath_cache_ttl 120 120
    register_argc_argv Off Off
    register_globals Off Off
    register_long_arrays Off Off
    report_memleaks On On
    report_zend_debug On On
    safe_mode Off On
    safe_mode_exec_dir no value no value
    safe_mode_gid Off Off
    safe_mode_include_dir no value no value
    upload_max_filesize 100M 100M
    upload_tmp_dir no value no value

    First value is local value, second value is Master value (Only safe_mode seem to differ)
  10. falko

    falko Super Moderator ISPConfig Developer

    You can try
    at the beginning of the upload script. If you have a slow connection, it might be a timeout problem.

Share This Page