note 34897 added to function.odbc-connect

From: Date: Mon, 11 Aug 2003 01:51:16 +0000
Subject: note 34897 added to function.odbc-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-53839@lists.php.net to get a copy of this message
On Windows systems, if using ODBC to get to an MS Access database you may run into this error message: "SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect" It's likely because the "user" of the Apache service doesn't have permissions to the directory where the ODBC process is trying to put temporary files. Oddly, PHP wasn't using my system's TEMP environment variable, which is set to use the systems temp direcotry, which Apache has appropriate permissions on. Thus, it was trying to save files into my WINNT directory! A sample being "C:\WINNT\JETC935.tmp" So, doing the following at the top of my script solved the problem: putenv('TEMP=c:\\temp'); ---- Manual Page -- http://www.php.net/manual/en/function.odbc-connect.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34897 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34897&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34897&report=yes

« previous php.notes (#53839) next »