It took me a while to realize that the reason why some PDFs I wanted to upload using a PHP scrip I developed to the Thesis Library I am building would not make it to the server. The symptoms where funny:
- Small PDFs would be uploaded fine. That should have immediately ringed a bell
- The PHP script getting the file plus some other information appeared as if no data was passed to it.
My web server based on XAMPP has an default limitation on the size of both uploaded files (2 MB) and POST data (8 MB). I was like to get to the Eddie on Everything blog where I could find how to fix this. Very simple instructions:
- Locate your php.ini file. Most probably at /opt/lampp/etc/php.ini
- Edit it and replace the following configurations:file_uploads = Onupload_max_filesize = 30Mpost_max_size = 30M