Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: File Upload Size Check

by marto (Archbishop)
on Aug 05, 2019 at 12:11 UTC ( #11103926=note: print w/replies, xml ) Need Help??

in reply to File Upload Size Check

$CGI::POST_MAX = 1024 *1024 ;

For a 5MB limit should be:

$CGI::POST_MAX = 1024 * 1024 * 5;


Replies are listed 'Best First'.
Re^2: File Upload Size Check
by coolsaurabh (Acolyte) on Aug 05, 2019 at 12:29 UTC
    Yes it should be what you suggested. However when i am trying to upload the file greater than 5MB size,it is throwing some error.
        Suppose if I set the file size 1 MB in script and when I am trying to upload the file greater than 1 MB,it is throwing error "Failed to execute CGI "/cgi-bin/Maintenance_Framework.cgi". Contact your administrator." In my view,it should display that "File is too big for upload".

      Your code posted has a limit of 1MB. If you want a 5MB limit set it to what I showed you, if you want to upload something bigger, change the multiplier. Also ensure your web server isn't configured to limit file uploads.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2019-10-15 03:31 GMT
Find Nodes?
    Voting Booth?