Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Connect php to oracle

Re: Connect php to oracle

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Thu, 15 Jan 2004 08:50:47 -0600
Message-ID: <2l9d005qqc1qi7qep0tk0g4lnj6ldaiks9@4ax.com>


Matt <matthiar_at_gmx.net> wrote:

>Tore Skogly wrote:
>> Andy Hassall wrote:
>>
>>
>>> Use single quotes.
>>>
>>> In double quotes, \n turns into newline, \t turns into tab. You don't
>>> want
>>>this.
>>>
>>> Alternatively use / instead of \, as Windows will accept / as a directory
>>>separator.
>>>
>>>
>>>> $db="
>>>> (DESCRIPTION =
>>>> (ADDRESS_LIST =
>>>> (ADDRESS =
>>>> (PROTOCOL = TCP)
>>>> (Host = <server ip>)
>>>
>>> Presumably this is not the real code.
>>>
>>>
>>>>Connection Test
>>>>Warning: ocilogon(): _oci_open_server: Error while trying to retrieve text
>>>>for error ORA-12538 in c:\inetpub\wwwroot\oci8test.php on line 17
>>>
>>>
>>> Indicates ORACLE_HOME not set correctly, because of the \n \t confusion
>>>earlier.
>>>
>>
>>
>> Thanks for your reply.
>> I changed from double to single quotes, but with the same result.
>> Unfortunately it didn't help me any further....
>>
>> I removed all environment settings from the php-page and tried to add a
>> third parameter (the tnsnames.ora entry) to OCILogon().
>> This resulted in the following output from my php page:
>>
>> =====================
>> Connection Test
>> Warning: ocilogon(): _oci_open_server: Error while trying to retrieve text
>> for error ORA-12154 in c:\inetpub\wwwroot\oci8test.php on line 4
>> Oracle Connect Error
>> =====================
>>
>> As you notice the ORA error message changed from 12538 to 12154, but still
>> no Oracle connection...
>>
>did you look into the nls_lang parameter?

Also, the error message indicates that the system does not know where the Oracle_Home is . The part ' Error while trying to retrieve text for error' ( regardless of the error number that follows) means that the error handler cannot find <ORACLE_HOME>/<subdirectory that contains the error message text> . Be sure the running script has the environment values set correctly. Received on Thu Jan 15 2004 - 08:50:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US