NYCPHP Meetup

NYPHP.org

[nycphp-talk] file uploads

rinaudomatteo rinaudomatteo at msn.com
Mon Dec 15 05:06:25 EST 2003


Hi all. Please pardon my English, I'm an Italian guy.
IMHO the best solution would be a PHP-managed FTP upload (e.g. ftp_put,
etc.) See:  http://it.php.net/manual/en/ref.ftp.php

For a form-based-upload, however:

Instead of using: 'max_execution_time = 600' (unpolite) you should set a
time limit in the PHP script: set_time_limit(0) in order to avoid:
1) some more modification to the php.ini file if the file to be uploaded
grows in size;
2) any time-limit-is-over troubles during script execution.

file_uploads = 1 (obviously)
post_max_size MUST BE LARGER THAN upload_max_filesize
upload_max_filesize = 250M or what you want
memory_limit SHOULD BE LARGER THAN post_max_size or should set to '-1'
for no memory limit. Note that PHP must be compiled with the '
--enable-memory-limit' in the 'configure' options.

Best regards, Matt

Matteo Rinaudo
Software Developer
Silicia s.r.l.
via V. di Marco, 8
90143 PALERMO - Italy
tel. +39 91 730 85 73 int. 104

"Hackers built the Internet. Hackers made the Unix operating system what
it is today. Hackers run Usenet. Hackers make the World Wide Web work.
If you are part of this culture, if you have contributed to it and other
people in it know who you are and call you a hacker, you're a hacker." -
(Eric S. Raymond) 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.551 / Virus Database: 343 - Release Date: 11/12/2003
 



More information about the talk mailing list