Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Beating the system

by blm (Hermit)
on Sep 29, 2002 at 15:20 UTC ( [id://201556]=note: print w/replies, xml ) Need Help??


in reply to Beating the system

There is a way to limit the size of posts when using CGI.pm. There is a variable called $CGI::POST_MAX that contains the maximun size of posts. This certainly affects file uploads.

You can find out what the limit is on your system by using this

use CGI; print $CGI::POST_MAX;

If this prints a negative value then there isn't a limit.

To find out more look at perldoc CGI.

--blm-- If you don't like this post can you please /msg me

Replies are listed 'Best First'.
Re: Re: Beating the system
by mikeirw (Pilgrim) on Sep 29, 2002 at 15:29 UTC
    Thanks for the tip, but I actually have $CGI::POST_MAX set in my script to the constant MAX_FILE_SIZE, which is 1_048_576. Without setting it myself, and just printing its value, it returns -1.

      You know... from what I said in another node I think you might have some mileage in knocking that limit down some - keep CGI's use of memory lower and all. A closer reading of CGI.pm leads me to think it's not as big a deal but perhaps... Consider using Devel::Peek on your CGI object's BUFFER member.

      Oops. Sorry. I don't know how I missed that

      --blm-- If you don't like this post can you please /msg me

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://201556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-29 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found