Talk:HowTos
From OpenFSG
Hi, even if many of you will find it unuseful, I'm writing this post in order to help non-expert fsg users (as I am) in overcoming a problem that could affect many of them: transferring large files via http.
1) First of all, why using http to transfer large files when other means (e.g. ftp) could do a better job? In my case the answer is that if I want to upload files to my FSG (at home) from the firm where I work, the firm firewall blocks all the ports except port 80. So I have no choice.
2) In order to upload files to FSG via http you need to: a - Host a website on your FSG (please, refer to http://www.openfsg.com/index.php/Host_a_Web_Site ) b - Run an HTML based File Manager on the FSG (please, refer to http://www.openfsg.com/index.php/Run_a_HTML_based_File_Manager_on_the_FSG) - I use Quixplorer 2.3.
3) In my experience the next important step is to create a folder for temporary files. In fact, the one used by default by the system is within the system partition and it's limited to approx 50 MB. So for files bigger than 50 MB it won't work. I created a folder under /home (e.g. /home/temporary).
4) Then it's necessary to change some parameters in php.ini file. This file can be found in /usr/local/apache/conf (if you didn't install ipkg; otherwise, it SHOULD be in /home/opt/etc). In order to access and modify this file you need to use putty.exe or something equivalent. Instructions can be found in this thread: http://www.openfsg.com/forum/viewtopic.php?t=1593&highlight=
5) The parameters that need to be changed are: upload_tmp_dir max_execution_time (Maximum execution time of each script, in seconds, originally 30) max_input_time (Maximum amount of time each script may spend parsing request data, originally 60) post_max_size (originally 8M) upload_max_filesize (originally 2M)
upload_tmp_dir is normally blank in php.ini and the related line is inactive (there is a ";" at the beginning). Remove the ";" and assign to the parameter the path of the newly created temporary files folder (e.g. upload_tmp_dir = /home/temporary).
The value to give to upload_max_filesize must be at least equal to the dimension of the largest file you want to upload (e.g. 300M) post_max_size must be "a little bit bigger" than upload_max_filesize (e.g. 310M).
Coming to max_execution_time and max_input_time, I didn't really understand how they work in the FSG environment. When I left them like they were (30 and 60 seconds) I didn't manage to transfer more than 160M (and it took me approx 1,5 hours). Then I set them to 10800 sec (3 hours) and I had no problem with a 212 MB file (and it took me 4 hours). So, I suggest to do some tentatives.
With these little modifications I managed to transfer, as I said, a file of 212 MB. I didn't try with bigger files, but I read on the net that no problem should arise even for bigger dimensions. I don't know if there's a physical limit.
As I said I'm not an expert, but if you need some clarifications, just ask!
P.S. - Limits to maximum upload size could also be within the specific php scripts used to upload (see point 2) ). Quixplorer, the script I use, has no limits defined. Other script could have limits and they are generally set in the index.php file or in conf.php file. In this case you have to change these parameters too.
P.P.S. - In order to let parameters changes in php.ini file have effect, restart the FSG.
