php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7316 OpenLink/IODBC error
Submitted: 2000-10-18 15:21 UTC Modified: 2001-01-02 15:33 UTC
From: joe at soundprint dot org Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.3pl1 OS: RedHat 7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: joe at soundprint dot org
New email:
PHP Version: OS:

 

 [2000-10-18 15:21 UTC] joe at soundprint dot org
I'm having problems with using openlinks drivers with 4.0.3pl1(everything worked fine in 4.0.1pl2)  

I'm now receiving Warning: SQL error: [OpenLink][ODBC][Driver]General error, SQL state S1000 in SQLPrepare in /home/joe/public_html/grant/test.php on line 9 and possibly others, if the prepare would work.

Here's the code sample:
$conn=odbc_connect($db, $user,$pass);

$q="select * From tblAlbums";
$stmt = odbc_prepare($conn, $q );  //this is where it's dies

Configure line (stolen from working 4.0.1pl2)
./configure --with-apxs=/usr/local/apache/bin/apxs --with-openlink=/usr/local/openlink --with-iodbc=/usr/local/iodbc --with-mysql  --enable-EAPI=yes

I know about not using --with-openlink and --with-iodbc and have also tried these configure options(none of which worked):
./configure --with-apxs=/usr/local/apache/bin/apxs --with-iodbc=/usr/local/iodbc --with-mysql -enable-EAPI=yes

./configure --with-apxs=/usr/local/apache/bin/apxs --with-openlink --with-mysql -enable-EAPI=yes 

./configure --with-apxs=/usr/local/apache/bin/apxs --with-iodbc --with-mysql  -enable-EAPI=yes

./configure --with-apxs=/usr/local/apache/bin/apxs --with-openlink=/usr/local/openlink --with-mysql  -enable-EAPI=yes
The last option dies during compile:

make[3]: Entering directory `/usr/local/src/php-4.0.3pl1/ext/odbc'
/bin/sh /usr/local/src/php-4.0.3pl1/libtool --silent --mode=compile gcc  -I. -I/usr/local/src/php-4.0.3pl1/ext/odbc -I/usr/local/src/php-4.0.3pl1 -I/usr/local/src/php-4.0.3pl1/main -I/usr/local/apache/include -I/usr/local/src/php-4.0.3pl1/Zend -I/usr/local/src/php-4.0.3pl1 -I/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql -I/usr/local/openlink/odbcsdk/include -I/usr/local/src/php-4.0.3pl1/ext/xml/expat/xmltok -I/usr/local/src/php-4.0.3pl1/ext/xml/expat/xmlparse -I/usr/local/src/php-4.0.3pl1/TSRM  -DEAPI -DXML_BYTE_ORDER=12 -g -O2  -c php_odbc.c
make[3]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/odbc'
make[2]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/odbc'
make[1]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext'
php_odbc.c: In function `odbc_column_lengths':
php_odbc.c:619: `SQLINTEGER' undeclared (first use in this function)
php_odbc.c:619: (Each undeclared identifier is reported only once
php_odbc.c:619: for each function it appears in.)
php_odbc.c:619: parse error before `len'
php_odbc.c:648: `len' undeclared (first use in this function)
make[3]: *** [php_odbc.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-28 15:49 UTC] kalowsky@php.net
please try this with the latest CVS version.  You have experiences the SQLINTEGER vs SDWORD problem on your last configure example.  This is the same as bug #5526.

The other options I'm not sure about at this time.  Sorry.
 [2001-01-02 10:26 UTC] joe at soundprint dot org
Sorry, I'd forgotten about this one, I've worked around that problem, there are other ODBC problems, but that's another bug.
 [2001-01-02 15:33 UTC] kalowsky@php.net
User reports problem is no longer... if it returns, please reopen the bug.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 22:00:01 2026 UTC