By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,829 Members | 2,308 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,829 IT Pros & Developers. It's quick & easy.

exec problems

P: n/a
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><title>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

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I think ....... that you must check php.net. I think a security settings
has to do with it (safe mode). This shoudl be changed at the php
configuration.
Adrian Pach wrote:
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><title>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

Jul 17 '05 #2

P: n/a
Adrian Pach wrote:
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><title>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


see the topic "opendir() in safe mode" dated 6/24
Michael Austin.
Jul 17 '05 #3

P: n/a
"Michael Austin" <ma*****@firstdbasource.com> schrieb im Newsbeitrag
news:MG*****************@newssvr24.news.prodigy.co m...
Adrian Pach wrote:
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><title>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


see the topic "opendir() in safe mode" dated 6/24
Michael Austin.


Thanks,

what is what i want.

Adrian

PS. if it works i wrote it down there and then not too

Jul 17 '05 #4

P: n/a
"Michael Austin" <ma*****@firstdbasource.com> schrieb im Newsbeitrag
news:MG*****************@newssvr24.news.prodigy.co m...
Adrian Pach wrote:
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><title>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


see the topic "opendir() in safe mode" dated 6/24
Michael Austin.


all works fine. Now i can start the program, but it starts with the
user apache and not with the user xxx what i have configured. The user
xxx can go on a html-page and must be authorized himself with
password, the apache server know which user there are. But the skript
is not started with this user. WHY?

Hope someone can help me?

Adrian

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.