#38749 [Opn->WFx]: odbc_connect failing on Unix platform

From: Date: Mon, 09 Jul 2007 12:07:45 +0000
Subject: #38749 [Opn->WFx]: odbc_connect failing on Unix platform
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114778@lists.php.net to get a copy of this message
 ID:               38749
 Updated by:       jani@php.net
 Reported By:      david dot rothwell at wolseley dot co dot uk
-Status:           Open
+Status:           Wont fix
 Bug Type:         ODBC related
 Operating System: SunOS 5.9
 PHP Version:      5.1.6
 New Comment:

Obviously that "3rd party odbc driver" is not supported by PHP odbc
extension. Try using pdo_odbc instead. Won't fix in ext/odbc.


Previous Comments:
------------------------------------------------------------------------

[2006-09-08 10:52:02] david dot rothwell at wolseley dot co dot uk

Description:
------------
Using odbc_connect is resulting in SQL state 08001 when using third
party odbc driver. ODBC client program isql connects ok using the same
driver. What are the primary differences between the two methods.
Tracing of the third party application suggests the connection request
is being made. The configure line is:
'./configure' '--with-apxs2=/usr/local/apache-2.0.54/bin/apxs'
'--prefix=/usr/local/apache-2.0.54/php' '--enable-threads=posix'
'--enable-cgi-redirect' '--with-mysql=/usr/local/mysql'
'--with-oci8=shared,instantclient,/var/opt/oracle/instantclient'
'--enable-sigchild' '--enable-inline-optimization' '--with-zlib'
'--with-gd' '--with-freetype-dir=/usr/local/freetype-2.2.1'
'--with-pdflib=/usr/src/packages/PDFlib-6.0.3p1-SunOS-sparc/bind/c'
'--with-jpeg-dir=/usr/local/lib' '--with-png' '--with-ttf'
'--with-xpm-dir=/usr/local' '--enable-gd-native-ttf'
'--with-unixODBC=/usr/local'

Reproduce code:
---------------
<html>
<head></head>
<body>
<?php
	$dsn="dave-1";
	
	$db_user="";
	$db_pwd="";
	
	echo "Opening connection to Reality host moon-1 using dsn ".$dsn.".
Please wait...<br />";


    $rfp = odbc_connect($dsn, $db_user, $db_pwd);
	
	if($rfp){
		echo "Connected to ".$dsn;
	} else {
		echo "Connection failed!";
	}
	echo "<hr>";

	phpinfo();
	?>
</body>
</html>

Expected result:
----------------
A connection to remote system allowing queries to be executed



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38749&edit=1


Thread (2 messages)

« previous php.bugs (#114778) next »