Re: Disabling the MAX_FILE_SIZE error.

From: Date: Wed, 19 Jul 2000 17:27:18 +0000
Subject: Re: Disabling the MAX_FILE_SIZE error.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7322@lists.php.net to get a copy of this message
This is not the perfect answer, but it works. :) I have turned off the "display_errors" configuration item in my php.ini file and turned on "log_errors". Then I set the "error_log" item to "stderr". Now when I have a file upload that exceeds my maximum (100 KB), the warning is written to the Apache log file and my script can process the error internally. It's unfortunate that these warnings are generated before the php script because if they came later you could use error_reporting(0) or set_error_handler() to ignore or handle the error. In your case, where you are trying to send header information, you might want to look at the output buffering functions (if you are using PHP4). Blake Schwendiman Intechra LLC "Keith Vance" <keith@neverwillbes.com> wrote in message news:3973EA3B.64BB4928@neverwillbes.com... > I want to set the MAX_FILE_SIZE in my form for uploading files, but I > don't want to have the error displayed on the action script when someone > tries to upload a file that exceeds this limit. Because then I also get > a warning from my session management like this: > > Warning: Cannot send session cache limiter - headers already sent by > (output started .... > > I don't want to just make the MAX_FILE_SIZE really large and weed out > the undesirables in the action scipt, because then precious bandwidth is > wasted uploading a file for no reason. Is there something I can set in > the action script to turn off the warnings. > > Thanks, > Keith > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#7322) next »