Hi,
i have more then less Problems with this script.
the php.ini have this config:
Safe_Mode = ON, Regest_Globals == OFF
<?php
$server = $_GET[Server];
$_ENV['PATH']="/path/path2";
if ($prog == "start") { on(); };
if ($prog == "stop") { off(); };
function on () {
exec("/path/path2/script start", $error );
echo "$error[0]<br> $error[1]<br> $error[2]<br>start";
}
function off () {
exec("/path/path2/script stop", $error);
echo "$error[0]<br> $error[1]<br> $error[2] <br>stopt";
}
echo "<html><head><t itle>TESTING</title></head><body>";
echo "<form ation=\"./path/phpscript.php\" method=\"GET\"> "
."<input type=\"submit\" name=\"prog\" value=\"start\" >"
."<input type=\"submit\" name=\"prog\" value=\"stop\"> "
."</form>";
echo "</body></html>";
So my problem is that the messages are writen on screen and it seems
to bee run, but finally the prog doesn't start.
The messages are the same as i start the prog over the shell with
../prog start. The Prog is a bash-programm that start a deamon with
childprozess.
Who can help me?
best regards
Adrian
i have more then less Problems with this script.
the php.ini have this config:
Safe_Mode = ON, Regest_Globals == OFF
<?php
$server = $_GET[Server];
$_ENV['PATH']="/path/path2";
if ($prog == "start") { on(); };
if ($prog == "stop") { off(); };
function on () {
exec("/path/path2/script start", $error );
echo "$error[0]<br> $error[1]<br> $error[2]<br>start";
}
function off () {
exec("/path/path2/script stop", $error);
echo "$error[0]<br> $error[1]<br> $error[2] <br>stopt";
}
echo "<html><head><t itle>TESTING</title></head><body>";
echo "<form ation=\"./path/phpscript.php\" method=\"GET\"> "
."<input type=\"submit\" name=\"prog\" value=\"start\" >"
."<input type=\"submit\" name=\"prog\" value=\"stop\"> "
."</form>";
echo "</body></html>";
So my problem is that the messages are writen on screen and it seems
to bee run, but finally the prog doesn't start.
The messages are the same as i start the prog over the shell with
../prog start. The Prog is a bash-programm that start a deamon with
childprozess.
Who can help me?
best regards
Adrian
Comment