Yet another UPLOAD problem

Yet another UPLOAD problem

by Marcelo Maia -
Number of replies: 2

When I do upload a file or a photo, the file is actually uploaded, but it goes with a strange content. For example, the photo goes somewhat shuffled. A file is uploaded with a size different from the original file (for example a 5.1M file is recorded into the server with 10.3M) and can be downloaded, but cannot be opened because of bad format.

Thanks, folks.

Average of ratings: -
In reply to Marcelo Maia

Re: Yet another UPLOAD problem

by Marcelo Maia -
I've came out what could repair the problem
I had to comment the lines
      SetOutputFilter PHP
      SetInputFilter PHP
in the file /etc/apache/conf/conf.d/php.conf      since I'm using apache 2 filter as server api.
I've discovered this in the php.net documentation, in a specific thread that states that the default configuration causes a problem when uploading binaries.
Special thanks to Giovanni Farias who promptly gave me some insights.
Hope this can help Apache 2 users.
In reply to Marcelo Maia

Re: Yet another UPLOAD problem

by Pablo Lachmann -
Hi,

thanks for your posting, I had a problem uploading large files but the settings in php.ini where correct. I always got a popup window, saying that the 'document contains no data'.

I'm using RedHat9 with an Apache2 server. I had to edit '/etc/httpd/conf.d/php.conf', I changed:

LimitRequestBody 2097152

to

LimitRequestBody 20971520

Now the Upload is working correctly.

Gruesse, Pablo