Re: [PHP] uploading big files with PHP
On 8/3/08, Catalin Zamfir Alexandru | KIT Software CAZ [EMAIL PROTECTED] wrote: What are you talking about? I've been able to upload a 4GB file without problem. Uploading doesn't depend on memory limit, and this has been a subject of debate on the PHP.net Manual (uploading files section, check it out). using the PUT method? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
On Mon, Aug 4, 2008 at 12:55 AM, Catalin Zamfir Alexandru | KIT Software CAZ [EMAIL PROTECTED] wrote: What are you talking about? I've been able to upload a 4GB file without problem. Uploading doesn't depend on memory limit, and this has been a subject of debate on the PHP.net Manual (uploading files section, check it out). The PHP manual is not a place for debate. That's one of the reasons this discussion list is here. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
On 7/25/08, Angelo Zanetti [EMAIL PROTECTED] wrote: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Use the PUT method - requires webserver configuration to support it - requires PHP to open the stream using php://input - supports resuming (the client needs to give the script something like ?offset=1234 and the PHP script needs to fseek() to that position in the file) Variety of options for uploading this way: - anything that can leverage curl/libcurl - browser plugins - lots of java ones, haven't found a flash one yet Bonuses: - Can run over ssl/https - since its just HTTP talking, so proxies are okay - Can resume - Doesn't require a two-step process for people to upload things (FTP, SFTP to server, then go somewhere and associate the file, etc) We'll be using this method we just wish there were nicer frontends, most of the java ones are ugly as sin. javauploader.com mentioned does not look like it supports PUT. however I believe all of these do: http://www.jfileupload.com/products/jfileupload/ http://www.radinks.com/upload/plus/resume.php http://upload.thinfile.com/features.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
mike wrote: On 7/25/08, Angelo Zanetti [EMAIL PROTECTED] wrote: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Use the PUT method - requires webserver configuration to support it - requires PHP to open the stream using php://input - supports resuming (the client needs to give the script something like ?offset=1234 and the PHP script needs to fseek() to that position in the file) Variety of options for uploading this way: - anything that can leverage curl/libcurl - browser plugins - lots of java ones, haven't found a flash one yet Bonuses: - Can run over ssl/https - since its just HTTP talking, so proxies are okay - Can resume - Doesn't require a two-step process for people to upload things (FTP, SFTP to server, then go somewhere and associate the file, etc) We'll be using this method we just wish there were nicer frontends, most of the java ones are ugly as sin. javauploader.com mentioned does not look like it supports PUT. however I believe all of these do: http://www.jfileupload.com/products/jfileupload/ http://www.radinks.com/upload/plus/resume.php http://upload.thinfile.com/features.php Also, use set_time_limit(0); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
On 8/3/08, brian [EMAIL PROTECTED] wrote: Also, use set_time_limit(0); and configure the server and php to accept a decent size, and probably configure the client to put only chunks at a time right? otherwise php will hit it's memory limit for the script quite easily i would assume. so there has to be something that allows it to stream and keep only so much in the buffer at a time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading big files with PHP
What are you talking about? I've been able to upload a 4GB file without problem. Uploading doesn't depend on memory limit, and this has been a subject of debate on the PHP.net Manual (uploading files section, check it out). -Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2008 4:07 AM To: brian Cc: php-general@lists.php.net Subject: Re: [PHP] uploading big files with PHP On 8/3/08, brian [EMAIL PROTECTED] wrote: Also, use set_time_limit(0); and configure the server and php to accept a decent size, and probably configure the client to put only chunks at a time right? otherwise php will hit it's memory limit for the script quite easily i would assume. so there has to be something that allows it to stream and keep only so much in the buffer at a time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
Hi, Maybe this is involved with it ? http://ee.php.net/manual/en/info.configuration.php#ini.max-input-time Angelo Zanetti wrote: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Angelo http://www.elemental.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
Quoting Angelo Zanetti [EMAIL PROTECTED]: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Angelo http://www.elemental.co.za Uploading big files should not be a problem. Make sure the some .ini settings are correct for you: max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data max_input_nesting_level = 64 ; Maximum input variable nesting level ; Maximum size of POST data that PHP will accept. post_max_size = 8M The first 3 you can set with ini_set. You could of course use the ftp functionality available in PHP. http://nl3.php.net/ftp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading big files with PHP
-Original Message- From: Thijs Lensselink [mailto:[EMAIL PROTECTED] Sent: 25 July 2008 12:08 To: php-general@lists.php.net Subject: Re: [PHP] uploading big files with PHP Quoting Angelo Zanetti [EMAIL PROTECTED]: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Angelo http://www.elemental.co.za Uploading big files should not be a problem. Make sure the some .ini settings are correct for you: max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data max_input_nesting_level = 64 ; Maximum input variable nesting level ; Maximum size of POST data that PHP will accept. post_max_size = 8M The first 3 you can set with ini_set. You could of course use the ftp functionality available in PHP. http://nl3.php.net/ftp - Thanks Thijs, It does make sense to change the post_max_size value. But what if the file is for example a 100MB file or bigger. This probably isn't the best way to handle this? I'm trying to find the best practices to do this or is this totally the wrong way to go about this? Thanks again! Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
On Jul 25, 2008, at 8:26 AM, Angelo Zanetti wrote: -Original Message- From: Thijs Lensselink [mailto:[EMAIL PROTECTED] Sent: 25 July 2008 12:08 To: php-general@lists.php.net Subject: Re: [PHP] uploading big files with PHP Quoting Angelo Zanetti [EMAIL PROTECTED]: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Angelo http://www.elemental.co.za Uploading big files should not be a problem. Make sure the some .ini settings are correct for you: max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data max_input_nesting_level = 64 ; Maximum input variable nesting level ; Maximum size of POST data that PHP will accept. post_max_size = 8M The first 3 you can set with ini_set. You could of course use the ftp functionality available in PHP. http://nl3.php.net/ftp - Thanks Thijs, It does make sense to change the post_max_size value. But what if the file is for example a 100MB file or bigger. This probably isn't the best way to handle this? I'm trying to find the best practices to do this or is this totally the wrong way to go about this? I have not used it my self since I don't need to upload large files but why not use php's ftp functions[1]? [1] http://us.php.net/ftp -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading big files with PHP
Quoting Angelo Zanetti [EMAIL PROTECTED]: -Original Message- From: Thijs Lensselink [mailto:[EMAIL PROTECTED] Sent: 25 July 2008 12:08 To: php-general@lists.php.net Subject: Re: [PHP] uploading big files with PHP Quoting Angelo Zanetti [EMAIL PROTECTED]: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Angelo http://www.elemental.co.za Uploading big files should not be a problem. Make sure the some .ini settings are correct for you: max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data max_input_nesting_level = 64 ; Maximum input variable nesting level ; Maximum size of POST data that PHP will accept. post_max_size = 8M The first 3 you can set with ini_set. You could of course use the ftp functionality available in PHP. http://nl3.php.net/ftp - Thanks Thijs, It does make sense to change the post_max_size value. But what if the file is for example a 100MB file or bigger. This probably isn't the best way to handle this? I'm trying to find the best practices to do this or is this totally the wrong way to go about this? Thanks again! Angelo If the file is located on the client side. Then form based upload over HTTP is your only option really. FTP only comes in handy when the file in question resides on the server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
Michael Kubler wrote: There are other ways to upload files. I know if you use Google Gears http://code.google.com/apis/gears/ (requires a plugin for your web browser), then you can easily have the file split up http://code.google.com/apis/gears/api_workerpool.html (client side) and sent in chunks, e.g 500Kb, and if the upload fails then only that chunk gets affected, you can then resume the uploading and the client only has to re-upload from that failed chunk. I saw this being demo'd at the Google developer conference in Sydney, not sure if it is part of the publicly available release as yet, however I have seen similar things done on some websites. I think Flickr have similar functionality using AJAX calls... but I might be wrong. You are right on this. There are some other great methods for uploading. I just meant that in PHP there is not much more options. Of course in combination with other technologies you can do some pretty cool stuff. You could use some Java applet, Flash, or like you said Ajax in combination with PHP. Michael Kubler *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz Thijs Lensselink wrote: Quoting Angelo Zanetti [EMAIL PROTECTED]: -Original Message- From: Thijs Lensselink [mailto:[EMAIL PROTECTED] Sent: 25 July 2008 12:08 To: php-general@lists.php.net Subject: Re: [PHP] uploading big files with PHP Quoting Angelo Zanetti [EMAIL PROTECTED]: Hi all We are pitching to develop a website where the admin has to upload big video files but I'm not sure how this can be done as the file upload will most probably time out. How do current websites do it? Is there somehow a way to make use of FTP to transfer the files? Any links, help, advice will be appreciated. Thanks in advance Angelo http://www.elemental.co.za Uploading big files should not be a problem. Make sure the some .ini settings are correct for you: max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60; Maximum amount of time each script may spend parsing request data max_input_nesting_level = 64 ; Maximum input variable nesting level ; Maximum size of POST data that PHP will accept. post_max_size = 8M The first 3 you can set with ini_set. You could of course use the ftp functionality available in PHP. http://nl3.php.net/ftp - Thanks Thijs, It does make sense to change the post_max_size value. But what if the file is for example a 100MB file or bigger. This probably isn't the best way to handle this? I'm trying to find the best practices to do this or is this totally the wrong way to go about this? Thanks again! Angelo If the file is located on the client side. Then form based upload over HTTP is your only option really. FTP only comes in handy when the file in question resides on the server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading big files with PHP
On 7/25/08, T Lensselink [EMAIL PROTECTED] wrote: You are right on this. There are some other great methods for uploading. I just meant that in PHP there is not much more options. Of course in combination with other technologies you can do some pretty cool stuff. You could use some Java applet, Flash, or like you said Ajax in combination with PHP. Exactly. We need to be able to accept uploads now going upwards of 50MB, and from slow international connections too. HTTP just isn't good for that, not to mention all the configuration needing to be done in the webserver and PHP to sit there and wait... We'll probably be forced into looking into third party tools, since HTTP itself, regardless of what server-side language used, is a bit too unreliable, and we need some thicker/beefier solution which allows for resuming, retries on timeouts, etc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading big files
Is it because of the memory_limit that it doesn't work ? Yes Do I have a way to upload files (over 7M) on the server without increasing the memory_limit ? Not until PHP 4.2 -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php