By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,965 Members | 1,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,965 IT Pros & Developers. It's quick & easy.

Upload problem

P: n/a

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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.