How to connect to oracle db using only the host url in codeigniter

I have the public URL of port 192.168.1.9 and its username : test and password: test the oracle database. How can I connect to oracle database using this data and url in codeigniter?

+4
source share
1 answer

To do this, you will need to use the oci8 extension using the oci8 CI driver :

 $config['hostname'] = '192.168.1.9/XE'; // assuming it is XE $config['username'] = 'test'; $config['password'] = 'test'; $config['database'] = 'dbname'; $config['dbdriver'] = 'oci8'; 

This works _should_.

If you were hoping to use PDO for it, this is not possible. Mostly due to pdo_oci weirdness and driver crash, that is, CI database drivers .

+2
source

Source: https://habr.com/ru/post/1401343/


All Articles