php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32800 64 bit linux + php + IBM DB2
Submitted: 2005-04-22 11:38 UTC Modified: 2005-05-10 15:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tinko at siol dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.*, 5.* OS: 64 bit
Private report: No CVE-ID: None
 [2005-04-22 11:38 UTC] tinko at siol dot com
Description:
------------
Hello!
Kinda desperate here, since I've read all about php + db2 + apache, so is 
there a soul to help me?

I'm running SLES 9 (also SLES8 - the problem is the same) under z/VM on z900 
(1IFL) in 64 bit mode/version.
I successfuly installed IBM DB2 8.1 ESE (64 bit) with latest FixPacks. DB2 
runs fine, I can connect to DB2 on z/OS...
I've compiled (many versions) of php (with -m64) with IBM-DB2 included ... 
everything by the manual, and everything works fine - apache+php connect, 
insert, odbc_result_all, but when trying to do odbc_result with fetching i 
get the number of rows with no values...
After running query for several times I get emalloc errors in apache log...
(I've tried many different shapes of queries...allways the same result)
I've also tried to do the same configuration on 32 bit linux on intel 
...same php, db2, queries etc.... - everything works perfect and fast. So, i 
think there must be a 64 bit issue...
Any1 has any ideas? Please, please help
Thank You very much in advance,
Tinko


Reproduce code:
---------------
I found this...
In file included from /home/db2inst1/sqllib/include/sqlcli1.h:42,
                 from /ins/php-4.3.11/ext/odbc/php_odbc_includes.h:176,
                 from /ins/php-4.3.11/ext/odbc/php_odbc.c:37:
/home/db2inst1/sqllib/include/sqlcli.h:772:1: warning: "ODBCVER" redefined
In file included from /ins/php-4.3.11/ext/odbc/php_odbc.c:37:
/ins/php-4.3.11/ext/odbc/php_odbc_includes.h:28:1: warning: this is the location of the previous definition
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `safe_odbc_disconnect':
/ins/php-4.3.11/ext/odbc/php_odbc.c:201: warning: passing arg 1 of `SQLDisconnect' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c:204: warning: passing arg 1 of `SQLTransact' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c:204: warning: passing arg 2 of `SQLTransact' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c:205: warning: passing arg 1 of `SQLDisconnect' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `_close_odbc_conn':
/ins/php-4.3.11/ext/odbc/php_odbc.c:231: warning: passing arg 1 of `safe_odbc_disconnect' makes pointer from integer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `_close_odbc_pconn':
/ins/php-4.3.11/ext/odbc/php_odbc.c:259: warning: passing arg 1 of `safe_odbc_disconnect' makes pointer from integer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `odbc_bindcols':
/ins/php-4.3.11/ext/odbc/php_odbc.c:676: warning: passing arg 6 of `SQLBindCol' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_execute':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1042: warning: cast to pointer from integer of different size
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_data_source':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1223: warning: passing arg 2 of `odbc_sql_error' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `php_odbc_fetch_hash':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1434: warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_fetch_into':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1594: warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_result':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1825: warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c:1868: warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_result_all':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1972: warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `odbc_do_connect':
/ins/php-4.3.11/ext/odbc/php_odbc.c:2302: warning: cast from pointer to integer of different size


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-27 16:13 UTC] sniper@php.net
Might be related to bug #32830

 [2005-05-03 10:26 UTC] tinko at siol dot com
Problem solved with Your answer. Thank You very much.
Tinko
 [2005-05-08 21:58 UTC] sniper@php.net
Exactly what did you do? (there was no feedback on the other report..)

 [2005-05-09 09:39 UTC] tinko at siol dot com
I simply changed 'long int' to 'SDWORD'
in php_odbc_includes.h like it was said in bug #32830. I had this problem for a long time, and now is solved. It is a problem only on 64 bit platform...
Tinko
Thanks again....
 [2005-05-10 15:22 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC