note 7356 modified in function.ociplogon by felipe
| From: | felipe@php.net | Date: | Mon, 26 May 2008 19:49:56 +0000 |
| Subject: | note 7356 modified in function.ociplogon by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139816@lists.php.net to get a copy of this message | ||
After hours of weird searching and "try an error"-games with oracle and php I've got
my working system with connection to a remote oracle server. Yeah! Documentation is very bad for
this topic and the posts in all the mailing lists are very confusing. But now...
cheers. it works!
here my working sample code (php4 on debian, oracle 8.1.5.0.2 client, oracle 8i enterprise server on
win2k)
michel
<?php
$user = "scott";
$pass = "tiger";
$tns_name = "my_service_name_in_tnsnames.ora";
// set ORACLE Dir to get the NET8 name resolver working
// tnsnames.ora has to be in $ORACLE_HOME/networking/admin/
putenv("ORACLE_HOME=/home/oracle01/app/oracle/product/8.1.5");
// log on to oracle server using data above
$db_id = OCILogon ($user, $pass, $tns_name);
?>
--was--
After hours of weird searching and "try an error"-games with oracle and php I´ve got my
working system with connection to a remote oracle server. Yeah! Documentation is very bad for this
topic and the posts in all the mailing lists are very confusing. But now...
cheers. it works!
here my working sample code (php4 on debian, oracle 8.1.5.0.2 client, oracle 8i enterprise server on
win2k)
michel
<pre>
$user = "scott";
$pass = "tiger";
$tns_name = "my_service_name_in_tnsnames.ora";
// set ORACLE Dir to get the NET8 name resolver working
// tnsnames.ora has to be in $ORACLE_HOME/networking/admin/
putenv("ORACLE_HOME=/home/oracle01/app/oracle/product/8.1.5");
// log on to oracle server using data above
$db_id = OCILogon ($user, $pass, $tns_name);
</pre>
http://php.net/manual/en/function.ociplogon.php