1
Everybody, good afternoon, everybody,
I’m having trouble calling a function in Oracle... This is the function:
function mataSessao(){
$connect = oci_connect('xxxx','xxxx','xxxxx','xxxxx');
$IDSESSAO = $_POST['idsessao'];
$IDSERIAL = $_POST['idserial'];
$matasessao = "ALTER SYSTEM KILL SESSION :IDSESSAO, :IDSERIAL IMMEDIATE";
$prepare = oci_parse($connect,$matasessao);
oci_bind_by_name($prepare, ':IDSESSAO', $IDSESSAO);
oci_bind_by_name($prepare, ':IDSERIAL', $IDSERIAL);
$resultado = oci_execute($prepare);
}
if (isset($_POST['kill'])) {
mataSessao();
}
She is returning
Warning: oci_bind_by_name(): in C: Program Files Easyphp-Devserver-14.1VC9 data localweb script index.php on line 61
Warning: oci_bind_by_name(): in C: Program Files Easyphp-Devserver-14.1VC9 data localweb script index.php on line 62
Warning: oci_execute(): in C: Program Files Easyphp-Devserver-14.1VC9 data localweb script index.php on line 63
Thanks in advance, guys.
There doesn’t seem to be an error ... there is more text in the message?
– rray
No, just that. But my command has no effect on the system. I call the function like this: if (isset($_POST['Kill'])) {mataSessao(); } and the system returns these warnings. For a moment I thought he was taking the null values, but I gave an echo and saw that it was normal.
– Júnior Marques
Also remember to send one
commit
to say that the transaction has ended– rray
I believe that in this command ALTER KILL may not accept reference parameter, you have already tried to send direct, to see what happens?
ALTER SYSTEM KILL SESSION $idsessao, $idserial IMMEDIATE
– adventistaam
- adventistaam, thus only Warning: oci_execute(): in C: Program Files Easyphp-Devserver-14.1VC9 data localweb script index.php on line 63
– Júnior Marques