CodeIgniter Forums
ociserverversion() error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: ociserverversion() error (/thread-1725.html)



ociserverversion() error - El Forum - 06-22-2007

[eluser]phpworker[/eluser]
Hi there and thanks for Code Igniter framework! It's great :O

Here is my problem:

For about 2 days I am fighting with (suppose silly) error message that obstinately appears on the screen. This is the msg:

Code:
An Error Was Encountered

Unable to connect to your database server using the provided settings.

I am trying to connect with Oracle db using oci8 driver. I tested the connection on the same server with strip php code and I see another message:

Code:
Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in /usr/local/apache2/htdocs/krzysztofk/oracle.php on line 42

from time to time there's no error from oracle.php file at all and data is received from database.

Here is my oracle.php file source:

Code:
<?php
$active_group = "default";

$db['default']['hostname'] = '(DESCRIPTION =
           (ADDRESS =
        (PROTOCOL = TCP)
        (HOST = 192.168.99.109)
        (PORT = 1521)
        (HASH =1111)
     )
         (CONNECT_DATA =(SID = devtst))
     )';
$db['default']['username'] = "ap";
$db['default']['password'] = "ap";
$db['default']['database'] = "devtst";
$db['default']['dbdriver'] = "oci8";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['active_r'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
?>

$db['default']['hostname'] value is taken originally from tnsnames.ora config file.

I also connect with db using Oracle PL/SQL Developers (from my computer) and everything is OK.

We have apache server on Fedora Linux and oci8 is already activated there.

I understand that this is Oracle-like problem and maybe I am knocking on wrong door, but if you see any solution here, please help!

We are planning to reinstall the server next week, so I want to be sure we do not get this error next time.

Thanks for your help!