Note that there are some explanatory texts on larger screens.

plurals
  1. POConnect Codeigniter to Oracle 11g
    text
    copied!<p>Please help! i can't connect codeigniter to Oracle I am trying to connect Codeigniter to Oracle 11g, here are my settings</p> <pre><code>Settings in database.php: $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = "//localhost/"; $db['default']['username'] = 'xxxxxxx'; $db['default']['password'] = 'xxxxxxx'; $db['default']['database'] = 'orcl'; $db['default']['dbdriver'] = 'oci8'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE; </code></pre> <p>Note: I added the C:\instantclient_11_2 to environment variable to PATH. </p> <pre><code>oracle port number: oracle hostname: Home-pc database name: orcl </code></pre> <p>Only when I run my CodeIgniter login code it shows this error message:</p> <pre><code>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 </code></pre> <p>But I can connect to Oracle when I run a simple php code like:</p> <pre><code>&lt;?php $conn = oci_connect("xxxxxx", "xxxxxx",""); if (!$conn) { echo "Not connected!"; } else echo "yahooooooooo!!!!!!!!!!"; ?&gt; </code></pre> <p>Result: yahooooooooo!!!!!!!!!!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload