I have tried to make oci_connect work, by following these directions, but I still get the error:
ora-24408 could not generate unique server group name in test.php
Here is my PHP snippet (with bogus IP):
$tns2 = "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521)) (CONNECT_DATA = (SID = foo)))";
if ($conn = oci_connect("username","pwd", $tns2))
{
echo "Connected to foo";
oci_close($conn);
}
else
{
die("could not connect to foo");
}
I use SQL Developer and can connect to this database just fine from this Ubuntu server. I also have Java applications that connect from this Ubuntu server to the remote Oracle database without any problems.
What am I missing to make PHP work?
I even did the phpinfo() and it showed the oci8 information.
Take a closer look to oci_connect.
And try with this conection string: "123.123.123.123:1521/foo"
$conn = oci_connect("username","pwd", "123.123.123.123:1521/foo");
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With