Upload of bug files

Upload of bug files

am 09.08.2007 15:09:34 von vincent.marguerit

Hi,

I have set my max upload file to 200M by modifiying the php.ini file:
; Maximum allowed size for uploaded files.
upload_max_filesize = 200M

The function:
echo ini_get("upload_max_filesize") ;
display 200M.

But I cannot upload files bigger than 7N, and yet I have no error
message, the script of the form is executed as if the form where
empty !

Does anyone know how to upload big files in a

?

For exemple, if I put this at the beginning of the script:
copy($HTTP_POST_FILES['img']['tmp_name'],
$path_howsthat."/clients_imgs/toto.jpg") ;

It does not copy anything and there is no error message, also,
echo $HTTP_POST_FILES['img']['tmp_name'] is empty

Thanks,
Vincent.

Re: Upload of bug files

am 09.08.2007 15:34:38 von davidkruger

On Aug 9, 8:09 am, Defacta wrote:
> Hi,
>
> I have set my max upload file to 200M by modifiying the php.ini file:
> ; Maximum allowed size for uploaded files.
> upload_max_filesize = 200M
>
> The function:
> echo ini_get("upload_max_filesize") ;
> display 200M.
>
> But I cannot upload files bigger than 7N, and yet I have no error
> message, the script of the form is executed as if the form where
> empty !
>
> Does anyone know how to upload big files in a ?
>
> For exemple, if I put this at the beginning of the script:
> copy($HTTP_POST_FILES['img']['tmp_name'],
> $path_howsthat."/clients_imgs/toto.jpg") ;
>
> It does not copy anything and there is no error message, also,
> echo $HTTP_POST_FILES['img']['tmp_name'] is empty
>
> Thanks,
> Vincent.

hello, though it might not be the case with your problem, in your form
code on the page, make sure that you have then enctype is set
properly. In your form code, make sure it has a hidden field like
This
might help with the problem, worth a try anyway.

Re: Upload of bug files

am 09.08.2007 15:53:12 von vincent.marguerit

On 9 ao=FBt, 14:34, dkruger wrote:
> On Aug 9, 8:09 am, Defacta wrote:
>
>
>
> > Hi,
>
> > I have set my max upload file to 200M by modifiying the php.ini file:
> > ; Maximum allowed size for uploaded files.
> > upload_max_filesize =3D 200M
>
> > The function:
> > echo ini_get("upload_max_filesize") ;
> > display 200M.
>
> > But I cannot upload files bigger than 7N, and yet I have no error
> > message, the script of the form is executed as if the form where
> > empty !
>
> > Does anyone know how to upload big files in a ?
>
> > For exemple, if I put this at the beginning of the script:
> > copy($HTTP_POST_FILES['img']['tmp_name'],
> > $path_howsthat."/clients_imgs/toto.jpg") ;
>
> > It does not copy anything and there is no error message, also,
> > echo $HTTP_POST_FILES['img']['tmp_name'] is empty
>
> > Thanks,
> > Vincent.
>
> hello, though it might not be the case with your problem, in your form
> code on the page, make sure that you have then enctype is set
> properly. In your form code, make sure it has a hidden field like
> This
> might help with the problem, worth a try anyway.


Hi,

This is my form:
action=3D"done_index.php" enctype=3D'multipart/form-data' >
...The file input is:

...I have added this:


And the PHP code still does not work.
Even this code:
echo $HTTP_POST_FILES['img']['tmp_name'] ; // It does not display
anything !
copy($HTTP_POST_FILES['img']['tmp_name'],
$path_howsthat."/clients_imgs/test.jpg") ; // It does not copy
anything and no error message...

