I did a simple test to see which value
PHP_SAPI has.
On my WAMP server: apache2handler
On my hosted platform via http: cgi-fcgi
When running a cronjob on my hosted platform: cgi-fcgi
So, the
is_cli() function can't detect if it's a cronjob or not.
When I replace /bin/php by /bin/php-cli I get an error: /bin/php-cli not found.
Any ideas?