I\'m trying to upload large files with php to an ftp server. I can upload small files, but I\'m having trouble uploading larger files. I have looked it up and found that I nee
From this site: http://www.php.net/manual/en/ini.php
'upload_max_filesize' and 'post_max_size'
are of type PHP_INI_PERDIR
which means Entry can be set in "php.ini, .htaccess or httpd.conf". So you can't set it in your script.
--- Edit ---
A similar question: Changing upload_max_filesize on PHP
--- Edit 2 ---
Personally, I wanted to do the same kind of stuff (upload large files over ftp) and end up writing a java application. For handling large files, php is not really the best way. Web browsers doesn't really like that. So, for handling large files, I would suggest to look at other alternative: (java, swf, javascript, ...)
Something I would like to give a try when I have some time is http://nodejs.org/
as rightly pointed out by @AngeDeLaMort, you cannot use shorthand notation to set configuration values outside of PHP.ini.
reference : Changing upload_max_filesize on PHP
try doing it this way.
create .htaccess file in your root directory and add the following.
php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 200
php_value max_input_time 200