note 90010 deleted from function.oci-connect by sixd
| From: | sixd@php.net | Date: | Wed, 09 Dec 2009 23:51:50 +0000 |
| Subject: | note 90010 deleted from function.oci-connect by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163796@lists.php.net to get a copy of this message | ||
Note Submitter: jstokes at heartofthefyre dot us
----
The docs seem short on information if you want to connect to an Oracle database on a different host.
Here's the info shamelessly copied from The Underground PHP Oracle Manual:
If you are running Oracle Database XE on a machine called mymachine, and the PHP-enabled web server
is
on the same machine, you could connect to the HR schema with:
$c = oci_connect('hr', 'hrpwd', 'mymachine/XE');
In this guide, we assume the database is on the same machine as Apache and PHP so we use localhost:
$c = oci_connect('hr', 'hrpwd', 'localhost/XE');
Depending on your network configuration, you may need to use the equivalent IP address:
$c = oci_connect('hr', 'hrpwd', '127.0.0.1/XE');
The Easy Connect string is JDBC-like. The Oracle 10g syntax is:
[//]host_name[:port][/service_name]
If PHP links with Oracle 11g libraries, the enhanced 11g syntax can be used:
[//]host_name[:port][/service_name][:server_type][/instance_name]