Webmaster Forums 101 - Free Help and Discussions
 
 
 

MEMBER REWARDS - Earn free advertising by participating in these forums! Click here for details.

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.

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th May 2005, 12:46 PM   #11

Username: dvgulik
Rank: WF101 Newbie
Join Date: May 2005
Posts: 13
Points: 30.28
Default

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
dvgulik is offline   Reply With Quote
Old 12th May 2005, 01:02 PM   #12
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

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
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 12th May 2005, 03:30 PM   #13
Peter Sinclair's Avatar

Username: Peter Sinclair
Rank: Super Moderator
Join Date: Jan 2005
Location: Australia
Posts: 282
Points: 14.18
Default

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
Peter Sinclair is offline   Reply With Quote
Old 23rd June 2005, 10:26 AM   #14

Username: dvgulik
Rank: WF101 Newbie
Join Date: May 2005
Posts: 13
Points: 30.28
Default

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
dvgulik is offline   Reply With Quote
Old 23rd June 2005, 10:41 AM   #15
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Hey David,

This may help your problem. After the very first <?php add this:

PHP Code:
set_time_limit(0); 

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.
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 23rd June 2005, 10:58 AM   #16

Username: dvgulik
Rank: WF101 Newbie
Join Date: May 2005
Posts: 13
Points: 30.28
Default

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...
dvgulik is offline   Reply With Quote
Old 23rd June 2005, 11:43 AM   #17
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

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).
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 23rd June 2005, 05:00 PM   #18

Username: dvgulik
Rank: WF101 Newbie
Join Date: May 2005
Posts: 13
Points: 30.28
Default

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
dvgulik is offline   Reply With Quote
Old 24th June 2005, 12:56 PM   #19
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

That set_time_limit(0); normally does the job. Hopefully you can work it out Asking your webhost is always a good way.
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 2nd November 2006, 04:48 AM   #20

Username: yaldex
Rank: WF101 Newbie
Join Date: Nov 2006
Posts: 2
Points: 14.04
Default

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
__________________
Fine JavaScript Debugger
yaldex is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Login
User Name
Password


Featured Members


Featured Links


Useful Resources
Webmaster Resources
Developers Tools
Developer Tutorials


Partners

All times are GMT +10. The time now is 08:29 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.3.2
 
 
WEBMASTER FORUMS 101
ARCHIVE
CONTACT US
TOP
   
© Webmaster Forums 101 2005. All Rights Reserved.
Design by: vBCore