Big size file upload problem in PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandeept
    New Member
    • Aug 2008
    • 14

    Big size file upload problem in PHP

    Hi,

    My server has CentOS, Apache and PHP.
    I have set all required parameters in php.ini to handle big size file uploads (post_max_size, memory_limit, timeouts etc.)

    But, still the script doesn't accept a file more than 5MB. On bigger uploads, it returns error 7 (Unable to write to disk).
    I have set 777 permissions on my temporary folder (/opt/php) and during upload, I do see temporary file through my FTP. But, once it reaches 5MB, temporary file disappears and script shows error 7.

    I increased timeout value in httpd.conf and set following too,

    Code:
    <Directory "/opt/php">
         LimitRequestBody 10485760
    </Directory>
    But, no success.

    Please help.

    Thanks,
    Sandeep
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    in php.ini file there is a parameter upload_max_file size. Did you set this value? after setting don't forget to restart your server

    Comment

    • divideby0
      New Member
      • May 2012
      • 131

      #3
      In the form, did you add a line for max upload size?

      Code:
      <form enctype="multipart/form-data" action="some script" method="post">
      <input type="hidden" name="MAX_FILE_SIZE" value="some_size" />
      <input name="uploaded_file" type="file" />
      <input type="submit" value="upload" />
      </form>

      Comment

      • sandeept
        New Member
        • Aug 2008
        • 14

        #4
        [Closed] - Big size file upload problem in PHP

        Hi,

        Sorry for late response.

        The temporary directory was out of quota. I set a new directory path in php.ini and upload is working fine.
        Thanks for your inputs.

        Thanks,
        Sandeep

        Comment

        Working...