Page 1 of 1

can connect to db locally, can't on web server

Posted: Tue Nov 15, 2005 12:22 pm
by JasonTC
I just started working at a place where they have a Windows machine using an Access database with PHP. Everything worked fine with this database. I added a new database that I can work with locally, but when I upload it to our Web server I can't open a connection to it (the old database works fine on the Web server, too). Does anyone know what I need to do to get this database connected? I'm assuming there's some sort of procedure analogous to changing the ODBC settings in the Control Panel of my local machine, but I don't know what it is.

Thanks,
Jason

Posted: Tue Nov 15, 2005 12:43 pm
by twigletmac
Have you setup the system DNS for the database? For more info see the user comments on:
http://php.net/odbc_connect
in particular check out the comments from f dot chehimi at lancaster dot ac dot uk.

Mac

Posted: Tue Nov 15, 2005 2:23 pm
by JasonTC
Well, I figured out how to add the DSN for my new database. The setup works exactly the same way on the Web server as on my local server. The problem is, even though I carried out the same steps on the Web server as on my local server, it still doesn't want to connect to the database. It doesn't seem like this should be a coding issue since my code already works perfectly in one place and some other code I wrote for a different database on the same server also works perfectly. Any ideas?

Posted: Tue Nov 15, 2005 2:39 pm
by pickle
I have zero experience with Access, but I do know that in MySQL, you need to state from which IPs a database can be accessed. You may need to setup that database to be accessible from the IP of your workstation.