ID: 39756
Updated by: tony2001@php.net
Reported By: tobias dot barth at web-arts dot com
-Status: Open
+Status: Feedback
Bug Type: ODBC related
Operating System: SuSE Linux 10.1
PHP Version: 4.4.4
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-12-06 15:44:27] tobias dot barth at web-arts dot com
tried it, and got the same result as before.
------------------------------------------------------------------------
[2006-12-06 15:27:23] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2006-12-06 15:16:22] tobias dot barth at web-arts dot com
Description:
------------
I got SuSE 10.1, a self-compiled php 4.4.4 (also tried the
php5-5.1.2-29.22 from SuSE and php 5.1.4 from the php website with the
same result), unixODBC, apache 2.2 and MaxDB 7.6 on an AMD X2 x86_64
platform with the following table:
CREATE TABLE "PRESSESTIMMEN"
(
"ID" Fixed (18,0) NOT NULL,
"TITLE" Varchar (100) ASCII,
"HEADLINE" Varchar (250) ASCII,
"DATUM" Date,
"TEXT" Long ASCII,
"BILD_NAME" Varchar (100) ASCII,
"BILD_TYPE" Varchar (120) ASCII,
"BILD_SIZE" Fixed (18,0),
"BILD" Char (2) ASCII,
"ARCHIVDATUM" Date,
PRIMARY KEY ("ID")
)
doing a
$a = odbc_exec ($dbcon, select id,title,headline,datum from
pressestimmen");
while (odbc_fetch_into ($a, $row)) {
...
}
works well. But if I modify the select statement:
$a = odbc_exec ($dbcon, select * from pressestimmen");
only reads out the first line. The second call to "odbc_fetch_into"
crashes. in the error_log of apache, I see
*** glibc detected *** /usr/sbin/httpd2-prefork: free(): invalid
pointer: 0x0000
555555c2df40 ***
If I modify the select statement to
$a = odbc_exec ($dbcon, "select id,title,headline,datum,text from
pressestimmen");
I get the same problems. I think it is because of the data type "long
ascii" of the "text" column. I had this software running on php3 and
php4 since the days of SuSE 7.0 on 32 bit platforms until SuSE 10.0 and
SuSE 10.1 on a dual XEON 32 bit platform without problems, but now on
the 64 bit machine, it crashes. So I think, it is an 64 Bit problem
with the Long Ascii data type.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39756&edit=1