Can anyone help. this is driving me insane. I am trying to write a
script that allows users to configure their Oracle server (change
tnsnames.ora, listener.ora, update some synomyms to allow them to
connect to a remote Oracle server, etc).
I'm using exec() and sudo on Linux to allow the Apache's nobody user to
run the startup and shutdown scripts for Oracle. I can shut down Oracle
and start it back up again (soft of) using the script below.
print "Closing down Oracle ";
flush();
exec("sudo /etc/rc.d/init.d/dbora stop");
print "Done ";
flush();
// Write out new tnsnames.ora and listener,.ora from the data
provided by the user
print "<br>Restarting Oracle with new configuration";
flush();
exec("sudo /etc/rc.d/init.d/dbora start");
print "Done";
flush();
Everything works EXCEPT I cannot get it to return from the 'dbora start'
command. The PHP script just sits there and won't budge. I've tried
putting an exit command into the dbora script to make it die when it's
finished but that doesn't seem to work either.
Why should the same script, with different parameters, act differently?
I've tried using shell_exec() to see if that makes any difference.
Sometime it works and continues after restarting Oracle, sometimes is
doesn't!!!
$msg=shell_exec("sudo /etc/rc.d/init.d/dbora start");
echo $msg;
flush();
Any help would be greatly appreciated.
Brian Higgins
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php