Re: [PHP] uploading really big files

2007-06-02 Thread Alexander Jaeger

Angelo Zanetti schrieb:



clive wrote:

Angelo Zanetti wrote:

Dear all

We need to develop a system where we can upload really big files. IE 
15 - 25 Mb.


I know its not a php answer, but if you have ever uploaded a file 
with facebook then you will have seen the little applet they push 
down to your browser, perhaps investigating something like might 
prove useful, I doubt they wrote it themselves, then again maybe they 
did.



yeah seen that its a Java applet was going to research it but didnt 
have time. Quite a cool component though!


Thanks


Hello List,

i think an upload of 15 - 25 MB is not that big, just depends on which 
kind of customers you rely,


in Sweden for an instance is an 100 Mbit line a normal thing for a home 
user.


For a Video plattform we use a an Flash upload formular that posts to an 
php file, works up to 120MB like a charm (we just havent test  120MB, 
but it should also work)


Options

- Give them FTP or SCP or something that is more stable and will re-try.

- *SCP* (http://en.wikipedia.org/wiki/Secure_copy)
SCP ?!? an shell account for an unkown person on a server?
NO DONT DO THAT!!!
the only way to secure scp running normal envirements is to set 
a chroot, and that is way to much effort for a system  5 users.

(http://sublimation.org/scponly/wiki/index.php/Main_Page)
the least thing you would have to worry about is that your 
server is becoming a spam nest.
   


- *FTP  *
could work depending on the requirements you have.
Try Proftpd it has an easy way to integrate mysql.
 (http://www.proftpd.org/)
Also try enabling SSL/TLS to keep some privacy.

- *Flash *:
   There a lot of Tutorials out there, try google or sourceforge.
  
  
(http://sourceforge.net/search/?type_of_search=softwords=flash+upload+php)


   the important settings within php is as mentioned memory_limit 
as the file gets sucked in,
   post_max_size and upload_max_filesize as php denies file larger 
than these settings.


   By the way as mentioned before, alot of ram is require, but 
there is nothing you couldnt throw hardware at.


   Also try playing around with safemode, set an upload dir where 
the filesystem has no exec rights.

   (if somebody uploads a script like sh or bash or what ever)

   Dont place the upload within your webroot, or they will be 
accessable from the 'outside'.


   Dont take for granted that the user uploads a file that you like 
him to upload, test the file, copy the file, make filechecks on the type 
(not just the normal is '.wmv' within the filename), keep in mind which 
user on your system runs the php script.


   If you run cronjobs with the uploaded stuff, dont do it with root.

/Options

My Opinion
- The browser gets tired of waiting around for the upload to complete
- because your server is too slow/busy, and the user has a very bad
- experience.

   I think that statement is totally wrong, we have all seen the success an 
plattform like youtube made, and they do it no other way.
	if you have a server that is to slow/busy - get a another one, or a new Administrator (if it is config based) 


/My Opinion



As a summary, think about what you want to do, it is possible, but as 
mentioned by beware of the side effects.



Oh long post

Cheers,
Alex








Re: [PHP] uploading really big files

2007-06-02 Thread Richard Lynch
On Sat, June 2, 2007 8:38 am, Alexander Jaeger wrote:
 - Give them FTP or SCP or something that is more stable and will
 re-try.

 - *SCP* (http://en.wikipedia.org/wiki/Secure_copy)
  SCP ?!? an shell account for an unkown person on a server?
  NO DONT DO THAT!!!
  the only way to secure scp running normal envirements is to
 set
 a chroot, and that is way to much effort for a system  5 users.
  (http://sublimation.org/scponly/wiki/index.php/Main_Page)
  the least thing you would have to worry about is that your
 server is becoming a spam nest.

Depends who is doing the uploading...

One also could imagine a write-only account, either in FTP or SCP setup.

I know I've seen this in FTP, and I don't see any reason SCP couldn't.

 - *Flash *:
 There a lot of Tutorials out there, try google or sourceforge.

Leaves all your non-Flash users out in the cold, which to me is a
non-starter, but might be fine for the OP

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-06-02 Thread Alexander Jaeger



Depends who is doing the uploading...

One also could imagine a write-only account, either in FTP or SCP setup.

I know I've seen this in FTP, and I don't see any reason SCP couldn't.

  
the reason why scp is different is it needs an system account with a 
valid shell.

FTP does simply not (but it can :).

I think nobody except the root user should have shell access to a server,
only for security reasons.


- *Flash *:
There a lot of Tutorials out there, try google or sourceforge.



Leaves all your non-Flash users out in the cold, which to me is a
non-starter, but might be fine for the OP

  
There I totaly agree with you! But I require my user to have flash, same 
as i require them to have an graphical browser.


I can imagine where the internet would be with still browsing with lynx, 
but i guess that is a decision every developer has to face.


I guess the gap is between introducing people how to handle a ftp or scp 
transfer and installing flash.


I would go with the second choice.

Nevertheless, i see your point.

Thanks,
Alex


Re: [PHP] uploading really big files

2007-06-02 Thread Richard Lynch
On Sat, June 2, 2007 3:01 pm, Alexander Jaeger wrote:
 Depends who is doing the uploading...

 One also could imagine a write-only account, either in FTP or SCP
 setup.

 I know I've seen this in FTP, and I don't see any reason SCP
 couldn't.


 the reason why scp is different is it needs an system account with a
 valid shell.
 FTP does simply not (but it can :).

 I think nobody except the root user should have shell access to a
 server,
 only for security reasons.

Veering off the original topic quite a bit here, but...

I personally would refuse to work with any webhost who didn't give me
a shell account.

cron jobs, symlinks, large-scale file operations, and other
innumerable minor reasons make non-ssh web development a royal PITA
for me, personally.

So root-only shell is way too restrictive, imho.

 - *Flash *:
 There a lot of Tutorials out there, try google or
 sourceforge.


 Leaves all your non-Flash users out in the cold, which to me is a
 non-starter, but might be fine for the OP


 There I totaly agree with you! But I require my user to have flash,
 same
 as i require them to have an graphical browser.

 I can imagine where the internet would be with still browsing with
 lynx,
 but i guess that is a decision every developer has to face.

Um.

I tend to use Linux as my desktop, and gave up on Flash long ago.

Once I stopped installing it on Windows, I had a MUCH better online
experience, actually.

Websites are faster, no annoying random noises and fewer distracting
popups and the CPU and RAM usage finally is reasonable.

So I can't listen to bands on myspace.  big deal.

 I guess the gap is between introducing people how to handle a ftp or
 scp
 transfer and installing flash.

The gap is between a tiny percentage of users who CANNOT install
flash, period.

I don't know of any OS that doesn't have a large assortment of FTP
clients available.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-06-01 Thread clive

Angelo Zanetti wrote:

Dear all

We need to develop a system where we can upload really big files. IE 15 
- 25 Mb.


I know its not a php answer, but if you have ever uploaded a file with 
facebook then you will have seen the little applet they push down to 
your browser, perhaps investigating something like might prove useful, I 
doubt they wrote it themselves, then again maybe they did.



--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of 
this email. However, many were excited and some may well have enjoyed 
the experience.}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-06-01 Thread Angelo Zanetti



clive wrote:

Angelo Zanetti wrote:

Dear all

We need to develop a system where we can upload really big files. IE 
15 - 25 Mb.


I know its not a php answer, but if you have ever uploaded a file with 
facebook then you will have seen the little applet they push down to 
your browser, perhaps investigating something like might prove useful, 
I doubt they wrote it themselves, then again maybe they did.



yeah seen that its a Java applet was going to research it but didnt have 
time. Quite a cool component though!


Thanks

--

Angelo Zanetti
Systems developer


*Telephone:* +27 (021) 469 1052
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-31 Thread Angelo Zanetti



Richard Lynch wrote:

On Wed, May 30, 2007 8:47 am, Angelo Zanetti wrote:
  

We need to develop a system where we can upload really big files. IE
15
- 25 Mb.



You're pushing the limit on user patience and browser timeouts...

  

So I know you can set the limit of the upload thats not a problem, I
know a problem that we might experience is that the browser might time
out. Is there any way around this?



Nope.

The browser gets tired of waiting around for the upload to complete
because your server is too slow/busy, and the user has a very bad
experience.

file upload was grafted onto HTTP rather late in the game, and shows
the scars badly.

  

and also are there other problems I
might encounter?



Woof.

Yes, there are many problems you might encounter :-)

Users on slow/flaky connectionns will never have a good experience
with HTTP file upload.  Give them FTP or SCP or something that is more
stable and will re-try.

You also have to consider what users might choose to upload that is
not what you wanted.  There are all kinds of people out there looking
to upload interesting content that you don't actually want, most
likely.

There is a Flikr book out there that might have some insight for you. 
They obviously dealt with this already, and wrote a whole book all

about Flikr, so it's probably got something in there covering this.

  
thanks for the replies. But how does a site like: 
http://www.yousendit.com/ do the upload of really huge files?

Normal upload?

thanks

--

Angelo Zanetti
Systems developer


*Telephone:* +27 (021) 469 1052
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-31 Thread Angelo Zanetti



Zoltán Németh wrote:

2007. 05. 30, szerda keltezéssel 15.47-kor Angelo Zanetti ezt írta:
  

Dear all

We need to develop a system where we can upload really big files. IE 15 
- 25 Mb.
So I know you can set the limit of the upload thats not a problem, I 
know a problem that we might experience is that the browser might time 
out. Is there any way around this? and also are there other problems I 
might encounter?



http://www.php.net/manual/en/ref.info.php#ini.max-execution-time

  

yes it does!

thanks

cheers




  


--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-31 Thread Dimiter Ivanov

On 5/30/07, Angelo Zanetti [EMAIL PROTECTED] wrote:

Dear all

We need to develop a system where we can upload really big files. IE 15
- 25 Mb.
So I know you can set the limit of the upload thats not a problem, I
know a problem that we might experience is that the browser might time
out. Is there any way around this? and also are there other problems I
might encounter?

Thanks in advance

angelo
--


I've recently followed this example, for a internal use only upload.
It is for ASP but you can easily modify it for PHP.
You may find it useful, but i can't recommend it over ftp:

http://www.codeproject.com/useritems/AJAXUpload.asp

The one of the limitations of this method is that its IE only. And
also you need to made some registry changes in the clients for it to
work, and then it gets ugly.
But hey, take a look ;)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 5:07 am, Angelo Zanetti wrote:
 thanks for the replies. But how does a site like:
 http://www.yousendit.com/ do the upload of really huge files?
 Normal upload?

I guess they've already worked through all the issues, assuming their
service actually works...

Or, perhaps, they don't really care about users on slow/flaky
connections, and simply refund anybody who is unhappy.

I dunno.

Ask them. :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-30 Thread Tijnema

On 5/30/07, Angelo Zanetti [EMAIL PROTECTED] wrote:

Dear all

We need to develop a system where we can upload really big files. IE 15
- 25 Mb.
So I know you can set the limit of the upload thats not a problem, I
know a problem that we might experience is that the browser might time
out. Is there any way around this? and also are there other problems I
might encounter?

Thanks in advance

angelo


I wouldn't recommend uploading big files through the browser, as the
HTTP protocol isn't designed for that. FTP is designed for that, and
if you can, use it :)

I have uploaded really big files with my browser, which sometimes take
several days to complete, and didn't time out, so I don't think it
will be a problem with relative new browsers. (I did with IE6, later
with FireFox on linux)

But, it's very annoying when you're at 90% of upload and your Internet
connection hangs for a few seconds, as that would kill the upload
process and you need to start over again.
If you have a lot of uploads at the same time, it might get your
system out of resources, as all uploads are stored in the RAM while
the user is uploading. So, if you have 100 people uploading, and they
all have already uploaded 10 MB of their file, you would have 1000MB
allocated. In contrast with FTP, as FTP will store the uploads
directly to the drive.

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-30 Thread Zoltán Németh
2007. 05. 30, szerda keltezéssel 15.47-kor Angelo Zanetti ezt írta:
 Dear all
 
 We need to develop a system where we can upload really big files. IE 15 
 - 25 Mb.
 So I know you can set the limit of the upload thats not a problem, I 
 know a problem that we might experience is that the browser might time 
 out. Is there any way around this? and also are there other problems I 
 might encounter?

http://www.php.net/manual/en/ref.info.php#ini.max-execution-time

hope that helps
Zoltán Németh

 
 Thanks in advance
 
 angelo
 -- 
 
 Angelo Zanetti
 Systems developer
 
 
 *Telephone:* +27 (021) 469 1052
 *Mobile:*   +27 (0) 72 441 3355
 *Fax:*+27 (0) 86 681 5885
 *
 Web:* http://www.zlogic.co.za
 *E-Mail:* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading really big files

2007-05-30 Thread Richard Lynch
On Wed, May 30, 2007 8:47 am, Angelo Zanetti wrote:
 We need to develop a system where we can upload really big files. IE
 15
 - 25 Mb.

You're pushing the limit on user patience and browser timeouts...

 So I know you can set the limit of the upload thats not a problem, I
 know a problem that we might experience is that the browser might time
 out. Is there any way around this?

Nope.

The browser gets tired of waiting around for the upload to complete
because your server is too slow/busy, and the user has a very bad
experience.

file upload was grafted onto HTTP rather late in the game, and shows
the scars badly.

 and also are there other problems I
 might encounter?

Woof.

Yes, there are many problems you might encounter :-)

Users on slow/flaky connectionns will never have a good experience
with HTTP file upload.  Give them FTP or SCP or something that is more
stable and will re-try.

You also have to consider what users might choose to upload that is
not what you wanted.  There are all kinds of people out there looking
to upload interesting content that you don't actually want, most
likely.

There is a Flikr book out there that might have some insight for you. 
They obviously dealt with this already, and wrote a whole book all
about Flikr, so it's probably got something in there covering this.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php