I think the problem occurred as I specified size in php.ini using 4096M or 4G. Then just now I specified as 4294967294 around 4(GB) and I am getting the POSTed values. *Locally, on windows xp* this is working but when I set these values as as 4294967294 on Mandriva with php 5.1.6 and Apache/2.2.3. I get nothing in post as post_max_size turns negative and it won't allow any content greater than negative value.

I am still trying. I Installed Apache 2.2.4 on windows. Now file is being uploaded properly but file was still not moved. I had added a check

if ($file_details['size'] > 0) // do moving, update databases


and it was being returned negative. The logged it and $_FILES showed this for a 3.28 gb file

Array
(
   [File0] => Array
       (
           [name] => FC-6-i386-DVD.iso
           [type] => application/octet-stream
           [tmp_name] => C:\DOCUME~1\ADMINI~1.COM\LOCALS~1\Temp\php77.tmp
           [error] => 0
           [size] => -769771520
       )

)

I have removed this file size check and file *Uploaded Successfully*.

I haven't changed memory limit at all. Script time out I had to specify in php.ini file as one hour. Even though time of around 6 minutes should be enough to do the move_uploaded_file and update database but set_time_limit had no effect.

Any guess upgrading to php 5.2.1 on mandriva will solve problem as it already has apache 2.2.3?

Sukhwinder Singh



----- Original Message ----- From: "Jim Lucas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Sukhwinder Singh" <[EMAIL PROTECTED]>; "Jim Moseby" <[EMAIL PROTECTED]>; <php-general@lists.php.net>; "Stut" <[EMAIL PROTECTED]>
Sent: Saturday, June 09, 2007 3:55 AM
Subject: Re: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs


Richard Lynch wrote:
On Fri, June 8, 2007 4:03 pm, Jim Lucas wrote:
afaik, you are using the stock php.ini setting while you are
uploading.

This should not be taken to mean that if one changes php.ini, that the
change does not affect file upload -- it definitely does matter...

Not sure Jim meant that Sukhwinder was using stock php.ini, or
everybody, but it's definitely not the case that everybody is, like it
or not -- If that were true, upload_max_filesize would be meaningless.

You CANNOT change the file upload time out with set_time_limit,
however, because the file upload happens BEFORE your PHP script begins
execution.

The time limits affecting file upload can only be set:
  a. in http.conf, for various Apache settings, if any (off-topic)
  b. in php.ini or .htaccess
     b1. you'll need to crank up max_input_time, I think
     b2. max_execution_time for sure
     b3. memory_limit while you are at it, probably

You of course have to crank up upload_max_filesise to way beyond what
you expect for an uploaded file.

Don't forget about other php.ini limiters.

These are all that I think one would have to adjust to make things work.

max_execution_time
max_input_time
memory_limit
post_max_size
file_uploads
upload_max_filesize

Granted, you need to take into account limitations outside of php. ie...

available hard drive space
any possible hard disk quota limit
single file size limit of the OS
file size limit of Apache ( mentioned by another replier )
Apache < 2.x is less than 2g
Apache 2.x is greater than 2g

And there might be more that I am not aware of...

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

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

Reply via email to