Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Stut

Sukhwinder Singh wrote:
You don't appear to have read what I said. A Java applet can use FTP 
to upload the file - PHP does not get involved in that part. Once the 
upload is complete the applet can POST to your PHP file giving it 
information like where it's put the file and this other information 
you need to give it so it can rename the file. This is the only bit 
PHP gets involved in and it doesn't involve trying to upload 4 gig 
over a machanism that was never designed for it.


Thanks again for replying.

I have read. I have been trying to find out way for last two days.
I can say about jupload and how it seems to work.
It uploads file to server in a temporary directory.
It has postURL parameter. Then it POSTS the data to php file.
Because it POSTS, the php configuration values comes into question.

Here is an example:

Settings in php.ini are 50M for upload_max_fisesize and 50M for 
post_max_size.

I used japplet  and  uploaded a 51.89 MB file.

This is what is in error log.

[08-Jun-2007 03:06:29] PHP Warning:  POST Content-Length of 54414946 
bytes exceeds the limit of 52428800 bytes in Unknown on line 0


[08-Jun-2007 03:06:29] PHP Notice:  Undefined index:  File0 in 
E:\projects\ice\post_test.php on line 13


File0 is the first file in $_FILES array, as POST fails I don't get that 
array.


I uploaded a 48 MB file and it worked without any problem.


Ok, I think I see where your confusion is coming from. I'm not 
suggesting that the applet I'm describing already exists - it would be 
something you'd have to write or commission someone to write for you.


Every existing file upload applet I've ever come across uses HTTP POST 
to upload the files, but this is not what you need. It will almost 
certainly have to be a bespoke solution.


Another way you might approach it would be to define a naming convention 
for uploaded files and accept them via normal FTP upload. The user then 
visits your website and fills in a form that will tell your PHP script 
where to find the file as well as giving it the other information it 
needs. Setting up a secure write-only FTP server is well documented on 
the net, but is well beyond the scope of this mailing list.


-Stut

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread tedd

At 4:35 PM +0100 6/7/07, Stut wrote:
You need to look into maybe a java applet, or just plain 
FTP/SFTP/SCP for files that big. HTTP was never designed to handle 
uploading files of that size. For a start there is no facility to 
restart the upload should it get interrupted and fail.


-Stut


-Stut:

Would the ftp commands (ftp_login, etc.) in php work for this?

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Stut

tedd wrote:

At 4:35 PM +0100 6/7/07, Stut wrote:
You need to look into maybe a java applet, or just plain FTP/SFTP/SCP 
for files that big. HTTP was never designed to handle uploading files 
of that size. For a start there is no facility to restart the upload 
should it get interrupted and fail.


-Stut


-Stut:

Would the ftp commands (ftp_login, etc.) in php work for this?


Unfortunately not, unless every user needing to upload a file is running 
an FTP server.


-Stut

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Robert Cummings
On Fri, 2007-06-08 at 10:53 -0400, tedd wrote:
 At 4:35 PM +0100 6/7/07, Stut wrote:
 You need to look into maybe a java applet, or just plain 
 FTP/SFTP/SCP for files that big. HTTP was never designed to handle 
 uploading files of that size. For a start there is no facility to 
 restart the upload should it get interrupted and fail.
 
 -Stut
 
 -Stut:
 
 Would the ftp commands (ftp_login, etc.) in php work for this?

No, those are for initiating an FTP connection from the server on which
PHP is hosted.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 10:52 am, Jim Moseby wrote:
 Rumor has it that uploaded files are stored in memory before being
 committed
 to disk. If so, the amount of free RAM available to PHP would be the
 limit
 to the filesize regardless of the ini file settings.

