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.
Is there nothing written to the error_log when the 500 error occurs?
I'm assuming you set these in an .htaccess file? Did you make sure the changes were set, using a PHP <?php phpinfo (); ?> page?
Originally Posted by johnsmith153
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?
Could you include the code you are using to set the mentioned variables and its placement within your script?