note 104035 deleted from function.odbc-connect by cmb

From: Date: Sun, 11 Dec 2016 12:22:42 +0000
Subject: note 104035 deleted from function.odbc-connect by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208558@lists.php.net to get a copy of this message
Note Submitter: jpditri at gmail dot com ---- I found that on Windows I am able to connect to a FoxPro free table directory on a password-protected mapped network drive without having a domain controller (as posted in the solution below from harald). Trying to connect to the mapped drive returned the error "tablename does not exist." The same code worked correctly if the ODBC resource was located locally on my machine. As a workaround, I specified the datasource explicitly in the connection, but pointed the source at a shortcut to the same mapped directory: <?php $dsn = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\\shortcut;Exclusive=NO;collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;"; $conn=odbc_connect($dsn,"",""); ?> and the connection completed. My guess is that the credentials needed to access the drive weren't accessible to apache (I tried changing the user apache ran as to no avail), and the shortcut put that responsibility on Windows.

« previous php.notes (#208558) next »