From: iolaire dot mckinnon at vcint dot com
Operating system: RedHat Linux 9
PHP version: 4.3.3
PHP Bug Type: OCI8 related
Bug description: Valid select using OCI8 causes integer overflow error in Oracle
Description:
------------
I'm using Redhat 9, connecting to a Oracle 8.7.1 db. I have the following
PHP configuration:
'./configure' '--with-iodbc' '--with-mssql=/usr/local'
'--sysconfdir=/etc' '--with-mysql' '--with-layout=GNU' '--with-gettext'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--with-config-file-path=/etc/'
'--enable-ftp' '--enable-memory-limit' '--enable-xslt'
'--with-xslt-sablot' '--with-oracle=/store/OraHome1'
'--with-oci8=/store/OraHome1'
I connect successfully to the db using OCI8, but when I perform any
select, I get an "ORA-03120: two-task conversion routine: integer
overflow" error. This occurs even if I am only selecting one row. I can
successfully select using the same query with the standard Oracle
interface, and with SQLPlus. I also had this problem with php-4.3.2.
Reproduce code:
---------------
putenv("ORACLE_SID=REP");
putenv("ORACLE_HOME=/store/OraHome1");
putenv("TNS_ADMIN=/store/tnsnames.ora");
OCIInternalDebug(1);
$username = "MCKINNONI";
$passwd = "xxxxxxx";
$db="(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=xxxx)(PORT=1521)
)
)
(CONNECT_DATA=(SERVICE_NAME=REP))
)";
$conn = OCILogon($username,$passwd,$db);
$stmt = ociparse($conn,"select EMAIL from SpinroomEmailAddresses where
EMAIL = '[EMAIL PROTECTED]
int.com'");
ociexecute($stmt);
while (ocifetch($stmt))
echo "[".ociresult($stmt,"EMAIL")."]\n";
Expected result:
----------------
[EMAIL PROTECTED]
Actual result:
--------------
OCIDebug: _oci_open_server new conn=0 dname=(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=xxxx)(PORT=1521)
)
)
(CONNECT_DATA=(SERVICE_NAME=REP))
)<br />
OCIDebug: _oci_open_session new sess=5 user=MCKINNONI<br />
OCIDebug: oci_do_connect: id=6<br />
OCIDebug: oci_parse "select EMAIL from SpinroomEmailAddresses where EMAIL
= '[EMAIL PROTECTED]'" id=7 conn=6<br />
Warning: ociexecute(): OCIStmtExecute: ORA-03120: two-task conversion
routine: integer overflow
in /var/www/html/oracletest2.php on line 21
OCIDebug: START php_rshutdown_oci<br />
OCIDebug: END php_rshutdown_oci<br />
--
Edit bug report at http://bugs.php.net/?id=25818&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25818&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25818&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25818&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25818&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25818&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25818&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25818&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25818&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25818&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25818&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25818&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25818&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25818&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25818&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25818&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25818&r=float