Ooops, forgot to post my examples
//THis came from Stack Overflow:
$conn_string = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=my_test)))';
$pdo = new PDO('oci:dbname=' . $conn_string, 'SYSTEM', 'rootpass');
Might be the service name? my_test is the name of my DB/connection.
Thx
Hi all,
I've used PDO without issue using MySQL but need to support Oracle as well. I've tried the example provided with the documentation but to no avail. Someone on Stack Overflow with a similar issue was told to try using the full connection string but that didn't work either.
Oracle: Oracle 18c Express Edition
Server: localhost / 127.0.0.1
Port: 1521
Database: my_test
Username: SYSTEM
Pass: rootpass
The above all works fine using Oracle SQL Developer tool so not sure what the issue is. Any ideas?
Cheers,
John
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.