| |
Welcome to Webmaster Forums 101!
You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact support.
|
 |
|
12th May 2005, 12:46 PM
|
#11
|
Join Date: May 2005
Posts: 13
Points: 30.28
|
That worked - thanks!
The only problem is the animated gif "stalls" while the file's being uploaded! It's like it's stuck on pause as the file is being uploaded...
Not a big deal, even just having the text "Please wait while the file uploads" appear accomplishes the same thing.
Thanks again Mr. Tech - if you're ever in British Columbia, Canada, I owe you a beer! (or several)
-D
|
|
|
12th May 2005, 01:02 PM
|
#12
|
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
|
I think it's not working because the page is in the middle of changing over to the thank you page... I don't know if there is anyway around this... Keep playing with it and see if you can work it out though. Text may just be the best option.
Glad to help 
|
|
|
12th May 2005, 03:30 PM
|
#13
|
Join Date: Jan 2005
Location: Australia
Posts: 282
Points: 14.18
|
Yep that would be the reason. Once the button is clicked the browser loads the target page. However the browser seems to "freezes" the page...
__________________
Peter Sinclair
http://www.motivationalmemo.com/
Motivational author and speaker, has created many powerful motivational tools that have been designed to empower your life. Thousands have already benefited from his books and ezines. And as Peter says, "When life requests an answer, shout 'YES!'"
Australia Website Designers
|
|
|
23rd June 2005, 10:26 AM
|
#14
|
Join Date: May 2005
Posts: 13
Points: 30.28
|
Hello again!
Well well... I've been using this method successfully for a while now, but have run into a new problem I was hoping someone might have an answer to...
The file-uploading works flawlessly with small to medium sized files, but when you try to upload files that are, say, around 50Mb and up, the browser page always 'times-out' before it can finish uploading.
Is there any way to work around this?
Thank you kindly!
David
|
|
|
23rd June 2005, 10:41 AM
|
#15
|
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
|
Hey David,
This may help your problem. After the very first <?php add this:
E.g:
PHP Code:
<?php
set_time_limit(0);
// other php below this...
You only need to add it once. Let me know if this works for you.
|
|
|
23rd June 2005, 10:58 AM
|
#16
|
Join Date: May 2005
Posts: 13
Points: 30.28
|
Thanks Mr. Tech!
I tried it out, and it doesn't seem to make a difference. I tried it with the value "0", and also with different values, eg:
<?php
set_time_limit(300);
Still times out after about 30 seconds...
|
|
|
23rd June 2005, 11:43 AM
|
#17
|
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
|
30 seconds is the default time limit in php, so I'm guessing your override didn't work. Maybe the server runs in safe_mode and doesn't allow scripts to override the time limit? Does it produce any warning? If you have warnings turned off, turn them on at the beginning of the script with error_reporting(E_ALL).
|
|
|
23rd June 2005, 05:00 PM
|
#18
|
Join Date: May 2005
Posts: 13
Points: 30.28
|
Hmm, I'm not 100% certain, but I don't think safe mode is on. When the upload times out in Explorer, I get the usual "The page cannot be displayed" message. When it times out in Firefox, however, I get a pop-up Alert that says "The document contains no data"...
I was doing some reading, and there may be a setting in the php.ini file that needs to be adjusted to allow for a longer period of time before upload timeout occurs. The website I have this funcationality on is with a hosting company so maybe I'll check with them to see if they can fiddle with that.
I was hoping there would be a quick n' dirty workaround, but alas...
Thanks again for your help, I really appreciate it!
David
|
|
|
24th June 2005, 12:56 PM
|
#19
|
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
|
That set_time_limit(0); normally does the job. Hopefully you can work it out  Asking your webhost is always a good way.
|
|
|
2nd November 2006, 04:48 AM
|
#20
|
Join Date: Nov 2006
Posts: 2
Points: 14.04
|
This is the code iam using,
Code:
<?php if(isset($_POST["test"])){
print_r($_FILES);
}
?>
<form name="frmImg" method="post" enctype="multipart/form-data">
<input type="File" name="assetUpload">
<input type="submit" name="test">
</form>
the php.ini settings is
file_uploads On
upload_max_filesize 2M
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
| Useful Resources |
| Webmaster Resources |
| |
| Developers Tools |
| |
| Developer Tutorials |
| |
|
All times are GMT +10. The time now is 09:02 AM.
|
|