I think you have to go pretty far back in PHP history (in 'net time)
to find that to be true...

Not 100% sure, mind you, but pretty sure.

-- 
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Sukhwinder Singh


I think you have to go pretty far back in PHP history (in 'net time)
to find that to be true...

Not 100% sure, mind you, but pretty sure.



I also think that the thing about memory limit is not true these days. I 
have been able to upload 3.28 gb file with memory limit specified as 128 MB. 
I also commened about it earlier but was referred to php manual. The manual 
says that yes, and I head read it myself but didn't increase the memonry and 
it still worked


Sukhwinder Singh

- Original Message - 
From: Richard Lynch [EMAIL PROTECTED]

To: Jim Moseby [EMAIL PROTECTED]
Cc: 'Sukhwinder Singh' [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Saturday, June 09, 2007 5:15 AM
Subject: RE: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




On Thu, June 7, 2007 10:52 am, Jim Moseby wrote:

Rumor has it that uploaded files are stored in memory before being
committed
to disk. If so, the amount of free RAM available to PHP would be the
limit
to the filesize regardless of the ini file settings.


I think you have to go pretty far back in PHP history (in 'net time)
to find that to be true...

Not 100% sure, mind you, but pretty sure.

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut

Sukhwinder Singh wrote:
I want to allow uploading of huge video files, which may be as big as 4 GB. But when I try to set 


post_max_size = 4G
upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted data) is ignored.

I get a warning about size of posted data greater than some negative number.

I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on Mandriva 2007.0) as 
well as 32 bit system (php 5.2.2 installed on windows xp sp2).

Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.


Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for 
uploading files, especially large ones. And by large ones I mean ~20MB!!


You need to look into maybe a java applet, or just plain FTP/SFTP/SCP 
for files that big. HTTP was never designed to handle uploading files of 
that size. For a start there is no facility to restart the upload should 
it get interrupted and fail.


-Stut

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh

Thanks for your reply.

So you are saying I cannot do it using php. These files have to be uploaded 
locally but using web interface and I have to pass some parameters along 
with file upload to update the database after upload is successful. Also I 
have to rename the file after it is uploaded.


Any utility which allows this?

Thanks,
Sukhwinder Singh

- Original Message - 
From: Stut [EMAIL PROTECTED]

To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:35 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:
I want to allow uploading of huge video files, which may be as big as 4 
GB. But when I try to set post_max_size = 4G

upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted data) is 
ignored.


I get a warning about size of posted data greater than some negative 
number.


I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on Mandriva 
2007.0) as well as 32 bit system (php 5.2.2 installed on windows xp sp2).


Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.


Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for uploading 
files, especially large ones. And by large ones I mean ~20MB!!


You need to look into maybe a java applet, or just plain FTP/SFTP/SCP for 
files that big. HTTP was never designed to handle uploading files of that 
size. For a start there is no facility to restart the upload should it get 
interrupted and fail.


-Stut

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Jim Moseby
 
 Hello,
 
 I want to allow uploading of huge video files, which may be 
 as big as 4 GB. But when I try to set 
 
 post_max_size = 4G
 upload_max_filesize = 4G
 
 in php.ini, it doesn't work and everything in post (posted 
 data) is ignored.
 
 I get a warning about size of posted data greater than some 
 negative number.
 
 I read somewhere that php stores this data in integer.
 
 I have tested it on 64 bit system (php 5.1.6 installed on 
 Mandriva 2007.0) as well as 32 bit system (php 5.2.2 
 installed on windows xp sp2).
 
 Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works
 
 We need to allow uploading of 4 GB files. Is there any solution.
 
 Regards,
 Sukhwinder Singh


Rumor has it that uploaded files are stored in memory before being committed
to disk. If so, the amount of free RAM available to PHP would be the limit
to the filesize regardless of the ini file settings.

You should probably use another method of transport for files that large.
FTP immediately comes to mind.

JM

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut

Sukhwinder Singh wrote:

Thanks for your reply.

So you are saying I cannot do it using php. These files have to be 
uploaded locally but using web interface and I have to pass some 
parameters along with file upload to update the database after upload is 
successful. Also I have to rename the file after it is uploaded.


Any utility which allows this?


Sounds like you need a Java applet. I have little experience with this, 
but I know that quite a few exist. I have no idea if any of them support 
sending meta data with the upload. I suggest you start Googling.


-Stut


- Original Message - From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:35 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize 
in GBs




