Hi everyone.

I'm running a RedHat Linux 8.0 server with php 4.2.2 on apache. I'm
having trouble using the system execution commands. If any of these
commands are included in my script it hangs, I don't even get output
that is flushed before the command:

        echo 'Text to be flushed';
        flush();
        $ud = passthru('command parameters');

What's wrong? The command executed is "sudo service dansguardian
restart". I'm making a web interface for updating a config file for the
service dansguardian. But the changes won't be used before the service
has been restarted. On my old setup (RH 7.3) i could at least get the
output with system() or passthru(), but the script would still hang. Now
I get nothing. Well except if I comment out the system command, then
everything works fine (no infinite loops that could cause the hang), but
that doesn't get my service restarted....

I have edited my /etc/sudoers file so that the apache user can execute
/sbin/service. It works fine in console (with another username (can't
really su to apache))

Help me
Lasse Riis


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to