I don't know what to do, it's strange :(

Thanks,
Vincent.

Re: Upload of bug files

am 09.08.2007 16:34:56 von davidkruger

On Aug 9, 8:53 am, Defacta wrote:
> On 9 ao=FBt, 14:34, dkruger wrote:
>
>
>
>
>
> > On Aug 9, 8:09 am, Defacta wrote:
>
> > > Hi,
>
> > > I have set my max upload file to 200M by modifiying the php.ini file:
> > > ; Maximum allowed size for uploaded files.
> > > upload_max_filesize =3D 200M
>
> > > The function:
> > > echo ini_get("upload_max_filesize") ;
> > > display 200M.
>
> > > But I cannot upload files bigger than 7N, and yet I have no error
> > > message, the script of the form is executed as if the form where
> > > empty !
>
> > > Does anyone know how to upload big files in a ?
>
> > > For exemple, if I put this at the beginning of the script:
> > > copy($HTTP_POST_FILES['img']['tmp_name'],
> > > $path_howsthat."/clients_imgs/toto.jpg") ;
>
> > > It does not copy anything and there is no error message, also,
> > > echo $HTTP_POST_FILES['img']['tmp_name'] is empty
>
> > > Thanks,
> > > Vincent.
>
> > hello, though it might not be the case with your problem, in your form
> > code on the page, make sure that you have then enctype is set
> > properly. In your form code, make sure it has a hidden field like
> > This
> > might help with the problem, worth a try anyway.
>
> Hi,
>
> This is my form:
> > action=3D"done_index.php" enctype=3D'multipart/form-data' >
> ...The file input is:
>
> ...I have added this:
>
>
> And the PHP code still does not work.
> Even this code:
> echo $HTTP_POST_FILES['img']['tmp_name'] ; // It does not display
> anything !
> copy($HTTP_POST_FILES['img']['tmp_name'],
> $path_howsthat."/clients_imgs/test.jpg") ; // It does not copy
> anything and no error message...
>
> I don't know what to do, it's strange :(
>
> Thanks,
> Vincent.- Hide quoted text -
>
> - Show quoted text -

that is strange...wherever the files are supposed to be saved, are you
sure you have the correct permissions setup for the apache user
(whatever user is used for running your web server) is setup to be
able to write to it?

Re: Upload of bug files

am 09.08.2007 16:37:53 von davidkruger

On Aug 9, 8:53 am, Defacta wrote:
> On 9 ao=FBt, 14:34, dkruger wrote:
>
>
>
>
>
> > On Aug 9, 8:09 am, Defacta wrote:
>
> > > Hi,
>
> > > I have set my max upload file to 200M by modifiying the php.ini file:
> > > ; Maximum allowed size for uploaded files.
> > > upload_max_filesize =3D 200M
>
> > > The function:
> > > echo ini_get("upload_max_filesize") ;
> > > display 200M.
>
> > > But I cannot upload files bigger than 7N, and yet I have no error
> > > message, the script of the form is executed as if the form where
> > > empty !
>
> > > Does anyone know how to upload big files in a ?
>
> > > For exemple, if I put this at the beginning of the script:
> > > copy($HTTP_POST_FILES['img']['tmp_name'],
> > > $path_howsthat."/clients_imgs/toto.jpg") ;
>
> > > It does not copy anything and there is no error message, also,
> > > echo $HTTP_POST_FILES['img']['tmp_name'] is empty
>
> > > Thanks,
> > > Vincent.
>
> > hello, though it might not be the case with your problem, in your form
> > code on the page, make sure that you have then enctype is set
> > properly. In your form code, make sure it has a hidden field like
> > This
> > might help with the problem, worth a try anyway.
>
> Hi,
>
> This is my form:
> > action=3D"done_index.php" enctype=3D'multipart/form-data' >
> ...The file input is:
>
> ...I have added this:
>
>
> And the PHP code still does not work.
> Even this code:
> echo $HTTP_POST_FILES['img']['tmp_name'] ; // It does not display
> anything !
> copy($HTTP_POST_FILES['img']['tmp_name'],
> $path_howsthat."/clients_imgs/test.jpg") ; // It does not copy
> anything and no error message...
>
> I don't know what to do, it's strange :(
>
> Thanks,
> Vincent.- Hide quoted text -
>
> - Show quoted text -

One more thing to try, in your form code, you may want to remove the
value setting for your file form field, since as far as I know, there
is no way to set a default value on a file upload field anyway.

Re: Upload of bug files

am 09.08.2007 16:43:42 von davidkruger

On Aug 9, 8:53 am, Defacta wrote:
> On 9 ao=FBt, 14:34, dkruger wrote:
>
>
>
>
>
> > On Aug 9, 8:09 am, Defacta wrote:
>
> > > Hi,
>
> > > I have set my max upload file to 200M by modifiying the php.ini file:
> > > ; Maximum allowed size for uploaded files.
> > > upload_max_filesize =3D 200M
>
> > > The function:
> > > echo ini_get("upload_max_filesize") ;
> > > display 200M.
>
> > > But I cannot upload files bigger than 7N, and yet I have no error
> > > message, the script of the form is executed as if the form where
> > > empty !
>
> > > Does anyone know how to upload big files in a ?
>
> > > For exemple, if I put this at the beginning of the script:
> > > copy($HTTP_POST_FILES['img']['tmp_name'],
> > > $path_howsthat."/clients_imgs/toto.jpg") ;
>
> > > It does not copy anything and there is no error message, also,
> > > echo $HTTP_POST_FILES['img']['tmp_name'] is empty
>
> > > Thanks,
> > > Vincent.
>
> > hello, though it might not be the case with your problem, in your form
> > code on the page, make sure that you have then enctype is set
> > properly. In your form code, make sure it has a hidden field like
> > This
> > might help with the problem, worth a try anyway.
>
> Hi,
>
> This is my form:
> > action=3D"done_index.php" enctype=3D'multipart/form-data' >
> ...The file input is:
>
> ...I have added this:
>
>
> And the PHP code still does not work.
> Even this code:
> echo $HTTP_POST_FILES['img']['tmp_name'] ; // It does not display
> anything !
> copy($HTTP_POST_FILES['img']['tmp_name'],
> $path_howsthat."/clients_imgs/test.jpg") ; // It does not copy
> anything and no error message...
>
> I don't know what to do, it's strange :(
>
> Thanks,
> Vincent.- Hide quoted text -
>
> - Show quoted text -

Try this, instead of using $HTTP_POST_FILES, use just $_FILES['img']
['tmp_name'], anything show up there?

Re: Upload of bug files

am 09.08.2007 18:10:43 von vincent.marguerit

On 9 ao=FBt, 15:43, dkruger wrote:
> On Aug 9, 8:53 am, Defacta wrote:
>
>
>
> > On 9 ao=FBt, 14:34, dkruger wrote:
>
> > > On Aug 9, 8:09 am, Defacta wrote:
>
> > > > Hi,
>
> > > > I have set my max upload file to 200M by modifiying the php.ini fil=
e:
> > > > ; Maximum allowed size for uploaded files.
> > > > upload_max_filesize =3D 200M
>
> > > > The function:
> > > > echo ini_get("upload_max_filesize") ;
> > > > display 200M.
>
> > > > But I cannot upload files bigger than 7N, and yet I have no error
> > > > message, the script of the form is executed as if the form where
> > > > empty !
>
> > > > Does anyone know how to upload big files in a ?
>
> > > > For exemple, if I put this at the beginning of the script:
> > > > copy($HTTP_POST_FILES['img']['tmp_name'],
> > > > $path_howsthat."/clients_imgs/toto.jpg") ;
>
> > > > It does not copy anything and there is no error message, also,
> > > > echo $HTTP_POST_FILES['img']['tmp_name'] is empty
>
> > > > Thanks,
> > > > Vincent.
>
> > > hello, though it might not be the case with your problem, in your form
> > > code on the page, make sure that you have then enctype is set
> > > properly. In your form code, make sure it has a hidden field like
> > > Th=
is
> > > might help with the problem, worth a try anyway.
>
> > Hi,
>
> > This is my form:
> > > > action=3D"done_index.php" enctype=3D'multipart/form-data' >
> > ...The file input is:
> >
> > ...I have added this:
> >
>
> > And the PHP code still does not work.
> > Even this code:
> > echo $HTTP_POST_FILES['img']['tmp_name'] ; // It does not display
> > anything !
> > copy($HTTP_POST_FILES['img']['tmp_name'],
> > $path_howsthat."/clients_imgs/test.jpg") ; // It does not copy
> > anything and no error message...
>
> > I don't know what to do, it's strange :(
>
> > Thanks,
> > Vincent.- Hide quoted text -
>
> > - Show quoted text -
>
> Try this, instead of using $HTTP_POST_FILES, use just $_FILES['img']
> ['tmp_name'], anything show up there?

ok, I have found why it was not working...Actually you have to modify
2 parts of the php.ini file post_max_size and upload_max_filesize
which have been set to 60M and now it works. :)

Thanks for your help,
Vincent.

Re: Upload of bug files

am 09.08.2007 18:15:22 von luiheidsgoeroe

On Thu, 09 Aug 2007 15:09:34 +0200, Defacta > =

wrote:

> Hi,
>
> I have set my max upload file to 200M by modifiying the php.ini file:
> ; Maximum allowed size for uploaded files.
> upload_max_filesize =3D 200M
>
> The function:
> echo ini_get("upload_max_filesize") ;
> display 200M.
>
> But I cannot upload files bigger than 7N, and yet I have no error
> message, the script of the form is executed as if the form where
> empty !
>
> Does anyone know how to upload big files in a ?
>
> For exemple, if I put this at the beginning of the script:
> copy($HTTP_POST_FILES['img']['tmp_name'],
> $path_howsthat."/clients_imgs/toto.jpg") ;
>
> It does not copy anything and there is no error message, also,
> echo $HTTP_POST_FILES['img']['tmp_name'] is empty


1. set max_post_size equivalent or higher to upload_max_filesize.
2. make sure you have enough memory
3. make sure your form has the proper enctype (multipart/formdata).
4. use $_FILES instead of $HTTP_POST_FILES
5. make sure you upload directory exists, has the proper permissions, an=
d =

there is room left on th HD (either by permissions or actual space).

-- =

Rik Wasmus