Hello
I have a big problem. I cannot build up any connection to an Oracle data base under Windows, Apache and PHP. I must say to this that I don't have any too great experience with Oracle and this what I have found in the internet till now hasn't helped me along particularly. Perhaps somebody knows a couple of tips or links for me.
Here some details:
Windows 4.0 SP6, Apache 1.3.12, PHP 4.0.6 CGI, Oracle client 8.1.5 installed
OCI extension enabled
in httpd.conf added:
SetEnv ORACLE_HOME "C:\Oracle\"
SetEnv TNS_ADMIN "C:\Oracle\Ora81Network\Admin\"
Source code:
putenv('ORACLE_SID=sch');
putenv('ORACLE_HOME=/Oracle');
putenv('TNS_ADMIN=c:/Oracle/Ora81/Network/Admin');
putenv('TWO_TASK = c:/Oracle/Ora81/Network/Admin.tnsnames.ora');
$connection=OCIlogon("ckis_mgr","ckis0815","sch");
$sql="SELECT distinct person.name1, person.name2 FROM aufenthalt, person WHERE aufenthalt.patient_pid = person.pid and aufenthalt.aufn_nr = '$bild'";
$stmt=ociparse($connection,$sql);
ociexecute($stmt, OCI_DEFAULT);
while(list($pnachname,$pvorname) = @ocifetch($stmt))
{
......
Unfortunately, I always get the same error message:
oci_open_server:Error while trying to retrieve text for ORA-12154 on line 43 (=OCIlogon-line)
Trying to connect with ODBC, a similar error message comes.
If I however access the Oracle data base with SQLPlus, it works wonderfully. Well, I think that it is due to the environment variables (ORACLE_HOME, TNS_ADMIN) somehow? Perhaps somebody could help me along here and say, where and which changes must be done to get a connection: in the php.ini?, in WindowsNT environment?, in the Apache-httpd?, in Oracle's tnsnames.ora?
Many thanks
Micha