Janus13 Posted September 23, 2006 Share Posted September 23, 2006 Is there a limit on the file size that PHP can upload? Quote Link to comment Share on other sites More sharing options...
tomfmason Posted September 23, 2006 Share Posted September 23, 2006 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 Quote Link to comment Share on other sites More sharing options...
Janus13 Posted September 23, 2006 Author Share Posted September 23, 2006 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. Quote Link to comment Share on other sites More sharing options...
corc Posted September 23, 2006 Share Posted September 23, 2006 [code]<?php phpinfo(); ?>[/code]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 Quote Link to comment Share on other sites More sharing options...
tomfmason Posted September 23, 2006 Share Posted September 23, 2006 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 [url=http://us2.php.net/manual/en/function.ini-set.php]ini_set[/url]. You can also use [url=http://us2.php.net/manual/en/function.ini-get.php]ini_get[/url] 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.[code=php:0]echo 'The upload_max_filesize is <b>' . ini_get('upload_max_filesize') . '</b><br />';[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.