etnastyles Posted April 16, 2010 Share Posted April 16, 2010 I wanted to know if php times out when run from the terminal??? I am trying to create a large file ftp drop box that uploads files and when the upload is completed an email is generated. The issues i have come into is that php times out in the browser and set_time_limit is a bit of a hack!!! thanks etna Quote Link to comment https://forums.phpfreaks.com/topic/198763-php-from-linux-terminal/ Share on other sites More sharing options...
shlumph Posted April 16, 2010 Share Posted April 16, 2010 I'm pretty sure that PHP will read the php.ini from wherever it's running. In php.ini, you'll find max_execution_time = 30 ; or some other number So you'll probably have to knock this number up a bit depending on your operation. Also might need to bump up the memory_limit or max_input_time. Quote Link to comment https://forums.phpfreaks.com/topic/198763-php-from-linux-terminal/#findComment-1043157 Share on other sites More sharing options...
JonnoTheDev Posted April 16, 2010 Share Posted April 16, 2010 The issues i have come into is that php times out in the browser This may not be php. It could be your web servers maximum execution time. CLI php will not time out. It will terminate if you script exhausts the maximum memory allowance. You cannot perform a file upload through CLI php. File uploads are achieved through HTTP. The file is processed once on the server by php. Quote Link to comment https://forums.phpfreaks.com/topic/198763-php-from-linux-terminal/#findComment-1043159 Share on other sites More sharing options...
etnastyles Posted April 16, 2010 Author Share Posted April 16, 2010 what do you guys think the best way of doing a large upload without hacking the php.ini timeout, max ex and memory limit. What about using php to exec ftp in linux from the command line??? do you think this would be possible or would the script that ran the exec suffer the timeout issues? Quote Link to comment https://forums.phpfreaks.com/topic/198763-php-from-linux-terminal/#findComment-1043166 Share on other sites More sharing options...
lynxus Posted May 9, 2010 Share Posted May 9, 2010 I would of thought execing an external system file wouldnt of timed out. I run a local whois through a php script and sometimes the local whois takes forever without timing out. Maybe try no hupping the program? ie: exec('nohup ftp some_other_code &'); or maybe just do it in perl to save some headache? Quote Link to comment https://forums.phpfreaks.com/topic/198763-php-from-linux-terminal/#findComment-1055371 Share on other sites More sharing options...
steviewdr Posted May 9, 2010 Share Posted May 9, 2010 Well the following in a htaccess file worked fine for me. php_value upload_max_filesize 100M php_value post_max_size 100M I know its a hack. But it worked fine for me to allow people upload up to 100MB files. The only other way would be to have a local client app developed using java etc to allow them to upload large files and to give a status of it. -steve Quote Link to comment https://forums.phpfreaks.com/topic/198763-php-from-linux-terminal/#findComment-1055555 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.