shocker-z Posted April 3, 2007 Share Posted April 3, 2007 Hi here is a quit breif on my current situation.. I have been developing a web frontend to our company database on a local copy of the database, this has been tested and secured and working fine localy but when i change the location of the access file in odbc to the live database on the shared drive i get connection failed. So at first i thought ahh permissions but no.. there all fine! I went into MS excel and connected and pulled data off my odbc connection totaly fine?? any idea's on why it works for excel but my page returns connection failed? here is my connection code that produces the error. Noo error is shown after "Connection Failed:" any way to get an error reported? $conn=odbc_connect('pnctables','',''); if (!$conn) { exit("Connection Failed: " . $conn); } Regards Liam Link to comment https://forums.phpfreaks.com/topic/45470-odbc-access-connection-failed-to-file-on-shared-drive/ Share on other sites More sharing options...
Barand Posted April 3, 2007 Share Posted April 3, 2007 I have never connected successfully to an Access db that is not on the same PC as the web server Link to comment https://forums.phpfreaks.com/topic/45470-odbc-access-connection-failed-to-file-on-shared-drive/#findComment-220773 Share on other sites More sharing options...
shocker-z Posted April 4, 2007 Author Share Posted April 4, 2007 anyidea what may be causing the issue? or possibly a workaround? Kind of taking it that if you havn't managed it then there not much chance of me managing it too lol Weird how it can pull data via excel --> odbc --> access database on shared drive yet it cant pull it via PHP :S ** Gutted now as i spent a few days building it, now im gonna look a bit umb going ahh it dont wokr on shared drive boss. lol Regards Liam Link to comment https://forums.phpfreaks.com/topic/45470-odbc-access-connection-failed-to-file-on-shared-drive/#findComment-220979 Share on other sites More sharing options...
shocker-z Posted April 4, 2007 Author Share Posted April 4, 2007 *SOLVED* I decided to see if i could create a directory from PHP on the mapped drive and it didnt using this code: mkdir("S:/dbf/data/test/", 0700); But using $mkdir=mkdir("//pdc/data$/dbf/data/test/", 0700); Did work, so in my ODBC administrator i changed it from S:/dbf/data/test/ to //pdc/data$/dbf/data/pnctables.mdb and WALLAH! it's working Might want to remember this one as all over the net every site is on about permissions and IIS setting sbut infact is just ODBC. Regards Liam Link to comment https://forums.phpfreaks.com/topic/45470-odbc-access-connection-failed-to-file-on-shared-drive/#findComment-221057 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.