note 90010 added to function.oci-connect
| From: | jstokes at heartofthefyre dot us | Date: | Wed, 01 Apr 2009 20:40:14 +0000 |
| Subject: | note 90010 added to function.oci-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152722@lists.php.net to get a copy of this message | ||
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]
----
Server IP: 64.71.164.2
Probable Submitter: 199.74.155.50
----
Manual Page -- http://www.php.net/manual/en/function.oci-connect.php
Edit -- https://master.php.net/note/edit/90010
Del: integrated -- https://master.php.net/note/delete/90010/integrated
Del: useless -- https://master.php.net/note/delete/90010/useless
Del: bad code -- https://master.php.net/note/delete/90010/bad+code
Del: spam -- https://master.php.net/note/delete/90010/spam
Del: non-english -- https://master.php.net/note/delete/90010/non-english
Del: in docs -- https://master.php.net/note/delete/90010/in+docs
Del: other reasons-- https://master.php.net/note/delete/90010
Reject -- https://master.php.net/note/reject/90010
Search -- https://master.php.net/manage/user-notes.php