Jump to content

Problems Uploading PDF


Thurrock

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/287407-problems-uploading-pdf/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.