Re: Oracle-PHP (contd.)
| From: | Philippe Saladin | Date: | Mon, 25 Jun 2001 06:44:08 +0000 |
| Subject: | Re: Oracle-PHP (contd.) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9803@lists.php.net to get a copy of this message | ||
Are you sure you need an environment variable to store that?
if yes, this script should do the trick :
putenv("TNS_ADMIN=/ora1/app/oracle/product/8.1.6/network/admin");
---
$tns = getenv(TNS_ADMIN);
echo $tns;
Regards,
Philippe
"Vandana" <vandana@gdit.iiit.net> a écrit dans le message news:
Pine.LNX.4.21.0106231239330.2014-100000@gdit.iiit.net...
>
> With reference to my previous problem in connecting to the oracle
> database, I found out some additional information.
> I defined the TNS_ADMIN variable in the startup file and added
> this line to my php-script:
> putenv("TNS_ADMIN=/ora1/app/oracle/product/8.1.6/network/admin");
>
> and when I tried to echo this variable
>
> echo("$TNS_ADMIN");
>
> The value is not being printed, it is not defined.When I tried the
> same thing at the command prompt the value was defined.What is the reason
> that the value of TNS_ADMIN is not being available to the php-script.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>