Jump to content


Photo

PHP Upload Script


  • Please log in to reply
4 replies to this topic

#1 Janus13

Janus13
  • Members
  • PipPipPip
  • Advanced Member
  • 54 posts

Posted 23 September 2006 - 06:46 PM

Is there a limit on the file size that PHP can upload?

#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 23 September 2006 - 06:49 PM

I guess that would depend on your ini settings. I am not really sure that there is a cap out side of what it set in the php.ini .

Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#3 Janus13

Janus13
  • Members
  • PipPipPip
  • Advanced Member
  • 54 posts

Posted 23 September 2006 - 07:04 PM

Is there anyway I can test it?  when I upload a file less than 2M it uploads fine, but anything above that seems to timeout.

#4 corc

corc
  • Members
  • Pip
  • Newbie
  • 5 posts
  • LocationUNCA

Posted 23 September 2006 - 07:09 PM

<?php phpinfo(); ?>

Put that in a file and name it phpinfo.php or something then upload and then browse to it. Look for the line that says "upload_max_filesize". That will tell you the maximum upload size set in your .ini

#5 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 23 September 2006 - 08:29 PM

Also, if you are going to upload large files, you will also want to change the timeout settings. I suggestion that you use the php function ini_set. You can also use ini_get to retrieve the value for a specific setting in the ini.

For instance, to see what your upload max is.. You can do something like this.

echo 'The upload_max_filesize is <b>' . ini_get('upload_max_filesize') . '</b><br />';


Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users