Thurrock Posted March 31, 2014 Share Posted March 31, 2014 Hi Everyone I am banging my head against the wall with a problem where I am trying to upload an array of file types but keep getting Internal Server Errors when uploading PDF files I can upload images and word docs and spreadsheets but PDF is not working for me, have tried various different files and file sizes but still the same. I have a form: <form action="modules/docman/upload.php" enctype="multipart/form-data" method="post"> <input type="file" name="pic" id="pic"> <input type="submit" name="submit" value="Upload File"> <input type="hidden" name="MAX_FILE_SIZE" value="20000000"> </form> I have simply tried to dump the file array in an effort to eliminate server side script causeing the problem and still get the Internal Server Error var_dump($_FILES["pic"]); exit; The server environment is in my control, could be this but not too sure how, where and why. Any help would be very much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/287407-problems-uploading-pdf/ Share on other sites More sharing options...
Ch0cu3r Posted March 31, 2014 Share Posted March 31, 2014 Your http server is encountering an error, this is why you are getting Internal Server Error 500 message. You need to look at your servers error log to find out the cause of this error. Quote Link to comment https://forums.phpfreaks.com/topic/287407-problems-uploading-pdf/#findComment-1474486 Share on other sites More sharing options...
Thurrock Posted March 31, 2014 Author Share Posted March 31, 2014 Hi I think I have found the error: [Mon Mar 31 14:08:39 2014] [warn] [client xx.xx.xxx.x] mod_fcgid: HTTP request length 131400 (so far) exceeds MaxRequestLen (131072), ... This looks like a Fast CGI issue, not sure how is best to resolve this Thanks Quote Link to comment https://forums.phpfreaks.com/topic/287407-problems-uploading-pdf/#findComment-1474493 Share on other sites More sharing options...
Ch0cu3r Posted March 31, 2014 Share Posted March 31, 2014 (edited) MaxRequestLen is currently capped to 128KB. Your file upload is exceeding this cap which is causing the 500 Internal Server Error. The server environment is in my control If you have access to the servers config, then you need to increase the current cap set for MaxRequestLen so it is greater than 131072 bytes (128KB) to allow for your file uploads Edited March 31, 2014 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/287407-problems-uploading-pdf/#findComment-1474501 Share on other sites More sharing options...
Thurrock Posted March 31, 2014 Author Share Posted March 31, 2014 Hi Thank you That resolved the problem, for anyone who has this problem you need to edit the file in: /etc/apache2/mods-available/fcgid.conf then reboot Apache Works perfect. Thanks Again Quote Link to comment https://forums.phpfreaks.com/topic/287407-problems-uploading-pdf/#findComment-1474516 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.