note 34897 deleted from function.odbc-connect by vincent

From: Date: Mon, 08 Sep 2003 14:52:26 +0000
Subject: note 34897 deleted from function.odbc-connect by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55824@lists.php.net to get a copy of this message
Note Submitter: danielc@analysisandsolutions.com ---- 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');

« previous php.notes (#55824) next »