Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP/APACHE2 Uploading File Sizes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
CobraNMU
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 76
Location: Naperville, IL

PostPosted: Thu May 13, 2004 2:27 pm    Post subject: PHP/APACHE2 Uploading File Sizes Reply with quote

Hey,

I've spent all morning looking for this problem. I have a php script that uploads a file and creates a thumbnail of it. It works fine on files under 500k, but anything bigger than that (ex 1MB) don't work. I get the following error in my error_log. I'm using apache2 and php4. The PHP.ini file is okay, and i upped the max_upload_size to 6MB. I was looking around, and everyone who fixed it found thier problem in the php.conf file (which i think is the php.ini file) and they said to look for RequestLimitSize. Can someone tell me where that is or how to fix it in gentoo's distro of apache2?

Here's the Error:

Requested content-length of 734780 is larger than the configured limit of 524288, referer:


Thanks.
Back to top
View user's profile Send private message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Thu May 13, 2004 2:35 pm    Post subject: Reply with quote

Can you post the code of the page? The sections dealing with the upload and the processing of the image?
Back to top
View user's profile Send private message
CobraNMU
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 76
Location: Naperville, IL

PostPosted: Thu May 13, 2004 2:39 pm    Post subject: Hope this helps Reply with quote

<form method="post" action="addnewuser.php" enctype="multipart/form-data">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width='70'>Name</td>
<td><input name="name" type="textbox"></td>
</tr>
<tr>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>

<tr>
<td width='70'>Picture</td>
<td><input type="hidden" name="MAX_FILE_SIZE" value="2097152">
<input name="pic" type="file"></td>
</tr>
<tr>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Add Picture">
<input type="reset" name="Reset" value="Clear Form"></td>
</tr>
</table>
</form>
Back to top
View user's profile Send private message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Thu May 13, 2004 3:34 pm    Post subject: Reply with quote

What about the bit that actually does something with the file once it's been uploaded?

I'll check my box and see if I have a php.conf file, but in the mean time you can always just try

Code:
locate php.conf


and see what turns up.
Back to top
View user's profile Send private message
CobraNMU
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 76
Location: Naperville, IL

PostPosted: Thu May 13, 2004 3:53 pm    Post subject: still lost Reply with quote

It bombs out before getting to that page.
Back to top
View user's profile Send private message
CobraNMU
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2004
Posts: 76
Location: Naperville, IL

PostPosted: Thu May 13, 2004 4:55 pm    Post subject: GOT IT! Reply with quote

Turns out, in gentoo's version of apache2, you go to /etc/apache2/conf/modules.d/70mod_php.conf and the size is in there to change. :)

yay! Thanks for the locate command reminder!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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