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

Upload *huge* files, is it wise with PHP ?

Hello,

I need to allow an end user to upload video files on a server and in the
same time to put the file name and a few infos in a database. It must be
very simple for the end user, and uploading with a browser in a form
would be perfect since it allows to upload and fill a form in the same
time.

I'll have full control of the server (no max_size problem etc). The end
user connexion is ADSL, the server is on a 100mb internet connexion.

But I'm worried because the file upload by PHP (at least what I code
usually) will probably timeout (the files will be 200mo at least) or
have problems, and you can't resumean aborted transfert. FTP would be
better but it is not as simple for the end user, especially because he
has to give some more informations (style of the video, how long it has
to stay on the server etc) wich will be stored in the database..

What would you use to keep the operations easy, reliable and OS
independant ? Thanks for any suggestion

Stephane
PS: sorry for my weak english

--
Stephane
Please replace "INVALID" by "free" to send me an email.
Merci de remplacer "INVALID" par "free" pour m'envoyer un email.
Jul 17 '05 #1
5 11098
On 2003-12-12, Stephane <St******@INVALID.fr> wrote:
Hello,

I need to allow an end user to upload video files on a server and in the
same time to put the file name and a few infos in a database. It must be
very simple for the end user, and uploading with a browser in a form
would be perfect since it allows to upload and fill a form in the same
time.

I'll have full control of the server (no max_size problem etc). The end
user connexion is ADSL, the server is on a 100mb internet connexion.

But I'm worried because the file upload by PHP (at least what I code
usually) will probably timeout (the files will be 200mo at least) or
have problems, and you can't resumean aborted transfert. FTP would be
better but it is not as simple for the end user, especially because he
has to give some more informations (style of the video, how long it has
to stay on the server etc) wich will be stored in the database..

What would you use to keep the operations easy, reliable and OS
independant ? Thanks for any suggestion


ILHO is ftp the only way to go.
What you could do is let them just submit the text fields, once they
have done this, you provide them a "config file" that contains the
settings where things need to be uploaded...

Now the client only has to call a command like ftp < settings.txt
With a little program that has dnd support, the client would only have
to dnd the file over that program to start the upload....

--
verum ipsum factum
Jul 17 '05 #2
Regarding this well-known quote, often attributed to Tim Van Wassenhove's
famous "12 Dec 2003 09:45:01 GMT" speech:
On 2003-12-12, Stephane <St******@INVALID.fr> wrote:
Hello,

I need to allow an end user to upload video files on a server and in the
same time to put the file name and a few infos in a database. It must be
very simple for the end user, and uploading with a browser in a form
would be perfect since it allows to upload and fill a form in the same
time.

I'll have full control of the server (no max_size problem etc). The end
user connexion is ADSL, the server is on a 100mb internet connexion.

But I'm worried because the file upload by PHP (at least what I code
usually) will probably timeout (the files will be 200mo at least) or
have problems, and you can't resumean aborted transfert. FTP would be
better but it is not as simple for the end user, especially because he
has to give some more informations (style of the video, how long it has
to stay on the server etc) wich will be stored in the database..

What would you use to keep the operations easy, reliable and OS
independant ? Thanks for any suggestion


ILHO is ftp the only way to go.
What you could do is let them just submit the text fields, once they
have done this, you provide them a "config file" that contains the
settings where things need to be uploaded...

Now the client only has to call a command like ftp < settings.txt
With a little program that has dnd support, the client would only have
to dnd the file over that program to start the upload....


On that note, if you could put each user's files into a seperate directory
from the FTP, you could make it an only marginally more difficult process:

1.) They upload the file via FTP.
2.) When the upload completes, they go to the website and log in.
3.) They get a list of their "uploads" directory, and can pick one or more
files.
4.) After selecting the correct files, they go to a screen where they can
add the proper "tagging" information.
5.) The PHP script then...
o Moves the files to their proper place on the website (if needed)
o Associates the information with the file(s)
Hairballs you might have to watch out for are:
o Making sure the file is comepletely uploaded before moving it.
o If the file gets moved to a public area, watch for filename collisions.
Rename the files if needed, and make sure the tagging reflects the rename.
o Make sure no one can hijack the system and use it to "implant" files in
unauthorized areas.
Barring that, I think PERL, with its more "streaming" (versus PHPs "get the
upload, then process the output") treatment of POST data, has a few good
upload progress-bar scripts. It might be something to check out.

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #3
"Stephane" <St******@INVALID.fr> wrote in message
news:sl*********************@ernest.cheska.net...
Hello,

I need to allow an end user to upload video files on a server and in the
same time to put the file name and a few infos in a database. It must be
very simple for the end user, and uploading with a browser in a form
would be perfect since it allows to upload and fill a form in the same
time.

I'll have full control of the server (no max_size problem etc). The end
user connexion is ADSL, the server is on a 100mb internet connexion.

But I'm worried because the file upload by PHP (at least what I code
usually) will probably timeout (the files will be 200mo at least) or
have problems, and you can't resumean aborted transfert. FTP would be
better but it is not as simple for the end user, especially because he
has to give some more informations (style of the video, how long it has
to stay on the server etc) wich will be stored in the database..

