469,575 Members | 1,662 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Upload of bug files

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 <form?

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.

Aug 9 '07 #1
7 1590
On Aug 9, 8:09 am, Defacta <vincent.margue...@gmail.comwrote:
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 <form?

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
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000"This
might help with the problem, worth a try anyway.

Aug 9 '07 #2
On 9 aot, 14:34, dkruger <davidkru...@techie.comwrote:
On Aug 9, 8:09 am, Defacta <vincent.margue...@gmail.comwrote:
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 <form?
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
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000"This
might help with the problem, worth a try anyway.

Hi,

This is my form:
<form id="update_item" name="update_item" method="post"
action="done_index.php" enctype='multipart/form-data' >
....The file input is:
<input type="file" size="30" name="img" value="">
....I have added this:
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000">

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.

Aug 9 '07 #3
On Aug 9, 8:53 am, Defacta <vincent.margue...@gmail.comwrote:
On 9 aot, 14:34, dkruger <davidkru...@techie.comwrote:


On Aug 9, 8:09 am, Defacta <vincent.margue...@gmail.comwrote:
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 <form?
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
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000"This
might help with the problem, worth a try anyway.

Hi,

This is my form:
<form id="update_item" name="update_item" method="post"
action="done_index.php" enctype='multipart/form-data' >
...The file input is:
<input type="file" size="30" name="img" value="">
...I have added this:
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000">

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?

Aug 9 '07 #4
On Aug 9, 8:53 am, Defacta <vincent.margue...@gmail.comwrote:
On 9 aot, 14:34, dkruger <davidkru...@techie.comwrote:


On Aug 9, 8:09 am, Defacta <vincent.margue...@gmail.comwrote:
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 <form?
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
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000"This
might help with the problem, worth a try anyway.

Hi,

This is my form:
<form id="update_item" name="update_item" method="post"
action="done_index.php" enctype='multipart/form-data' >
...The file input is:
<input type="file" size="30" name="img" value="">
...I have added this:
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000">

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.

Aug 9 '07 #5
On Aug 9, 8:53 am, Defacta <vincent.margue...@gmail.comwrote:
On 9 aot, 14:34, dkruger <davidkru...@techie.comwrote:


On Aug 9, 8:09 am, Defacta <vincent.margue...@gmail.comwrote:
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 <form?
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
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000"This
might help with the problem, worth a try anyway.

Hi,

This is my form:
<form id="update_item" name="update_item" method="post"
action="done_index.php" enctype='multipart/form-data' >
...The file input is:
<input type="file" size="30" name="img" value="">
...I have added this:
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000">

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?

Aug 9 '07 #6
On 9 aot, 15:43, dkruger <davidkru...@techie.comwrote:
On Aug 9, 8:53 am, Defacta <vincent.margue...@gmail.comwrote:
On 9 aot, 14:34, dkruger <davidkru...@techie.comwrote:
On Aug 9, 8:09 am, Defacta <vincent.margue...@gmail.comwrote:
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 <form?
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
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000"This
might help with the problem, worth a try anyway.
Hi,
This is my form:
<form id="update_item" name="update_item" method="post"
action="done_index.php" enctype='multipart/form-data' >
...The file input is:
<input type="file" size="30" name="img" value="">
...I have added this:
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="200000000">
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.

Aug 9 '07 #7
Rik
On Thu, 09 Aug 2007 15:09:34 +0200, Defacta <vi***************@gmail.com
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 <form?

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, and
there is room left on th HD (either by permissions or actual space).

--
Rik Wasmus
Aug 9 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tihon | last post: by
3 posts views Thread by dave | last post: by
reply views Thread by SEMIH DEMIR | last post: by
9 posts views Thread by Wayne Smith | last post: by
7 posts views Thread by pbd22 | last post: by
5 posts views Thread by camphor | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.