Sanity check chroot environment.
[www.jankratochvil.net.git] / project / Nokia61 / Nokia61.php
index 79a3db3..937631e 100644 (file)
@@ -67,6 +67,11 @@ global $tables,$bgcolor_head,$bgcolor_body,$HTTP_GET_VARS;
                $used[$x]=1;
                $filled++;
                }
+       // Both popen() and proc_open() require: /bin/sh
+       if ($filled==9 && !is_executable("/bin/sh")) {
+               print "<h1>Current installation environment forbids the execution!</h1>\n";
+               $filled=0;
+               }
        if ($filled==9) {
                print "<TABLE BORDER=0><TR>";
                $cmd="echo -n -e '";