php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4067 Fails to compile with EasySoft ODBC Bridge
Submitted: 2000-04-07 10:15 UTC Modified: 2000-05-17 15:58 UTC
From: jonathan at caedic dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Release Candidate 1 OS: RedHat Linux 6.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jonathan at caedic dot com
New email:
PHP Version: OS:

 

 [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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-11 14:10 UTC] jonathan at caedic dot com
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
 [2000-05-17 15:58 UTC] jonathan at caedic dot com
This has been fixed in RC2.

Thanks!
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Jun 27 16:00:01 2026 UTC