php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7653 openlink - query error
Submitted: 2000-11-05 21:50 UTC Modified: 2001-03-16 08:35 UTC
From: breughel at nekonet dot co dot jp Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.3pl1 OS: turbolinux server
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: breughel at nekonet dot co dot jp
New email:
PHP Version: OS:

 

 [2000-11-05 21:50 UTC] breughel at nekonet dot co dot jp
Hi,

  I tried to install php-4.0.3pl1 with openlink and pdflib support. It seems that it can connect to the server but can't query it. Before the compilation, I modified something in php_odbc.c. I changed SQLINTEGER len; to SDWORD len; to successfully compile and install it. The pdflib on the other hand is working well.

############OUTPUT#############
connected to DSN: DSN=NIP

Warning: SQL error: [OpenLink][ODBC][Driver]General error, SQL state S1000 in SQLExecDirect in /usr/local/apache/htdocs/openlink.php on line 16
can not execute 'SELECT * FROM NIP.toa.NIP113' closing connection Resource id #1 

##########SCRIPT############
<html>
<head><title>Sample Output</title></head>
<body>
<?
putenv("LD_LIBRARY_PATH=/usr/local/openlink/odbcsdk/lib");
putenv("ODBCINSTINI=/usr/local/openlink/bin/odbcinst.ini");
putenv("ODBCINI=/usr/local/openlink/bin/odbc.ini");
$dsn="DSN=NIP";
$user="toa";
$password="";

$sql="SELECT * FROM NIP.toa.NIP113";
// directly execute mode
if ($conn_id=odbc_connect("$dsn","","")){
    echo "connected to DSN: $dsn<br>";
    if($result=odbc_do($conn_id, $sql)) {
        echo "executing '$sql'<br>";
         echo "Results: <br>";
        odbc_result_all($result,"border=1");
}
?>
 </body>
</html>

############CONFIGURE#############
./configure --with-apxs=/usr/sbin/apxs \
--with-gd --with-pdflib=/usr/local \
--with-config-file-path=/usr/local/apache \
--with-zlib-dir=/usr --with-ttf=/usr/local/include \
--with-jpeg-dir=/usr --with-tiff-dir=/usr \
--with-system-regex=yes --enable-debug=no \
--enable-track-vars --with-openlink=/usr/local/openlink

#############php.ini##############
I just copied the php.ini-dist and never touched it.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-17 09:39 UTC] kalowsky@php.net
Please try the latest PHP build as both of these issues have been (I believe) delt with in it.
 [2001-03-11 21:07 UTC] kalowsky@php.net
does this still continue in the latest release?
 [2001-03-16 08:35 UTC] kalowsky@php.net
No user feedback, considered fixed in latests releases/cvs.  If untrue, please reopen and update bug...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 14:01:28 2025 UTC