summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-02-06 23:03:05 +0400
committerAndrew Dolgov <[email protected]>2014-02-06 23:03:05 +0400
commit6f61ba46c4a7d61c8e90252897b711573bbb36cc (patch)
tree6f4e327de0dd1fc3a196e69d0937fddc0c412772 /update.php
parent878a0083ffc74c7753eec3a1d570af136a80529d (diff)
detect php cgi binary because people keep trying to run service scripts using it
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/update.php b/update.php
index c1547fa7f..521b956ad 100755
--- a/update.php
+++ b/update.php
@@ -42,6 +42,13 @@
$options = getopt("", $longopts);
+ if (!is_array($options)) {
+ die("error: getopt() failed. ".
+ "Most probably you are using PHP CGI to run this script ".
+ "instead of required PHP CLI. Check tt-rss wiki page on updating feeds for ".
+ "additional information.\n");
+ }
+
if (count($options) == 0 && !defined('STDIN')) {
?> <html>
<head>