RSS
 

PHP ODBC Across Networked Drives

20 Aug

While integrating some backend services needed by our RIA I ran across a small hiccup that was easily fixed but I thought I’d post in case someone else get’s stumped by this (apparently some already have ).

Problem:

PHP needed access to and ODBC connection that pointed to a dBase III database on a remote server. While local applications could use this ODBC connection flawlessly, connection via PHP failed.

Symptons:

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC dBase Driver] ‘(unknown)’ is not a valid path.

Solution:

You need to enable rights for the Apache Service to have access to the remote directory.

For my particluar situation the server running apache and php was not part of the domain, so I simply right clicked on the apache service, navigated to the Log On tab and selected “This Account” (and filled in the administrator credentials) as opposed to the default “Local System Account.”

 
1 Comment

Posted in PHP

 

Leave a Reply

 

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

 
  1. Nathan

    April 22, 2009 at 1:03 pm

    We’re having the same problem on WAMP server. Sadly, setting apache to run as the system administrator had no effect. What makes it even more baffling is that we have cgi apps running via mod_asapi with no problem.