Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 + PHP: Requested content-length larger than limit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Daniel_
n00b
n00b


Joined: 22 Jan 2004
Posts: 1

PostPosted: Thu Jan 22, 2004 1:05 pm    Post subject: Apache2 + PHP: Requested content-length larger than limit Reply with quote

When you try to upload a file or submit a form with values and the total size is larger than 580Kb and you get a line like this in your apache error_log:

Requested content-length of 670955 is larger than the configured limit of 524288

You should do the following:

In the file /etc/apache2/conf/modules.d/70_mod_php.conf change the LimitRequestBody to a higher value or set it to 0 for unlimited filesize.

I hope this helps someone.
_________________
:wq
Back to top
View user's profile Send private message
seriousmoose
n00b
n00b


Joined: 07 Nov 2002
Posts: 39

PostPosted: Sun Feb 22, 2004 2:06 pm    Post subject: Reply with quote

THANKS SOOO MUCH!!! You saved me! lol
Back to top
View user's profile Send private message
sergio2003
n00b
n00b


Joined: 13 Mar 2004
Posts: 17

PostPosted: Thu Apr 01, 2004 9:15 am    Post subject: Reply with quote

Can anyone help me on this??

I tried something like what Daniel_ said but it still doesn't work. Please see http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=14701 for what I tried to do. My handlename there is sergio2004. Thanks.

Edit: Gosh, I am extremely sorry. I can't believe I ignored the 70_mod_php.conf file that Daniel_ pointed out... :oops: I don't know, maybe I was stressed out... It worked for me /w the following:
Code:
# diff -c  /etc/apache2/conf/modules.d/70_mod_php.conf.ORG /etc/apache2/conf/modu
les.d/70_mod_php.conf
*** /etc/apache2/conf/modules.d/70_mod_php.conf.ORG     Wed Mar 31 17:11:27 2004
--- /etc/apache2/conf/modules.d/70_mod_php.conf Fri Apr  2 05:54:49 2004
***************
*** 16,38 ****

      # Fix some bugs
      <Files *.php>
-         LimitRequestBody 524288
          RequestHeader unset If-Modified-Since
      </Files>
      <Files *.php3>
-         LimitRequestBody 524288
          RequestHeader unset If-Modified-Since
      </Files>
      <Files *.php4>
-         LimitRequestBody 524288
          RequestHeader unset If-Modified-Since
      </Files>
      <Files *.phps>
-         LimitRequestBody 524288
          RequestHeader unset If-Modified-Since
      </Files>
      <Files *.phtml>
-         LimitRequestBody 524288
          RequestHeader unset If-Modified-Since
      </Files>

--- 16,33 ----
BTW, I found this PHP upload test to be very useful: http://www.phpexamples.net/codeExSnippet-74.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum