Ael
Ael

Reputation: 11

SQLite unable to open database over LAN with IIS

PC1 is running IIS web server over a home network. I'm trying to access it from PC2. I've set the firewall so I can now access it from PC2 now, but there is a permissions problem for the databases I think. I get the php error "unable to open database". The databases are SQLite files.

I've been searching on this for a long time. It's a simple fix but i don't remember how to do it. Any ideas?

Upvotes: 0

Views: 1006

Answers (2)

Ael
Ael

Reputation: 11

The php page was pointing to the wrong database location because $_SERVER["HTTP_HOST"] (used to determine which file location to use), was no longer "localhost" and was now the name of the serving pc. Problem resolved :)

Upvotes: 1

X-Cubed
X-Cubed

Reputation: 1899

Make sure you're using UNC paths (\\HOST\Share) rather than mapped network drives, as mapped drives are per user and IIS will be running under a different user account.

Also, make sure the user that IIS is running as has permissions to access the share on the other computer. It may be easier to create a new user account on both machines with the same name and password, connect to the share as that user to verify permissions are okay, then configure IIS to use that account.

Upvotes: 0

Related Questions