|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-04-07 10:15 UTC] jonathan at caedic dot com
I'm using EasySoft's ODBC-ODBC Bridge 2000 ODBC driver with PHP. I've successfully used this driver with PHP3, PHP4b3 and PHP4b4. I used the following configure option: CUSTOM_ODBC_LIBS="-lesoobclient" \ ./configure --with-apache=../apache_1.3.12 \ --enable-track-vars \ --disable-debug \ --with-custom-odbc=/usr/local/easysoft/oob/client Now when I try to compile PHP4RC1 I get the following error: ~Make truncated for relevancy... Making all in odbc make[2]: Entering directory `/usr/local/src/php-4.0RC1/ext/odbc' make[3]: Entering directory `/usr/local/src/php-4.0RC1/ext/odbc' gcc -DHAVE_CONFIG_H -I. -I/usr/local/src/php-4.0RC1/ext/odbc -I../.. -I../../Zend -I/usr/ local/src/php-4.0RC1 -I/usr/local/sr c/apache_1.3.12/src/include -I/usr/local/src/apache_1.3.12/src/os/unix -I/usr/local/src/php- 4.0RC1/ext/mysql/libmysql -I/usr/ local/easysoft/oob/client/include -I/usr/local/src/php-4.0RC1/ext/xml/expat/xmltok -I/usr/ local/src/php-4.0RC1/ext/xml/expat/ xmlparse -DXML_BYTE_ORDER=12 -D_REENTRANT -g -O2 -c php_odbc.c && touch php_odbc.lo php_odbc.c: In function `php_if_odbc_execute': php_odbc.c:849: parse error before `FAR' php_odbc.c:852: parse error before `FAR' make[3]: *** [php_odbc.lo] Error 1 make[3]: Leaving directory `/usr/local/src/php-4.0RC1/ext/odbc' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/php-4.0RC1/ext/odbc' make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/local/src/php-4.0RC1/ext' make: *** [all-recursive] Error 1 I'm not sure what went wrong. Like I said, I've been using this type of setup for quite some time and the release candidate is the first time I've had any problems. Any help you can give would be greatly appreciated. I'm running RedHat 6.1 on Intel box, apache 1.3.12, ODBC-ODBCBridge Client 1.0.0.6. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Jun 27 14:00:01 2026 UTC |
I applied the following patch from Sandino Araico and this fixed the problem. --- php-4.0RC1-orig/ext/odbc/php_odbc.c Mon Mar 13 23:15:33 2000 +++ php-4.0RC1/ext/odbc/php_odbc.c Fri Apr 7 11:17:43 2000 @@ -846,10 +846,19 @@ char buf[4096]; int fp, nbytes; while(rc == SQL_NEED_DATA) { - rc = SQLParamData(result->stmt, (PTR FAR *)&fp); +/* The reported errors were parse error before FAR on both SQLParamData and + * SQLPutData; so I replaced them with the correct types from + * /usr/local/easysoft/oob/client/include/sql.h on lines 754 and 759 + */ + + /*rc = SQLParamData(result->stmt, (PTR FAR *)&fp);*/ + /* oob uses SQLPOINTER instead of (PTR FAR *) in SQLParamData */ + rc = SQLParamData(result->stmt, (SQLPOINTER *)&fp); if (rc == SQL_NEED_DATA) { while((nbytes = read(fp, &buf, 4096)) > 0) - SQLPutData(result->stmt,(UCHAR FAR*) &buf, nbytes); + /*SQLPutData(result->stmt,(UCHAR FAR*) &buf, nbytes);*/ + /* oob uses SQLPOINTER instead of (UCHAR FAR *) in SQLPutData */ + SQLPutData(result->stmt, (SQLPOINTER)&buf, nbytes); } } } else { -Jonathan Younger jonathan@caedic.com