What would you use to keep the operations easy, reliable and OS
independant ? Thanks for any suggestion

Stephane
PS: sorry for my weak english

--
Stephane
Please replace "INVALID" by "free" to send me an email.
Merci de remplacer "INVALID" par "free" pour m'envoyer un email.


Have you tried:

set_time_limit(0);

as the first line of your code?

sets unlimited time - or enter the time in seconds.

Jul 17 '05 #4
Regarding this well-known quote, often attributed to SwissCheese's famous
"Wed, 17 Dec 2003 11:00:48 GMT" speech:
"Stephane" <St******@INVALID.fr> wrote in message
news:sl*********************@ernest.cheska.net...
Hello,

I need to allow an end user to upload video files on a server and in the
same time to put the file name and a few infos in a database. It must be
very simple for the end user, and uploading with a browser in a form
would be perfect since it allows to upload and fill a form in the same
time.

I'll have full control of the server (no max_size problem etc). The end
user connexion is ADSL, the server is on a 100mb internet connexion.

But I'm worried because the file upload by PHP (at least what I code
usually) will probably timeout (the files will be 200mo at least) or
have problems, and you can't resumean aborted transfert. FTP would be
better but it is not as simple for the end user, especially because he
has to give some more informations (style of the video, how long it has
to stay on the server etc) wich will be stored in the database..

What would you use to keep the operations easy, reliable and OS
independant ? Thanks for any suggestion

Stephane
PS: sorry for my weak english

--
Stephane
Please replace "INVALID" by "free" to send me an email.
Merci de remplacer "INVALID" par "free" pour m'envoyer un email.


Have you tried:

set_time_limit(0);

as the first line of your code?

sets unlimited time - or enter the time in seconds.


Would that be "wise", though... if you made some accidental loop in your
code, that unlimited limit could pose quite a problem, non?

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #5
"FLEB" <so*********@mmers.and.evil.ones.will.bow-down-to.us> wrote in
message news:96*****************************@40tude.net...
Regarding this well-known quote, often attributed to SwissCheese's famous
"Wed, 17 Dec 2003 11:00:48 GMT" speech:
"Stephane" <St******@INVALID.fr> wrote in message
news:sl*********************@ernest.cheska.net...
Hello,

I need to allow an end user to upload video files on a server and in the same time to put the file name and a few infos in a database. It must be very simple for the end user, and uploading with a browser in a form
would be perfect since it allows to upload and fill a form in the same
time.

I'll have full control of the server (no max_size problem etc). The end
user connexion is ADSL, the server is on a 100mb internet connexion.

But I'm worried because the file upload by PHP (at least what I code
usually) will probably timeout (the files will be 200mo at least) or
have problems, and you can't resumean aborted transfert. FTP would be
better but it is not as simple for the end user, especially because he
has to give some more informations (style of the video, how long it has
to stay on the server etc) wich will be stored in the database..

What would you use to keep the operations easy, reliable and OS
independant ? Thanks for any suggestion

Stephane
PS: sorry for my weak english

--
Stephane
Please replace "INVALID" by "free" to send me an email.
Merci de remplacer "INVALID" par "free" pour m'envoyer un email.


Have you tried:

set_time_limit(0);

as the first line of your code?

sets unlimited time - or enter the time in seconds.


Would that be "wise", though... if you made some accidental loop in your
code, that unlimited limit could pose quite a problem, non?

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com


Well, that part of the equation is left up to the programmer of the
script. Take alook at this link:
http://us2.php.net/manual/en/feature...n-handling.php

Jul 17 '05 #6

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

Similar topics

2
by: Jeff Thies | last post by:
Hello, I (well someone else) need to upload large files. I had the Huge ASP upload installed (Pstruh). It came recommended here. Using the sample script I get this error when uploading: ...
32
by: Ray at | last post by:
I despise installing third party software on my workstations or servers. It is for this reason that I use componentless-upload for file uploads. This is no longer an option, and I have to...
7
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm"...
4
by: Jeff | last post by:
Our company has to find a way to transfer huge files, target is maximum of 6GB, between sites so we are looking to find the best way to do it. There are lots of criteria we need but the most...
2
by: Mike Kober | last post by:
I am having issues with the File Upload control for sending files to the server via HTTP. The speed of the upload is often between 20kbs and 40kbs. If I use the LAN at work to the server, it...
4
by: bienwell | last post by:
Hi all, I developed an web page in ASP.NET to upload file into the server. In the Web.config file, I declared <httpRuntime executionTimeout="1200" maxRequestLength="400000" /> The MAX...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
16
by: Lawrence Krubner | last post by:
To guard against our users possibly uploading huge files, I've got this in my php.ini file: ; Maximum size of POST data that PHP will accept. post_max_size = 10M On a server running Ubuntu...
7
by: Bobby Edward | last post by:
Are there any ASP.NET compatible controls out there that will allow you to upload large files, up to 2 gb? Prefer free of course. ;)
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.