Do some checks for system() and error out where applicable

This commit is contained in:
james 2007-11-16 17:58:59 +00:00
parent c43567e76b
commit 40fe6cb88c
3 changed files with 18 additions and 0 deletions

View File

@ -128,6 +128,11 @@
echo "</table>";
if(!function_exists("system")) {
echo "<div class=\"error\">Sending requires php's system() function to be available</div>\n";
}
else
{
echo "<table border=0 cellspacing=0 cellpadding=30 width=\"100%\">";
echo "<tr><td align=center>";
echo "<input type=hidden name=action value=\"reallysend\">";
@ -141,6 +146,7 @@
echo "</td></tr>";
echo "</table>";
}
}
else if($_GET['action']=="reallysend" && $_GET['reallysend'] && $_GET['to'])
{
if(file_exists("../data/communication.lock"))

View File

@ -1,4 +1,9 @@
<?
if(!function_exists("system")) {
echo "DB Update requires php's system() function to be available\n";
exit;
}
//include the config.inc.php
//so we have the db connection info
require("../data/config.inc.php");

View File

@ -30,6 +30,13 @@ echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
<body>
<h1>SFIAB Installation - Step 2</h1>
<?
if(!function_exists("system")) {
echo "<div class=\"error\">Installation requires php's system() function to be available</div>\n";
echo "</body></html>";
exit;
}
if(!file_exists("data/config.inc.php"))
{
echo "<div class=\"error\">SFIAB Installation Step 1 is not yet complete.</div>";