From:             brian dot garvis at mascommsys dot com
Operating system: Windows 2003 Server
PHP version:      4.3.2
PHP Bug Type:     ODBC related
Bug description:  odbc_connect fails to login to remote Dbase 5

Description:
------------
odbc_connect fails to connect to a Dbase 5 database which resides on a
separate Windows 2000 machine using Microsoft ODBC Data Source
Administrator.  If move database to local machine and point ODBC to local
database, then works.

PHP reports error: 
Warning: SQL error: [Microsoft][ODBC dBase Driver] '(unknown)' is not a
valid path. Make sure that the path name is spelled correctly and that you
are connected to the server on which the file resides., SQL state S1009 in
SQLConnect in C:\DEMO\wwwroot\login.php on line 16



Reproduce code:
---------------
<?php
//Connection statement
// *** Start the session
include "./WebFront/-general includes-/functions.php";
session_start();
// *** Validate request to log in to this site.
$KT_LoginAction = $HTTP_SERVER_VARS["REQUEST_URI"];
if (isset($HTTP_POST_VARS["id"])) {
  $KT_valUsername = $HTTP_POST_VARS['id'];
  $KT_fldUserAuthorization = "SecurityLevel";
  $KT_redirectLoginSuccess = "WebFront/Generated/Lobby.php";
  $KT_redirectLoginFailed = "login.php";
 $odbcSASI=odbc_connect("DEMOSASI","Administrator","z911!ABC");
 $odbcLOGIN=odbc_connect("DEMOLOGIN","","");
 $resultRS=odbc_exec($odbcSASI,"SELECT * FROM AUSR WHERE
UCASE([USERID])='" . strtoupper(noquotes($_POST['id'])) . "'") or
die(odbc_errormsg());
 $tempArray=odbc_fetch_array($resultRS);

Expected result:
----------------
Successful Database connection 

Actual result:
--------------
Warning: SQL error: [Microsoft][ODBC dBase Driver] '(unknown)' is not a
valid path. Make sure that the path name is spelled correctly and that you
are connected to the server on which the file resides., SQL state S1009 in
SQLConnect in C:\DEMO\wwwroot\login.php on line 13

Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource
in C:\DEMO\wwwroot\login.php on line 15
[Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure
that the path name is spelled correctly and that you are connected to the
server on which the file resides.

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

Reply via email to