Does anyone know how to connect the oracle to codeigniter?

Asked

Viewed 1,381 times

3

I’m not getting the connection codeigniter in the oracle.

Displays this error:

A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'
Filename: database/DB.php
Line Number: 144

Database:

$db['default']['hostname'] = 'HOST:PORT/SID';
$db['default']['username'] = 'USER';
$db['default']['password'] = 'PASS';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'oci8';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$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;

Module in apache enabled:

extension=php_oci8.dll      
extension=php_oci8_11g.dll

What can it be?

  • 1

    The module is enabled on php.ini?

  • http://stackoverflow.com/a/9877694/370290 - important information on comments - your question is identical to this one: http://stackoverflow.com/questions/6758328/codeigniter-and-oracle-undefined-constant-oci-commit-on-success - the answer to all of them is to install the mode, check php.ini being used, restart Apache... somehow enable the module, that although you think you are enabled, you are not yet.

  • 1

    Solved!!!! User should be lowercase and was in UPPERCASE!!!

1 answer

2

After a quick search, everything indicates that the answer can only be that, contrary to what was stated in the question, the module is not enabled. It remains to know how to do to effectively enable it.

  • You restarted Apache after changing settings?
  • Check which php.ini is being effectively used. It may be a different file. (For example, the php.ini activated by the command line is not the same php.ini browser-enabled.)
  • Make sure you don’t have any .htaccess or equivalent by modifying the configuration.
  • The module was enabled. The problem was with the database user.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.