Sukhwinder Singh wrote:
I want to allow uploading of huge video files, which may be as big as 
4 GB. But when I try to set post_max_size = 4G

upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted data) is 
ignored.


I get a warning about size of posted data greater than some negative 
number.


I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on Mandriva 
2007.0) as well as 32 bit system (php 5.2.2 installed on windows xp 
sp2).


Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.


Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for 
uploading files, especially large ones. And by large ones I mean ~20MB!!


You need to look into maybe a java applet, or just plain FTP/SFTP/SCP 
for files that big. HTTP was never designed to handle uploading files 
of that size. For a start there is no facility to restart the upload 
should it get interrupted and fail.


-Stut

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
Rumor has it that uploaded files are stored in memory before being 
committed

to disk. If so, the amount of free RAM available to PHP would be the limit
to the filesize regardless of the ini file settings.


I don't think that is the case. File is written to temp directory as it is 
uploaded.
And the qeustion is of php having negative values after I specify post size 
limit to 4G



You should probably use another method of transport for files that large.
FTP immediately comes to mind.


You mean ftp client? Like cute ftp. If yes, the problem is that along with 
uploading the file I also have to update database to associate that file 
with some user etc. It needs to be web based.


Sukhwinder Singh

- Original Message - 
From: Jim Moseby [EMAIL PROTECTED]

To: 'Sukhwinder Singh' [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:52 PM
Subject: RE: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs





Hello,

I want to allow uploading of huge video files, which may be
as big as 4 GB. But when I try to set

post_max_size = 4G
upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted
data) is ignored.

I get a warning about size of posted data greater than some
negative number.

I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on
Mandriva 2007.0) as well as 32 bit system (php 5.2.2
installed on windows xp sp2).

Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.

Regards,
Sukhwinder Singh



Rumor has it that uploaded files are stored in memory before being 
committed

to disk. If so, the amount of free RAM available to PHP would be the limit
to the filesize regardless of the ini file settings.

You should probably use another method of transport for files that large.
FTP immediately comes to mind.

JM

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh

A beeter method is to send the file via ftp. I think most browsers
allow this.  And for example store the file in a user specific file.
Then the user, via a web interface, select the file it has uploaded
and do the rest of the operations you need.


Along with uploading the file I also have to pass other information to 
update the database to associate that file with some user etc.


What kind of ftp method you are suggesting?

Sukhwinder Singh

- Original Message - 
From: jose javier parra sanchez [EMAIL PROTECTED]

To: Sukhwinder Singh [EMAIL PROTECTED]
Sent: Thursday, June 07, 2007 8:59 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




A beeter method is to send the file via ftp. I think most browsers
allow this.  And for example store the file in a user specific file.
Then the user, via a web interface, select the file it has uploaded
and do the rest of the operations you need.

2007/6/7, Sukhwinder Singh [EMAIL PROTECTED]:

Thanks for your reply.

So you are saying I cannot do it using php. These files have to be 
uploaded

locally but using web interface and I have to pass some parameters along
with file upload to update the database after upload is successful. Also 
I

have to rename the file after it is uploaded.

Any utility which allows this?

Thanks,
Sukhwinder Singh

- Original Message -
From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:35 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in
GBs


 Sukhwinder Singh wrote:
 I want to allow uploading of huge video files, which may be as big as 
 4

 GB. But when I try to set post_max_size = 4G
 upload_max_filesize = 4G

 in php.ini, it doesn't work and everything in post (posted data) is
 ignored.

 I get a warning about size of posted data greater than some negative
 number.

 I read somewhere that php stores this data in integer.

 I have tested it on 64 bit system (php 5.1.6 installed on Mandriva
 2007.0) as well as 32 bit system (php 5.2.2 installed on windows xp 
 sp2).


 Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

 We need to allow uploading of 4 GB files. Is there any solution.

 Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for 
 uploading

 files, especially large ones. And by large ones I mean ~20MB!!

 You need to look into maybe a java applet, or just plain FTP/SFTP/SCP 
 for
 files that big. HTTP was never designed to handle uploading files of 
 that
 size. For a start there is no facility to restart the upload should it 
 get

 interrupted and fail.

 -Stut

 --
 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






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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut

