Oracle TNS no listener
am 07.06.2007 11:24:05 von Steve Davies
Hi All
I've a bit code that connects to a remote Oracle DB, does a simple query
and returns the result.
Running from a Windows command prompt as
php oratest.php
the script runs fine and returns the results I'm expecting.
If I run it through a browser I get
oci_connect() [function.oci-connect]: ORA-12541: TNS:no listener in .......
Webserver is IIS on my local box. PHP is running on my local box.
I've got TNS_ADMIN set as an env variable
Any help gratefully received :-)
Cheers
Steve
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Oracle TNS no listener
am 07.06.2007 16:58:23 von David Mitchell
------=_Part_33894_4624969.1181228303587
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Have you rebooted windows since setting the environment variable? I believe
that's the only way for windows services to see the change.
HTH
On 6/7/07, steve@sdconsulting.co.uk wrote:
>
> Hi All
>
> I've a bit code that connects to a remote Oracle DB, does a simple query
> and returns the result.
>
> Running from a Windows command prompt as
>
> php oratest.php
>
> the script runs fine and returns the results I'm expecting.
>
>
> If I run it through a browser I get
>
> oci_connect() [function.oci-connect]: ORA-12541: TNS:no listener in
> .......
>
> Webserver is IIS on my local box. PHP is running on my local box.
>
> I've got TNS_ADMIN set as an env variable
>
> Any help gratefully received :-)
>
> Cheers
>
> Steve
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
------=_Part_33894_4624969.1181228303587--
Re: Oracle TNS no listener
am 08.06.2007 06:51:15 von Christopher Jones
Make sure TNS_ADMIN is set to the directory name, not the file
itself. Also consider using the Easy Connect syntax.
We don't cover IIS in the Underground PHP & Oracle Manual, but
there may be some useful information e.g. on the various connection
syntaxes in the OCI8 driver. The URL is:
http://www.oracle.com/technology/tech/php/pdf/underground-ph p-oracle-manual.pdf
I once blogged all the info about IIS and Oracle that I'd
come across. http://blogs.oracle.com/opal/2006/05/01
You seem to have past the permission stage and it is probably
a simple matter to get the connection going
Chris
David Mitchell wrote:
> Have you rebooted windows since setting the environment variable? I
> believe
> that's the only way for windows services to see the change.
>
> HTH
>
> On 6/7/07, steve@sdconsulting.co.uk wrote:
>>
>> Hi All
>>
>> I've a bit code that connects to a remote Oracle DB, does a simple query
>> and returns the result.
>>
>> Running from a Windows command prompt as
>>
>> php oratest.php
>>
>> the script runs fine and returns the results I'm expecting.
>>
>>
>> If I run it through a browser I get
>>
>> oci_connect() [function.oci-connect]: ORA-12541: TNS:no listener in
>> .......
>>
>> Webserver is IIS on my local box. PHP is running on my local box.
>>
>> I've got TNS_ADMIN set as an env variable
>>
>> Any help gratefully received :-)
>>
>> Cheers
>>
>> Steve
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
--
Christopher Jones, Oracle
Email: Christopher.Jones@oracle.com Tel: +1 650 506 8630
Blog: http://blogs.oracle.com/opal/ Book: http://tinyurl.com/f8jad
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php