473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1701
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 août, 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 août, 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 août, 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 août, 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 août, 15:43, dkruger <davidkru...@techie.comwrote:
On Aug 9, 8:53 am, Defacta <vincent.margue...@gmail.comwrote:
On 9 août, 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tihon | last post by:
Hello! I again need your help, just can't understand whats going on. Got this upload pictures form and it's having problem handling large files (~1.5 - 2 MB). Everything works fine if i just...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
0
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancý kaynakli bir scriptti duzenledim yanlýz birseyin içinden bir turlu cýkamadým iþin aslý ilk defa persistin upload componentini kullanacam yanlýz suanki haliyle...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
5
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
4
by: MoroccoIT | last post by:
Greetings - I saw somewhat similar code (pls see link below) that does mupltiple files upload. It works fine, but I wanted to populate the database with the same files that are uploaded to...
1
by: achotto | last post by:
hi, i try to upload a multiple image files. after that i will rename the files name. the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.