ID: 10879 Updated by: kalowsky Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: ODBC related Operating system: PHP Version: 4.0.5 Assigned To: Comments: that would be a bug in Solid I believe (re: short int). you might wish to contact them and inquire about it. marking this as closed as it follows the ODBC spec. Previous Comments: --------------------------------------------------------------------------- [2001-06-04 06:39:52] [EMAIL PROTECTED] Well.. using short int as a parameter for SQLNumParams() causes bus error and using int (or long) does not. Include files supplied with the Solid SDK also defines that this parameter should be short int, but the library itself seems to handle it as an int. Have I missed something or is this Solid's bug.. (?!) Anyway, with these two workarounds the Apache 1.3.19/mod_ssl 2.8.3/OpenSSL 0.9.6a/PHP 4.0.5/Solid SDK 3.50 combination seems to work correctly.. --------------------------------------------------------------------------- [2001-05-31 11:45:24] [EMAIL PROTECTED] actually the change in the source (which I thought made it into 4.0.5) was: from: #ifndef HAVE_DBMAKER if ((*pv_onoff)) { #else if (pv_onoff && (*pv_onoff)) { #endif to: if (pv_onoff && (*pv_onoff)) { the SQLSMALLINT and the SWORD are defined to be the same in Solid 3.5 (both are short ints). --------------------------------------------------------------------------- [2001-05-31 06:38:48] [EMAIL PROTECTED] Got little further, now commit is causing segmentation faults.. :) However changing line 2423 from ext/odbc/php_odbc.c from: #ifndef HAVE_DBMAKER if ((*pv_onoff)) { #else if (pv_onoff && (*pv_onoff)) { #endif to: #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) if ((*pv_onoff)) { #else if (pv_onoff && (*pv_onoff)) { #endif ..seems to fix problems this time... --------------------------------------------------------------------------- [2001-05-31 02:30:25] [EMAIL PROTECTED] Solidtech support have been contacted and they have provided new libraries for us (3.51.0154). Unfortunately this does not fix the problem. I also tried this with Solaris 7/Forte 6 compiler/php 4.0.5/solid SDK 3.51.0154 combination. Result is the same. After some debugging & core dumping I found out that casting odbc_result->numparams to long (instead of SWORD) fixes these problems. (line 270 on ext/odbc/php_odbc.h) According to the odbc specifications, second parameter for SQLNumParams() should be SQLSMALLINT. This is redefined as SWORD within the php_odbc.h (I wonder why), but removing this define does not fix the problem. It seems that even when Solid gets correct sized parameters it still writes beyond them and thus cause these bus errors. --------------------------------------------------------------------------- [2001-05-29 22:45:57] [EMAIL PROTECTED] Before we continue down this path please ensure you have the latest libraries from SolidTech. A bunch were distributed and did not contain any of the important parts built in. Contact solidtech support for more information (they are not available on the Web site). Once you're sure of this and it still happens... tell us more! --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10879&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]