Sukhwinder Singh wrote:
Rumor has it that uploaded files are stored in memory before being 
committed
to disk. If so, the amount of free RAM available to PHP would be the 
limit

to the filesize regardless of the ini file settings.


I don't think that is the case. File is written to temp directory as it 
is uploaded.
And the qeustion is of php having negative values after I specify post 
size limit to 4G


I would hazard a guess that you're overflowing a signed 32-bit int by 
specifying 4gig, but I could be wrong. It's certainly not the issue.


-Stut

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh


I would hazard a guess that you're overflowing a signed 32-bit int by 
specifying 4gig, but I could be wrong. It's certainly not the issue.




Yes you are right. That is what is happening.

Sukhwinder Singh

- Original Message - 
From: Stut [EMAIL PROTECTED]

To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: Jim Moseby [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Thursday, June 07, 2007 9:16 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:
Rumor has it that uploaded files are stored in memory before being 
committed
to disk. If so, the amount of free RAM available to PHP would be the 
limit

to the filesize regardless of the ini file settings.


I don't think that is the case. File is written to temp directory as it 
is uploaded.
And the qeustion is of php having negative values after I specify post 
size limit to 4G


I would hazard a guess that you're overflowing a signed 32-bit int by 
specifying 4gig, but I could be wrong. It's certainly not the issue.


-Stut



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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
Sounds like you need a Java applet. I have little experience with this, 
but I know that quite a few exist. I have no idea if any of them support 
sending meta data with the upload. I suggest you start Googling.




Even java applets have to hand over the file to some script, in this case 
php and php will get it in $_FILES array it seems (in case of japplet). so 
the problem will remain.



- Original Message - 
From: Stut [EMAIL PROTECTED]

To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:56 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:

Thanks for your reply.

So you are saying I cannot do it using php. These files have to be 
uploaded locally but using web interface and I have to pass some 
parameters along with file upload to update the database after upload is 
successful. Also I have to rename the file after it is uploaded.


Any utility which allows this?


Sounds like you need a Java applet. I have little experience with this, 
but I know that quite a few exist. I have no idea if any of them support 
sending meta data with the upload. I suggest you start Googling.


-Stut


- Original Message - From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:35 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:
I want to allow uploading of huge video files, which may be as big as 4 
GB. But when I try to set post_max_size = 4G

upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted data) is 
ignored.


I get a warning about size of posted data greater than some negative 
number.


I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on Mandriva 
2007.0) as well as 32 bit system (php 5.2.2 installed on windows xp 
sp2).


Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.


Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for 
uploading files, especially large ones. And by large ones I mean 
 ~20MB!!


You need to look into maybe a java applet, or just plain FTP/SFTP/SCP 
for files that big. HTTP was never designed to handle uploading files of 
that size. For a start there is no facility to restart the upload should 
it get interrupted and fail.


-Stut

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Jim Moseby
 
  Rumor has it that uploaded files are stored in memory before being 
  committed
  to disk. If so, the amount of free RAM available to PHP 
 would be the limit
  to the filesize regardless of the ini file settings.
 
 I don't think that is the case. File is written to temp 
 directory as it is 
 uploaded.
 And the qeustion is of php having negative values after I 
 specify post size 
 limit to 4G
 

There is a comment in the documentation for move_uploaded_file() that
indicates the entire file is saved in memory prior to writing to the
temporary upload area.  Maybe this is not true. Read it for yourself. Its
just a comment, so who knows?

Also, there is an indication that you may need to tweak memory_limit in
php.ini.  


  You should probably use another method of transport for 
 files that large.
  FTP immediately comes to mind.
 
 You mean ftp client? Like cute ftp. If yes, the problem is 
 that along with 
 uploading the file I also have to update database to 
 associate that file 
 with some user etc. It needs to be web based.
 

After a quick search I found an applet that handles file uploads, and can
use FTP as the transport protocol.

