note 104035 added to function.odbc-connect

From: Date: Wed, 18 May 2011 18:02:12 +0000
Subject: note 104035 added to function.odbc-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-179860@lists.php.net to get a copy of this message
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. ---- Server IP: 192.41.42.26 Probable Submitter: 173.186.105.6 ---- Manual Page -- http://www.php.net/manual/en/function.odbc-connect.php Edit -- https://master.php.net/note/edit/104035 Del: integrated -- https://master.php.net/note/delete/104035/integrated Del: useless -- https://master.php.net/note/delete/104035/useless Del: bad code -- https://master.php.net/note/delete/104035/bad+code Del: spam -- https://master.php.net/note/delete/104035/spam Del: non-english -- https://master.php.net/note/delete/104035/non-english Del: in docs -- https://master.php.net/note/delete/104035/in+docs Del: other reasons-- https://master.php.net/note/delete/104035 Reject -- https://master.php.net/note/reject/104035 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179860) next »