It is possible to run continuous PHP applications on free Heroku? I run the PHP irc bot via browser by this code:
<?php
exec("(cd php-irc;/app/php/bin/php ./bot.php bot.conf &) > /dev/null 2>/dev/null &");
?>
Bot turns off after about an hour :(
It is possible to run continuous PHP applications on free Heroku? I run the PHP irc bot via browser by this code:
<?php
exec("(cd php-irc;/app/php/bin/php ./bot.php bot.conf &) > /dev/null 2>/dev/null &");
?>
Bot turns off after about an hour :(
As suggested jszobody I use background jobs. I executed
heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib
and created Procfile with contents:
web: sh boot.sh
worker: cd ~/php-irc/ && php bot.php bot.conf
and executed:
heroku ps:scale web=0 worker=1
Seems it works without problems. Thanks!