http://radinks.com/upload/

JM

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut

Sukhwinder Singh wrote:
Sounds like you need a Java applet. I have little experience with 
this, but I know that quite a few exist. I have no idea if any of them 
support sending meta data with the upload. I suggest you start Googling.




Even java applets have to hand over the file to some script, in this 
case php and php will get it in $_FILES array it seems (in case of 
japplet). so the problem will remain.


Not at all true. A Java applet can use FTP to handle the upload and 
still pass meta data about the file as an HTTP POST request. There is no 
requirement to use HTTP to upload the file from a Java applet.


-Stut


- Original Message - From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:56 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize 
in GBs




Sukhwinder Singh wrote:

Thanks for your reply.

So you are saying I cannot do it using php. These files have to be 
uploaded locally but using web interface and I have to pass some 
parameters along with file upload to update the database after upload 
is successful. Also I have to rename the file after it is uploaded.


Any utility which allows this?


Sounds like you need a Java applet. I have little experience with 
this, but I know that quite a few exist. I have no idea if any of them 
support sending meta data with the upload. I suggest you start Googling.


-Stut


- Original Message - From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:35 PM
Subject: Re: [PHP] File Upload - post_max_size and 
upload_max_filesize in GBs




Sukhwinder Singh wrote:
I want to allow uploading of huge video files, which may be as big 
as 4 GB. But when I try to set post_max_size = 4G

upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted data) is 
ignored.


I get a warning about size of posted data greater than some 
negative number.


I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on Mandriva 
2007.0) as well as 32 bit system (php 5.2.2 installed on windows xp 
sp2).


Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.


Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for 
uploading files, especially large ones. And by large ones I mean 
 ~20MB!!


You need to look into maybe a java applet, or just plain 
FTP/SFTP/SCP for files that big. HTTP was never designed to handle 
uploading files of that size. For a start there is no facility to 
restart the upload should it get interrupted and fail.


-Stut

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
Even java applets have to hand over the file to some script, in this case 
php and php will get it in $_FILES array it seems (in case of japplet). 
so the problem will remain.


Not at all true. A Java applet can use FTP to handle the upload and still 
pass meta data about the file as an HTTP POST request. There is no 
requirement to use HTTP to upload the file from a Java applet.


It is not about how data is going to be transferred but it is about php 
having a limit on what it can accept as POST.

But we'll see how it works out. I'll let everyone know.
I am trying japplet for now.

Thanks for replying.

Sukhwinder Singh

- Original Message - 
From: Stut [EMAIL PROTECTED]

To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Friday, June 08, 2007 1:28 AM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:
Sounds like you need a Java applet. I have little experience with this, 
but I know that quite a few exist. I have no idea if any of them support 
sending meta data with the upload. I suggest you start Googling.




Even java applets have to hand over the file to some script, in this case 
php and php will get it in $_FILES array it seems (in case of japplet). 
so the problem will remain.


Not at all true. A Java applet can use FTP to handle the upload and still 
pass meta data about the file as an HTTP POST request. There is no 
requirement to use HTTP to upload the file from a Java applet.


-Stut


- Original Message - From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:56 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:

Thanks for your reply.

So you are saying I cannot do it using php. These files have to be 
uploaded locally but using web interface and I have to pass some 
parameters along with file upload to update the database after upload 
is successful. Also I have to rename the file after it is uploaded.


Any utility which allows this?


Sounds like you need a Java applet. I have little experience with this, 
but I know that quite a few exist. I have no idea if any of them support 
sending meta data with the upload. I suggest you start Googling.


-Stut


- Original Message - From: Stut [EMAIL PROTECTED]
To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 07, 2007 8:35 PM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize 
in GBs




Sukhwinder Singh wrote:
I want to allow uploading of huge video files, which may be as big as 
4 GB. But when I try to set post_max_size = 4G

upload_max_filesize = 4G

in php.ini, it doesn't work and everything in post (posted data) is 
ignored.


I get a warning about size of posted data greater than some negative 
number.


