From:             andrew at howells-solicitors dot com
Operating system: Windows NT 4 sp6a
PHP version:      4.3.4
PHP Bug Type:     ODBC related
Bug description:  Unable to connect to ODBC database

Description:
------------
I am using PHP 4.3.4 & Apache 1.3.28 all on Windows NTT 4. I have a remote
Progress database server that serves as backednd to a practice management
and accounts suite we use in-house. I want to use PHP to provide a web
based interface to this database but am having some entertaining
problems.

I've tried the progress supplied Merant ODBC drivers as well as the
OpenLink ODBC drivers. Both connect fine, however, if I try connecting
using PHP loaded as a module ito apache I cannot connect to the DB, the
ODBC driver refuses to load.

However, If I execute the script from the comand line

"php E:\webpages\intranet\sostest2.php" 

The connection is established ok.

Reproduce code:
---------------
<?php
$connection = odbc_connect("system_dsn","user_name","password",
SQL_CUR_USE_ODBC);

odbc_prepare($connection, "select * from pub.users");

odbc_execute($result);


Expected result:
----------------
No errors !

Actual result:
--------------
== Using Openlink ==

Warning: odbc_connect(): SQL error: [OpenLink][ODBC][Driver]Connection
rejected by data source, SQL state 08004 in SQLConnect in
e:\webpages\intranet\sostest2.php on line 8

Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link
resource in e:\webpages\intranet\sostest2.php on line 10

Warning: odbc_execute(): supplied argument is not a valid ODBC result
resource in e:\webpages\intranet\sostest2.php on line 12

== Using Merant ==

Warning: odbc_connect(): SQL error: Specified driver could not be loaded
due to system error 5 (MERANT 3.60 32-BIT Progress SQL92 v9.1B)., SQL
state IM003 in SQLConnect in e:\webpages\intranet\sostest2.php on line 8

Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link
resource in e:\webpages\intranet\sostest2.php on line 10

Warning: odbc_execute(): supplied argument is not a valid ODBC result
resource in e:\webpages\intranet\sostest2.php on line 12


-- 
Edit bug report at http://bugs.php.net/?id=26116&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26116&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26116&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26116&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26116&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26116&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26116&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26116&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26116&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26116&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26116&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26116&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26116&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26116&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26116&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26116&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26116&r=float

Reply via email to