472,983 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 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 11061
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.