From:             akoebel at capgemini dot fr
Operating system: Ubuntu 7.10
PHP version:      5.2.5
PHP Bug Type:     PDO related
Bug description:  Segfault when selecting from a "long" column using Odbc with 
TimesTen driver

Description:
------------
We're having some difficulties using PDO
in conjunction with Oracle TimesTen 7.03 ODBC driver
and long column datatypes.

Oracle table :
CREATE TABLE TEST (ID NUMBER(10) NOT NULL PRIMARY KEY,DATA LONG NOT
NULL);

INSERT INTO TEST VALUES (1,'sample');

TimesTen :
CREATE READONLY CACHE GROUP FROM TEST (ID NUMBER(10) NOT NULL PRIMARY KEY,
DATA VARCHAR(256000);

Note that timesten doesn't support the long datatype directly.

Odbc.ini : 
[myDSN]
Datastore=/home/sieadmin/tt
PermSize=100
TempSize=100
UID=test
OracleId=XE
OraclePwd=test
DatabaseCharacterSet=WE8MSWIN1252

[testClient]
DRIVER = /opt/TimesTen/tt70/lib/libtten.so
DataStore=/home/sieadmin/tt
PermSize=100

PHP File : 

<html><head><title>PDO</title></head>
<body>
 <?php
$conn=new PDO('odbc:testClient','test','test');
$sql="SELECT ID, DATA FROM TEST";
$rs=$conn->prepare($sql);
$rs->execute();

while ($res=$rs->fetch()) {
 print_r($res);
}
$conn=null;
?>
</body>
</html>

This script was executed on these platforms:
-Ubuntu 7.10 with PHP5.2.3 PDO/unixODBC, TimesTen ODBC Driver
-Ubuntu 7.10 with PHP5.2.3 PDO/unixODBC, Oracle ODBC Driver
-Ubuntu 7.10 with PHP5.2.3 ODBC, TimesTen Driver
-Windows with PHP5.2.3 PDO, TimesTen Driver
-Windows with PHP5.2.5 PDO, TimesTen Driver

On Ubuntu with PDO and the timesten driver, the script segfaults, unless
the long column is restricted to less than 255 characters (with a SUBSTR in
the SQL query).

On windows, the script doesn't segfaults, but no data is displayed from
the long column, wether it is over or under 255 chars long.

Other configurations (using odbc instead of PDO or using the Oracle driver
instead of the TimesTen driver) work well

Unix backtrace (without PHP debug):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216518480 (LWP 5544)]
0xb6f719d6 in ?? () from /usr/lib/libodbccr.so.1
(gdb) bt
#0  0xb6f719d6 in ?? () from /usr/lib/libodbccr.so.1
#1  0x083c7310 in ?? ()
#2  0x00000001 in ?? ()
#3  0x00000001 in ?? ()
#4  0x00000001 in ?? ()
#5  0x00000001 in ?? ()
#6  0x0000000e in ?? ()
#7  0x00000000 in ?? ()



-- 
Edit bug report at http://bugs.php.net/?id=43445&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43445&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43445&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43445&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43445&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43445&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43445&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43445&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43445&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43445&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43445&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43445&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43445&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43445&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43445&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43445&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43445&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43445&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43445&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43445&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43445&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43445&r=mysqlcfg

Reply via email to