RE: [PHP] upload_max_filesize + ini_set
maybe someone would like to report it , my reports either get ignored or are false alarms , i am creating a function to get the line upload_max_filesize and change its value in .htaccess its the only way , and this is everytime i load the uploader page -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 23, 2002 11:40 PM To: 'electroteque'; [EMAIL PROTECTED] Subject: RE: [PHP] upload_max_filesize + ini_set > -Original Message- > From: electroteque [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 19:34 > > and i just tested the script and it let me upload a 2.5M > file. Well, I was just quoting from the manual, so that sounds worthy of a bug report in itself -- either the manual is wrong, or the behaviour of PHP is! > so there must > be a way to put it in the page aswell No, there mustn't -- this I am sure about. As I said before: > As all file upload activity takes place before > your script even *starts* executing, you can't use > ini_set on this [upload_max_filesize]. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] upload_max_filesize + ini_set
> -Original Message- > From: electroteque [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 19:34 > > and i just tested the script and it let me upload a 2.5M > file. Well, I was just quoting from the manual, so that sounds worthy of a bug report in itself -- either the manual is wrong, or the behaviour of PHP is! > so there must > be a way to put it in the page aswell No, there mustn't -- this I am sure about. As I said before: > As all file upload activity takes place before > your script even *starts* executing, you can't use > ini_set on this [upload_max_filesize]. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload_max_filesize + ini_set
and i just tested the script and it let me upload a 2.5M file. so there must be a way to put it in the page aswell "Mike Ford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > -Original Message- > > From: electroteque [mailto:[EMAIL PROTECTED]] > > Sent: 20 December 2002 11:35 > > To: [EMAIL PROTECTED] > > Subject: [PHP] upload_max_filesize + ini_set > > > > > > is there a way to get this setting to work without hard > > setting in htaccess > > ? i'd like to be able to dynamically set the max filesize via > > a defines > > setting and ini_set rather than statically in htaccess > > No can do -- as all file upload activity takes place before your script even > starts executing, you can't use ini_set on this. > > In fact, upload_max_filesize is listed in > http://www.php.net/manual/en/function.ini-set.php as being a PHP_INI_SYSTEM > level directive, which means it can be set only in php.ini or httpd.conf (if > using Apache) -- it's not even settable in .htaccess files. > > Cheers! > > Mike > > - > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: [EMAIL PROTECTED] > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload_max_filesize + ini_set
here is a sample htaccess file with ini rules php_value register_globals Off php_value track_vars On php_value arg_separator.output "&" php_value arg_separator.input "&" php_value upload_max_filesize "3M" i get 3M returned as the upload_max_filesize so it does work "Mike Ford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > -Original Message- > > From: electroteque [mailto:[EMAIL PROTECTED]] > > Sent: 20 December 2002 11:35 > > To: [EMAIL PROTECTED] > > Subject: [PHP] upload_max_filesize + ini_set > > > > > > is there a way to get this setting to work without hard > > setting in htaccess > > ? i'd like to be able to dynamically set the max filesize via > > a defines > > setting and ini_set rather than statically in htaccess > > No can do -- as all file upload activity takes place before your script even > starts executing, you can't use ini_set on this. > > In fact, upload_max_filesize is listed in > http://www.php.net/manual/en/function.ini-set.php as being a PHP_INI_SYSTEM > level directive, which means it can be set only in php.ini or httpd.conf (if > using Apache) -- it's not even settable in .htaccess files. > > Cheers! > > Mike > > - > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: [EMAIL PROTECTED] > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] upload_max_filesize + ini_set
> -Original Message- > From: electroteque [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 11:35 > To: [EMAIL PROTECTED] > Subject: [PHP] upload_max_filesize + ini_set > > > is there a way to get this setting to work without hard > setting in htaccess > ? i'd like to be able to dynamically set the max filesize via > a defines > setting and ini_set rather than statically in htaccess No can do -- as all file upload activity takes place before your script even starts executing, you can't use ini_set on this. In fact, upload_max_filesize is listed in http://www.php.net/manual/en/function.ini-set.php as being a PHP_INI_SYSTEM level directive, which means it can be set only in php.ini or httpd.conf (if using Apache) -- it's not even settable in .htaccess files. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php