SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form Upload Problem

    I am using a form to upload files.

    I have a situation where everything works, including the database action etc required, however depending on the size of the files I upload, I can either get the "completed" message, or I get a 500-internal-error.

    Remember, everything works, it always does everything it should - it is just sometimes I get the 500 error.

    If I upload one file anything over 8mb triggers the 500 error.
    If I am uploading 2 at same time, it triggers if the total size of both files is over about 5mb.

    I have set max execution limit, memory limit, max-upload size, max-post size -
    you name it!

    The script also uses a video encoding API to send and receive a file via FTP - receiving the final, encoded file.

    Any ideas?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is there nothing written to the error_log when the 500 error occurs?

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nothing at all.

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by johnsmith153 View Post
    I have set max execution limit, memory limit, max-upload size, max-post size -
    you name it!
    I'm assuming you set these in an .htaccess file? Did you make sure the changes were set, using a PHP <?php phpinfo (); ?> page?
    DILIGENThost.com, High-availability Canadian hosting 24/7 support
    cPanel/WHM 11 + Fantastico, PHP4&5, Private nameservers...
    Unlimited domains, Self Serve DNS, No Overselling!
    | Forum & packet loss monitoring @ Webmasters-Inside.com

  5. #5
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes I have checked all this.

    Just to make sure, exactly which settings should I be changing?

    It is a strange problem, as it always performs all required functions, but just when it is ready to echo out the completed message, it shows the 500 error. If only the 500 error said "completed" I would have no problem!!

    Of course I haven't a clue - but at a complete guess it seems as though the php memory has exhausted - and it has nothing left and so returns the 500 error. Is there a way to clear memory etc??? I only think this because it only returns the error after evertyhing is done. In fact exactly as the last video has finished processing (I can check by logging in to a company called encoding.com who provide the API) - that is when the error shows.

    I have set memory_limit to "512M" - so this can't be problem. Are there any other settings?

  6. #6
    SitePoint Addict
    Join Date
    Jul 2008
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you include the code you are using to set the mentioned variables and its placement within your script?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •