Click to See Complete Forum and Search --> : MS Access DB on remote machine


Anon
11-13-2000, 09:08 PM
This may be more of an ODBC question than a PHP question, but the expertise certainly seems to be here to give a quick assist. From the subject line, you've probably gathered that I'm stuck trying to connect to an Access2000 database on a machine other than the web server.

The PHP script works fine as long as the DB is on the web server machine. When I move the DB to the remote machine and create a DSN using the UNC path, the connection sets up with no problem if I use the browser on the web server machine. If, however, I go to another client machine the MS Access driver returns an error indicating that either I don't have sufficient permissions, or that the DB has been opened exclusively by another user.

Sounds like a permissions issue, right? Probably is, but I'll be damned if I can figure it out. Something with the system.mdw file perhaps? I've tried setting up the DSN both with and without a system database. I haven't set up any security for the database in question.

Platform is MS PWS running on an NT4.0 workstation machine with PHP 4.0 (small departmental intranet site).

Anyone out there want to help me kickstart this one?

John

Anon
11-14-2000, 12:41 PM
Can you show me your connection code as well as try mapping the database in
Windows NT

Anon
11-14-2000, 03:13 PM
I'm setting up the connection as follows:

odbc_connect("dbname", "", "");

No username or password. Have also tried with username "admin" with the same results.

I've tried mapping a drive to the remote share and configuring the DSN accordingly. Same results. I had settled on the UNC path to make absolutely sure it couldn't be a drive mapping issue.

Thanks.

Anon
11-15-2000, 03:12 AM
Hello John

I presume you have tested the DSN using Microsoft Query or something similar. If MS Query works, than the following is probably the problem.


IIS/PHP will connect to the remote drive using the IUSER_ANONYMOUS userid (or something similar). Make sure your shared folder gives read/write permissions to that userid.

Regards, John