Connect Codeigniter to Oracle 11g |
[eluser]Unknown[/eluser]
Please help! i can't connect codeigniter to Oracle I am trying to connect Codeigniter to Oracle 11g, here are my settings Code: Settings in database.php: Note: I added the C:\instantclient_11_2 to environment variable to PATH. oracle port number: oracle hostname: Home-pc database name: orcl Only when I run my CodeIgniter login code it shows this error message: A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: D:\xampp\htdocs\ci\system\database\DB_driver.php Line Number: 124 But I can connect to Oracle when I run a simple php code like: Code: <?php Result: yahooooooooo!!!!!!!!!!
[eluser]Unknown[/eluser]
I solved this by uninstalling the full oracle 11g version and installing the express version of Oracle, it worked with the same settings.
[eluser]duartix[/eluser]
I too had a lot of problems connecting through a Full Oracle Client 11 install. This is how I did it: Code: $db['oracle']['username'] = "scott" If you do need to make the connection dynamic (making the database one of the connection parameters) this was the best solution I could find: http://ellislab.com/forums/viewthread/237839/
[eluser]duartix[/eluser]
Sending the full connect string was the only way I could find to connect at that time. However today we discovered that on a Linux machine connected to a remote database, we had to setup the Apache environment variables in order to get our tnsnames.ora and sqlnet.ora loaded (we needed the last one for LDAP authentication). Here (look for "TNS_ADMIN", it's at "Enabling the PHP OCI8 Extension on Linux", on step 6): http://www.oracle.com/technetwork/articl...84410.html As soon as the TNS_ADMIN environment variable is set for the Apache session and pointing to tnsnames.ora, it becomes possible to establish connections to the database by SID, without the need to feed in the whole connection string. |
Welcome Guest, Not a member yet? Register Sign In |