PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #7216

OCI8 module ignores non-standard port

Details

Submitted2006-03-27 13:57 UTC
Fromandrew_kerr at iamnos dot ca
Assignedaharvey
StatusClosed
PackageDB
PHP Version4.4.2
OSLinux (RHEL4)
Roadmaps(Not assigned)

Comments

[2006-03-27 13:57 UTC] andrew_kerr at iamnos dot ca

Description:
------------
The OCI8 module will always attempt to connect to port 1521, even if a different port is specified in the DSN.

Test script:
---------------
$dsn = 'oci8://user:pass@10.10.10.1:1522/dbname';
$db =& DB::connect($dsn);
if (DB::isError($db)) {
echo "Failed connection\n";
}

Expected result:
----------------
No error message.

Actual result:
--------------
Failed connection.
A tcpdump shows that it is trying to connect on the default port (1521)

[2006-03-28 16:23 UTC] tom at greenleaftech dot net

I'm not sure I understand what you're asking us to do to verify this bug and/or a workaround.

You say "if no port is specified it would simply use
[hostspec]", but the whole point is that we are trying to use a port. Can you advise what string to pass as a $dsn to connect using an instantclient when using an alternate port?

Thanks, Tom

[2006-04-04 11:36 UTC] tom at greenleaftech dot net

I can confirm that:

$dbtype="oci8";

$dbuser="user";

$dbpass="pass";

$dbhost="///host";
$dbport="port";

$dbname="dbname";

works fine. I'm appending the port as well, as in my case, I'm using a non-standard port.

$oradsn="$dbtype://$dbuser:$dbpass@$dbhost:$dbport/$dbname";

Thanks, Tom