php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56654 Persistent connections are based on case-sensitive credentials
Submitted: 2005-11-16 10:41 UTC Modified: 2005-11-19 16:36 UTC
From: dziugas dot baltrunas at metasite dot net Assigned:
Status: Closed Package: oci8 (PECL)
PHP Version: 4.3.10 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dziugas dot baltrunas at metasite dot net
New email:
PHP Version: OS:

 

 [2005-11-16 10:41 UTC] dziugas dot baltrunas at metasite dot net
Description:
------------
Username (schema name), password and database (SID) in Oracle are always case-insensitive. However, OCI8 PECL package (and extension shipped with PHP distribution as well) does not take this into account and creates new connection if the same credential or database was given in changed case.

Please see a side note from the following bug:

http://bugs.php.net/bug.php?id=22674

Reproduce code:
---------------
<?

ociinternaldebug(1);

$conn1 = ociplogon("same_user", "same_pass", "same_sid");
$conn2 = ociplogon("SAME_USER", "same_pass", "same_sid");

?>

Expected result:
----------------
There should be only one connection made to the database, i.e. it should print something like this:

OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:923) 
OCI8 DEBUG: OCIEnvNlsCreate at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1066) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1091) 
OCI8 DEBUG: OCIServerAttach at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1100) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1110) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1119) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1128) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1138) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1149) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1159) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1168) 
OCI8 DEBUG: OCISessionBegin at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1202) 
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:923) 
OCI8 DEBUG: OCIAttrGet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1297) 
OCI8 DEBUG: OCITransRollback at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1313) 

Actual result:
--------------
There are actually two connections made to the server. It is visible both from the OCI8 debug info as well as executing "select machine,process,username,status from v$session order by process" and looking for the particular Apache child.

Here is a dump from OCI8 debug info (two calls to OCISessionBegin proves it):

OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:923) 
OCI8 DEBUG: OCIEnvNlsCreate at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1066) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1091) 
OCI8 DEBUG: OCIServerAttach at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1100) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1110) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1119) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1128) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1138) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1149) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1159) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1168) 
OCI8 DEBUG: OCISessionBegin at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1202) 
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:923) 
OCI8 DEBUG: OCIEnvNlsCreate at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1066) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1091) 
OCI8 DEBUG: OCIServerAttach at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1100) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1110) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1119) 
OCI8 DEBUG: OCIHandleAlloc at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1128) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1138) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1149) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1159) 
OCI8 DEBUG: OCIAttrSet at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1168) 
OCI8 DEBUG: OCISessionBegin at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1202) 
OCI8 DEBUG: OCITransRollback at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1313) 
OCI8 DEBUG: OCITransRollback at (/tmp/tmpdFzG1r/oci8-1.1.1/oci8.c:1313) 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-16 10:45 UTC] tony2001 at phpclub dot net
Please try this patch: 
http://tony2001.phpclub.net/dev/tmp/pecl_bug5986.diff
 [2005-11-19 16:36 UTC] tony2001 at phpclub dot net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC