[thelist] PHP File Upload, Image Resize, Gallery Articles or Tuturials

kasimir-k kasimir.k.lists at gmail.com
Wed May 2 04:44:31 CDT 2007


Chris Dempsey scribeva in 02/05/2007 8:39:
> In particular I'm looking for guidance on what the largest file size the
> native PHP upload function will handle without timing out,

Two things to beware with large files:
- timing out: set max_input_time to large number or -1 (no limit) 
<http://es2.php.net/manual/en/ref.info.php#ini.max-input-time>
- memory running out: to make a thumbnail, PHP needs to create a full 
color image, which may be a lot larger than the uploaded file, if it was 
jpg. <http://es2.php.net/manual/en/ini.core.php#ini.memory-limit>

If you don't have access to php.ini, you can set these in your .htaccess 
file, for example:
php_value max_input_time 1800
php_value memory_limit  96M

> and if PHP has an
> inbuilt function to resize images or whether I need an aftermarket
> component.

http://php.net/manual/en/function.imagecopyresampled.php

.k



More information about the thelist mailing list