Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Jeff Cohan
Thank you, all who replied. This helps me understand. I might give a try to the workarounds some suggested. Great newsgroup. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread brian
brian wrote: Jeff Cohan wrote: It seems that the server had to know the size of the file in order to know it exceeded MAX_FILE_SIZE. So how can my script find out the size? Not at all. The user-agent is built to ignore files that exceed the MAX_FILE_SIZE value. Ack! I meant, "The user-age

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread brian
Jeff Cohan wrote: Dan Parry wrote: I might be wrong but this would be classed as 'exploitable'... Webservers should not be allowed to read from or write to clients... Of course there is ActiveX... I think we're off the point. My script is simply interrogating the value of the $_FILES[use

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread brian
Ray wrote: On Saturday 22 September 2007 7:39:01 pm Dan Parry wrote: This would be the exploitable 'feature' I mentioned... Client-side files should never be readable Dan If the contents of a file were readable, I would definitely agree with you. I'm not convinced that the ability to det

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Jim Lucas
Jeff Cohan wrote: Dan Parry wrote: I might be wrong but this would be classed as 'exploitable'... Webservers should not be allowed to read from or write to clients... Of course there is ActiveX... I think we're off the point. My script is simply interrogating the value of the $_FILES[userf

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Ray
On Saturday 22 September 2007 7:39:01 pm Dan Parry wrote: > > -Original Message- > > From: Ray [mailto:[EMAIL PROTECTED] > > Sent: 23 September 2007 02:25 > > To: php-general@lists.php.net > > Subject: Re: [PHP] MAX_FILE_SIZE not working with file uploads &g

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Dan Parry
> -Original Message- > From: Ray [mailto:[EMAIL PROTECTED] > Sent: 23 September 2007 02:25 > To: php-general@lists.php.net > Subject: Re: [PHP] MAX_FILE_SIZE not working with file uploads > > On Saturday 22 September 2007 7:44:55 pm Jeff Cohan wrote: > > Dan Pa

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Ray
On Saturday 22 September 2007 7:44:55 pm Jeff Cohan wrote: > Dan Parry wrote: > > I might be wrong but this would be classed as > > 'exploitable'... Webservers should not be allowed > > to read from or write to clients... Of course there > > is ActiveX... > > I think we're off the point. > > My scr

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Dan Parry
> -Original Message- > From: Jeff Cohan [mailto:[EMAIL PROTECTED] > Sent: 23 September 2007 02:45 > To: php-general@lists.php.net > Subject: Re: [PHP] MAX_FILE_SIZE not working with file uploads > > > > Dan Parry wrote: > > I might be wrong but this wou

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Jeff Cohan
Dan Parry wrote: > I might be wrong but this would be classed as > 'exploitable'... Webservers should not be allowed > to read from or write to clients... Of course there > is ActiveX... I think we're off the point. My script is simply interrogating the value of the $_FILES[userfile][size] a

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Dan Parry
> -Original Message- > From: Jeff Cohan [mailto:[EMAIL PROTECTED] > Sent: 23 September 2007 00:02 > To: php-general@lists.php.net > Subject: Re: [PHP] MAX_FILE_SIZE not working with file uploads > > Chris wrote: > > [error] => 2 > > And also gives you

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Jeff Cohan
Chris wrote: > [error] => 2 > And also gives you an error code. Yes, I know and knew that. That's why the upload ultimately fails (which is okay). My point is that when a file's size exceeds the MAX_FILE_SIZE value, I want the browser to (a) detect that it's too large BEFORE attempting to upload

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-20 Thread Chris
And here is the dump of the $_FILES array (which, notably, reports zero as the size): [error] => 2 And also gives you an error code. http://www.php.net/manual/en/features.file-upload.errors.php -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailin

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-20 Thread Bastien Koert
Max file size is a hint to the browser and not all support it...you can't count on it bastien > To: php-general@lists.php.net> Date: Thu, 20 Sep 2007 14:45:36 -0500> From: > [EMAIL PROTECTED]> Subject: [PHP] MAX_FILE_SIZE not working with file > uploads> > Th

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-20 Thread Instruct ICC
In the To: php-general@lists.php.net> Date: Thu, 20 Sep 2007 14:45:36 -0500> From: [EMAIL PROTECTED]> Subject: [PHP] MAX_FILE_SIZE not working with file uploads>> The punchline question is: What am I missing?>> Now for the details.>> I have a form through which a u

RE: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-20 Thread Instruct ICC
In the _ More photos; more messages; more whatever – Get MORE with Windows Live™ Hotmail®. NOW with 5GB storage. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907 -- PHP General Mailing Li

[PHP] MAX_FILE_SIZE not working with file uploads

2007-09-20 Thread Jeff Cohan
The punchline question is: What am I missing? Now for the details. I have a form through which a user uploads image files. In the event the chosen file exceeds the MAX_FILE_SIZE (which I have included as a hidden form field immediately after the form tag), I want to abort the upload process and d

Re: [PHP] max_file_size

2005-07-12 Thread Richard Lynch
On Tue, July 12, 2005 11:10 am, Chris said: > The manual seems to imply that using MAX_FILE_SIZE will enable the > browser to recognize the fact that a user is trying to upload a file > that is too large and will, therefore, be able to give the user a > warning to prevent the uploading of a file th

Re: [PHP] max_file_size

2005-07-12 Thread Chris
André Medeiros wrote: On Tue, 2005-07-12 at 12:38 -0400, John Nichel wrote: Sebastian wrote: it doesnt seem to work on IE or Firefox.. two of the most popular browsers.. this shoudn't even be in the manual then because if it doesnt work for these two browsers then i would consider it

Re: [PHP] max_file_size

2005-07-12 Thread André Medeiros
On Tue, 2005-07-12 at 12:38 -0400, John Nichel wrote: > Sebastian wrote: > > > it doesnt seem to work on IE or Firefox.. two of the most popular > > browsers.. > > this shoudn't even be in the manual then because if it doesnt work for > > these two browsers then i would consider it pointless to

Re: [PHP] max_file_size

2005-07-12 Thread John Nichel
Sebastian wrote: it doesnt seem to work on IE or Firefox.. two of the most popular browsers.. this shoudn't even be in the manual then because if it doesnt work for these two browsers then i would consider it pointless to use. It may not be your browser that it's not working with...it may be

Re: [PHP] max_file_size

2005-07-12 Thread Sebastian
Ahmed Saad wrote: hi Sebastain, On 7/12/05, Sebastian <[EMAIL PROTECTED]> wrote: yet it waits for file to upload before error. I've been using php for serveral years and i cant remember ever getting this to work like the manual states. Quoting the *php manual* "The MAX_FILE_SIZE hid

Re: [PHP] max_file_size

2005-07-12 Thread André Medeiros
On Tue, 2005-07-12 at 11:35 -0400, Sebastian wrote: > Each time i try setting MAX_FILE_SIZE in a form and using the upload > error code to check if the file is large it always uploads the entire > file before showing the error that the file is too big.. either the > manual is incorrect or this d

Re: [PHP] max_file_size

2005-07-12 Thread Mikey
Sebastian wrote: Each time i try setting MAX_FILE_SIZE in a form and using the upload error code to check if the file is large it always uploads the entire file before showing the error that the file is too big.. either the manual is incorrect or this does not work as every method i've tried

[PHP] max_file_size

2005-07-12 Thread Sebastian
Each time i try setting MAX_FILE_SIZE in a form and using the upload error code to check if the file is large it always uploads the entire file before showing the error that the file is too big.. either the manual is incorrect or this does not work as every method i've tried always waits for th

Re: [PHP] MAX_FILE_SIZE

2004-07-30 Thread Jason Wong
On Saturday 31 July 2004 04:40, Monty wrote: > If the MAX_FILE_SIZE form variable doesn't prevent this, as the manual says > it should, then what's the point of using it? It's up to the browser whether or not it uses that setting, most don't. -- Jason Wong -> Gremlins Associates -> www.gremlins

[PHP] MAX_FILE_SIZE

2004-07-30 Thread Monty
This is what is says in the online php manual: ... You should add the MAX_FILE_SIZE form variable anyway as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer actually failed. ... The MAX_FILE_SIZE hidden field must precede the

Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread Toby Dacre
the problem with doing it on your server (you do it just to be sure though) is that the user has to wait for the form + file to be sent to your server before you can respond - this can be very slow ""JFL"" <[EMAIL PROTECTED]> wrote in message 9davlf$s63$[EMAIL PROTECTED]">news:9davlf$s63$[EMAIL

Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread JFL
Thanks :) -- [ www.eksperten.dk ] Scandinavias biggest IT forum. ""James Holloway"" <[EMAIL PROTECTED]> wrote in message 9db61u$7d9$[EMAIL PROTECTED]">news:9db61u$7d9$[EMAIL PROTECTED]... > Jacob, > > When you upload a file, it appends a few of its own variables. One of them > is size - assuming

Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread James Holloway
Jacob, When you upload a file, it appends a few of its own variables. One of them is size - assuming the file is a variable called $file: if ($file_size > $max_size) { echo $file_name . " was too big!"; } Also, you could check for Mime types. if ($file_type != "image/jpeg" || $file_type !

[PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread JFL
When I set and a user uploads a file bigger than 50 my script prints a warning. How can I use MAX_FILE_SIZE and avoid that warning so that I can print my own error message to the user ? :) Jacob -- [ www.eksperten.dk ] Scandinavias biggest IT forum. -- PHP General Mailing List (http://w