Current location: Hot Scripts Forums » General Community » Script Requests » PHP Upload script - with refresh


PHP Upload script - with refresh

Reply
  #1 (permalink)  
Old 08-05-08, 03:07 PM
hypnotic_monkey hypnotic_monkey is offline
Newbie Coder
 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Spin PHP Upload script - with refresh

I have looked around loads (and tried quite a few) of php upload scripts but havnt found the right one (or atleast dont think i have)....

I want users to be able to upload large music files (.mp3) to their account, but i have a php timeout on my server which cannot be changed, so need a script that refreshes the page to avoid it timeing out, idealy with a percentage bar so they dont think it has crashed.....

Can some1 link me to one or help me sort one out?

Any help greatly apreciated!
cheers.
Reply With Quote
  #2 (permalink)  
Old 08-05-08, 11:24 PM
id10tn00b's Avatar
id10tn00b id10tn00b is offline
Newbie Coder
 
Join Date: Oct 2004
Location: new mexico
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
is it a time out or are you talking about the time to run a script? there is a setting in the php.ini file that specify the max length of time a script can run and then it will be force stopped. to prevent a DoS situation loading an infinite loop script several times and therefore crashing the server.

also, on uploading, there is a value specified in the php.ini that sets a max upload size so that someone cant upload files in a single run of the script that is larger than $x. i thought it meant each file til i made my upload form and if the total of all 10 files was over the specified amount, it wouldnt upload.

hope this helps.
__________________
http://www.yougetalife.com
i <?php therefore $i == am;
http://www.coredumpcomputerservice.com
Reply With Quote
  #3 (permalink)  
Old 08-06-08, 04:05 AM
hypnotic_monkey hypnotic_monkey is offline
Newbie Coder
 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Server settings:

safe mode = off
memory_limit = 64M MAXIMUM
max_execution_time = 30 MAXIMUM
post_max_size = 64M MAXIMUM
upload_max_filesize = 64M MAXIMUM
enable_dl = Off

so is there no way round this? without getting a dedicated server?
cheers.
Reply With Quote
  #4 (permalink)  
Old 08-06-08, 05:55 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
Try looking for an swf file uploader. These are flash based uploaders that will upload the file, and on completion, usually does a form submit and from there you can get php to finish processing the file (moving, renaming, whatever).

I've used these in the past to get around this. I don't have a specific one as an example, but if you google for it, you'll find them.

Also, depending on how the server is configured, sometimes the php settings can be overwritten using htaccess or php.ini files.
Reply With Quote
  #5 (permalink)  
Old 08-09-08, 07:23 PM
hypnotic_monkey hypnotic_monkey is offline
Newbie Coder
 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
I found a good swf uploader if anyone else is interested... shame i have a 64mb upload limit

It worked for a 40mb file which the old php form failed at!
Will have to do more thorough testing....

Flash Uploader by Solmetra

cheers!
Reply With Quote
  #6 (permalink)  
Old 08-11-08, 08:02 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
Ugh, uploading mp3s over 64 megs? Why would you??

but thanks for sharing the link!!
Reply With Quote
  #7 (permalink)  
Old 08-11-08, 08:26 AM
hypnotic_monkey hypnotic_monkey is offline
Newbie Coder
 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bizzar528 View Post
Ugh, uploading mp3s over 64 megs? Why would you??
haha mixes mate, my site offeres unsigned DJs the ability to upload their work and share it with the world

take it ez
Reply With Quote
  #8 (permalink)  
Old 08-14-08, 10:54 AM
phillyhotshots phillyhotshots is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Philadelphia
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Google Gears allows you to accept large file uploads by splitting the file into small pieces. If the upload fails for some reason, then Google Gears resumes uploading from that failed piece of information.

Otherwise check out JFileUpload, which is a client side Java Applet. Although it starts at $29.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a File Upload Script. ryanjantz Script Requests 1 05-08-08 01:33 PM
trying to find a php script to be able to limit inventory in and eshop debidreams HotScripts Site Bug Reports 0 09-10-05 12:36 PM
move files around an ftp server, with php file upload script? wapchimp PHP 2 12-19-04 07:27 AM
Run PHP Script Within PHP Script Reg PHP 1 06-29-04 09:09 AM


All times are GMT -5. The time now is 09:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.