Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP connection to access via ODBC

Status
Not open for further replies.

Rohdem

Programmer
Sep 20, 2000
553
0
0
US
Hello,

I have a very strange and frustrating problem I hope someone has some troubleshooting suggestions I can try.

I have 2 windows 2008 servers running IIS7 that host a company Intranet site. They have identical PHP scripts on them, 1 is a virtual machine that is my development box, the other is the live server.

I have system dsns setup to connect to several access 97 databases. Beginning yesterday, the production server seemingly randomly will start giving all the users errors when the script tries to connect to a specific access database. Something to the effect of 'you do not have permission to access database (unknown). (I will get the exact message next time it happens). It only happens with one of the access databases/dsns, the other seem fine. Its worth noting that this is the most used of the databases.

The fix for it is to either reboot the server or to delete the dsn and recreate it. I am not changing any permissions and I recreate the dsn exactly how it was before, so I don't think its actually a permissions issue even though thats what the error indicates.

Also, I have not run into this issue on my development server which is setup nearly identical...Win2k8, IIS7, same exact dsns. Of course this could just be because I am the only one using it, although I have started having everyone use it temporarily when the production machine hoses up.

There is nothing in the server event logs when it happens, anyone have any suggestions where to look?

Also, I have tried 'tracing' the dsn connections, but when I stop tracing, windows doesn't generate the log file where it is supposed to.

Thanks!
Mike
 
You might want to try outputting some debugging info which brackets the connection.

i.e.
1- output to log (time, some-unique-id, opening-connection)
1a - output to log (time, open successful | open fail)
2- access dsn
3- perform queries
4- output to log (time, some-unique-id, closing-connection)
4b- close connection
4a- output to log (time, close successful, | close fail)

That way, you can tell how many clients are trying to access the db and when.

Just a thought.

The other obvious one... is... it's an Access 97 database.

I'd assume it would be too much work to use a better database.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top