ID:               25958
 Updated by:       [EMAIL PROTECTED]
 Reported By:      brian dot garvis at mascommsys dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         ODBC related
 Operating System: Windows 2003 Server
 PHP Version:      4.3.2
 New Comment:

Please include your DSN entry, and a SQL Log for the connection attempt
if you can.  From the sounds of it, you're not configured properly on
the ODBC Administrator end, and thus not a PHP bug. 


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

[2003-10-22 18:19:57] brian dot garvis at mascommsys dot com

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 this bug report at http://bugs.php.net/?id=25958&edit=1

Reply via email to