I read somewhere that php stores this data in integer.

I have tested it on 64 bit system (php 5.1.6 installed on Mandriva 
2007.0) as well as 32 bit system (php 5.2.2 installed on windows xp 
sp2).


Value up to, I think, 2147483647 bytes or ( around 1.999.. gb) works

We need to allow uploading of 4 GB files. Is there any solution.


Yeah, don't use HTTP. Seriously, HTTP is a crappy mechanism for 
uploading files, especially large ones. And by large ones I mean 
 ~20MB!!


You need to look into maybe a java applet, or just plain FTP/SFTP/SCP 
for files that big. HTTP was never designed to handle uploading files 
of that size. For a start there is no facility to restart the upload 
should it get interrupted and fail.


-Stut

--
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] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut

Sukhwinder Singh wrote:
Even java applets have to hand over the file to some script, in this 
case php and php will get it in $_FILES array it seems (in case of 
japplet). so the problem will remain.


Not at all true. A Java applet can use FTP to handle the upload and 
still pass meta data about the file as an HTTP POST request. There is 
no requirement to use HTTP to upload the file from a Java applet.


It is not about how data is going to be transferred but it is about php 
having a limit on what it can accept as POST.

But we'll see how it works out. I'll let everyone know.
I am trying japplet for now.


You don't appear to have read what I said. A Java applet can use FTP to 
upload the file - PHP does not get involved in that part. Once the 
upload is complete the applet can POST to your PHP file giving it 
information like where it's put the file and this other information you 
need to give it so it can rename the file. This is the only bit PHP gets 
involved in and it doesn't involve trying to upload 4 gig over a 
machanism that was never designed for it.


-Stut

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



Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
You don't appear to have read what I said. A Java applet can use FTP to 
upload the file - PHP does not get involved in that part. Once the upload 
is complete the applet can POST to your PHP file giving it information 
like where it's put the file and this other information you need to give 
it so it can rename the file. This is the only bit PHP gets involved in 
and it doesn't involve trying to upload 4 gig over a machanism that was 
never designed for it.


Thanks again for replying.

I have read. I have been trying to find out way for last two days.
I can say about jupload and how it seems to work.
It uploads file to server in a temporary directory.
It has postURL parameter. Then it POSTS the data to php file.
Because it POSTS, the php configuration values comes into question.

Here is an example:

Settings in php.ini are 50M for upload_max_fisesize and 50M for 
post_max_size.

I used japplet  and  uploaded a 51.89 MB file.

This is what is in error log.

[08-Jun-2007 03:06:29] PHP Warning:  POST Content-Length of 54414946 bytes 
exceeds the limit of 52428800 bytes in Unknown on line 0


[08-Jun-2007 03:06:29] PHP Notice:  Undefined index:  File0 in 
E:\projects\ice\post_test.php on line 13


File0 is the first file in $_FILES array, as POST fails I don't get that 
array.


I uploaded a 48 MB file and it worked without any problem.

Sukhwinder Singh

- Original Message - 
From: Stut [EMAIL PROTECTED]

To: Sukhwinder Singh [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Friday, June 08, 2007 2:10 AM
Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in 
GBs




Sukhwinder Singh wrote:
Even java applets have to hand over the file to some script, in this 
case php and php will get it in $_FILES array it seems (in case of 
japplet). so the problem will remain.


Not at all true. A Java applet can use FTP to handle the upload and 
still pass meta data about the file as an HTTP POST request. There is no 
requirement to use HTTP to upload the file from a Java applet.


It is not about how data is going to be transferred but it is about php 
having a limit on what it can accept as POST.

But we'll see how it works out. I'll let everyone know.
I am trying japplet for now.


You don't appear to have read what I said. A Java applet can use FTP to 
upload the file - PHP does not get involved in that part. Once the upload 
is complete the applet can POST to your PHP file giving it information 
like where it's put the file and this other information you need to give 
it so it can rename the file. This is the only bit PHP gets involved in 
and it doesn't involve trying to upload 4 gig over a machanism that was 
never designed for it.


-Stut

--
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