You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finder-indexer.php has a check to make sure you're not running from a web browser.
however it's throwing the error 'This is a command line only application' for me when i run it as php finder_indexer.php from a cron job (which should be allowed and is probably the most common use case). if i run the same command from the command line it works (returns 'cgi')
so i don't think 'cli' is the only possible value that should be allowed?
The text was updated successfully, but these errors were encountered:
note, when run from cron, PHP_SAPI returns 'cgi-fcgi' vs. 'cgi'. so checking for either, or that 'cgi' is in the string (or 'apahe' is not in the string) would be a more generic way to kill the script if it's being run from the web interface.
right now i have to hack line 22 of finder_indexer.php to look for 'cgi' or 'cgi-fcgi' in order for it to run in my environment.
if (PHP_SAPI !== 'cli') -------> if (PHP_SAPI !== 'cli' and PHP_SAPI !== 'cgi-fcgi')
ghost
changed the title
can't run finder-indexer.php from cron
can't run finder_indexer.php from cron
Nov 20, 2015
finder-indexer.php has a check to make sure you're not running from a web browser.
however it's throwing the error 'This is a command line only application' for me when i run it as php finder_indexer.php from a cron job (which should be allowed and is probably the most common use case). if i run the same command from the command line it works (returns 'cgi')
so i don't think 'cli' is the only possible value that should be allowed?
The text was updated successfully, but these errors were encountered: