473,413 Members | 1,764 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,413 software developers and data experts.

Upload problem


I have a file upload set up from a form, which works fine with small
files (6k) but fails silently with larger ones (16k and up).

The form has:

<input type="hidden" name="MAX_FILE_SIZE" value="1000000">

and the script handling the uploads has:

set_time_limit(3000); // no difference with set_time_limit(0)
ignore_user_abort(true);

which should provide ample time for whatever needs to happen. The sever is
not running under safe mode.

When the upload fails, nothing happens in the browser: after the files
appear to have been sent (as measured by the time it takes for activity to
stop on my line monitor), the original form is still there, and I see no
error message.

What could be the cause of such behavior?

Pierre
--
Pierre Jelenc | H o m e O f f i c e R e c o r d s
| * Marwood * The Cucumbers *
T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
www.thegigometer.com | www.homeofficerecords.com
Jul 16 '05 #1
6 2635
Pierre Jelenc wrote:
When the upload fails, nothing happens in the browser: after the files
appear to have been sent (as measured by the time it takes for activity to
stop on my line monitor), the original form is still there, and I see no
error message.

What could be the cause of such behavior?

No idea

put

<?php
echo '<pre>POST'; print_r($_POST);
echo '<br />FILES'; print_r($_FILES);
echo '</pre>';
?>

in the part of your script that handles the uploads to
test/verify/debug the posting process.
--
"Yes, I'm positive."
"Are you sure?"
"Help, somebody has stolen one of my electrons!"
Two atoms are talking:
Jul 16 '05 #2
Pedro <he****@hotpop.com> writes:

<?php
echo '<pre>POST'; print_r($_POST);
echo '<br />FILES'; print_r($_FILES);
echo '</pre>';
?>

in the part of your script that handles the uploads to
test/verify/debug the posting process.


When the upload works, the results are as expected, for example:

POST
Array
(
[MAX_FILE_SIZE] => 1000000
[title] => test upload
[submit] => Save
)

FILES
Array
(
[slide] => Array
(
[name] => emmaandtata.jpg
[type] => image/jpeg
[tmp_name] => /tmp/phpSy5sPq
[error] => 0
[size] => 6616
)

)
With a larger file, as I said before, I get nothing, the script is not
executed at all.

Pierre
--
Pierre Jelenc | H o m e O f f i c e R e c o r d s
| * Marwood * The Cucumbers *
T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
www.thegigometer.com | www.homeofficerecords.com
Jul 16 '05 #3
Pierre Jelenc wrote:
[...]
With a larger file, as I said before, I get nothing, the script is not
executed at all.


What values do you have in PHP.INI for

post_max_size
upload_max_filesize

--
"Yes, I'm positive."
"Are you sure?"
"Help, somebody has stolen one of my electrons!"
Two atoms are talking:
Jul 16 '05 #4
Pedro <he****@hotpop.com> writes:

What values do you have in PHP.INI for

post_max_size
8M
upload_max_filesize


7M

Pierre
--
Pierre Jelenc | H o m e O f f i c e R e c o r d s
| * Marwood * The Cucumbers *
T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
www.thegigometer.com | www.homeofficerecords.com
Jul 16 '05 #5
Pierre Jelenc wrote:
Pedro <he****@hotpop.com> writes:

What values do you have in PHP.INI for

post_max_size


8M
upload_max_filesize


7M

Pierre


fishing ...

can you upload large files (16k :) to other servers?
does the server log have anything about the failed upload?

--
"Yes, I'm positive."
"Are you sure?"
"Help, somebody has stolen one of my electrons!"
Two atoms are talking:
Jul 16 '05 #6
Pedro <he****@hotpop.com> writes:

can you upload large files (16k :) to other servers?
Yes, to 2 others.
does the server log have anything about the failed upload?


Nothing. The POST request is in the access log, but without any indication
of a problem, and the error log has nothing.

Pierre
--
Pierre Jelenc | H o m e O f f i c e R e c o r d s
| * Marwood * The Cucumbers *
T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
www.thegigometer.com | www.homeofficerecords.com
Jul 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: lawrence | last post by:
I've been using the following function (yes, it is inelegant, what can I say, I wrote it a long time ago) to upload images. Haven't had a problem with it for at least a year, and I don't recall...
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: NohaKhalifa | last post by:
Dear All; I'm developing a web site and i need to make adminisration for this site it's a site for Real Estates . But I don't need the administration to be online .. I want them to fill data...
2
by: Gary \(Girish\) | last post by:
Hello: I am using SA-FileUp to enable members to upload their product images to my ISP sever. When member uploaded a new image file, the file name is replaced with the member ID and the old file...
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...
1
by: Alex | last post by:
I am having issues with a script to upload files from a client to a webserver. The problem is not with the actual upload but with where it uploads. The whole process is supposed to create a...
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...
6
by: Vic Spainhower | last post by:
Hello, I am trying to do a FTP file upload which works fine on my localhost but on my ISP server it fails. I can't seem to find where I can go to find the specific cause of the failure. In both...
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"...
2
by: printline | last post by:
Hi' all I have a strange problem when uploading files from a form to my ftp site. Here is my code: <?php $myFile = $_FILES; // This will make an array out of the file information that was...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.