Forum Moderators: coopster

Message Too Old, No Replies

this combo: php on a windows2003 + ms access on a samba share

         

sugar2

6:33 pm on May 20, 2006 (gmt 0)

10+ Year Member



This is the scneario, i have a unix samba share in my network, there are all the office stuff, including a share to a Ms access database wich its accessed from many windows clients.
Now i need to access that ms access database from http, so i installed apache+php in a windows server in the same workgroup, i did succesfully test when the ms access database was on the local windows server, but once i tried with the database in the actual server it didnt worked, i found few scripts in google about odbc, ole, and dsn-less connections, all of them worked when database resides in the local machine, but don work when database is in the actual unix samba share.

This is the script used with local machine test:

//$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\POS-SERVER\C$\om\xxafta.mdb") ." ;DefaultDir=". realpath("\\\\POS-SERVER\C$\om");

this is the script used for samba share, it didnt work:
//$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\nas1\workware\OrderManager\xxafta.mdb") ." ;DefaultDir=". realpath("\\\\nas1\workware\OrderManager");

What can I do? any adcvices will be apreciated/.

chrisranjana

10:58 am on May 21, 2006 (gmt 0)

10+ Year Member



If you can post exact error messages it would really help.

sugar2

7:35 pm on May 22, 2006 (gmt 0)

10+ Year Member



well am getting no error codes, the php page is just displaying a blank page, it takes a bit to load the blank page when i use some path like \\nas1\\etc\ and it load the blank page instanstaneously when other path way like \\\\nas1\\etc\\, so i think it loads something but it isnt rendering, weirdo.

Do you think it may be an ldb issue with the samba share and the windows user that runs the apache server?...

sugar2

11:22 pm on May 22, 2006 (gmt 0)

10+ Year Member



The thing was solved. I debbuged using the realpath php function...

I changed the user that apache uses to logon, to a samba authorized user acconunt, not the system account, and with this string:

$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\nas1\\workware\\OrderManager\\xxafta.mdb") ." ;DefaultDir=". realpath("\\\\nas1\\workware\\OrderManager");

thanks to all!

sugar2

4:45 pm on May 23, 2006 (gmt 0)

10+ Year Member



Now, i think i can do any conventional type of database connection... what should i use for faster response and performance?
ODBC? OLE? DSN-LESS?... or may be linking the access databse to the SQL Server i have installed on the web server?, what I really wish its to have a faster querying of the MS access database without compromising the performance of Our SQL Server database application.

There are 2 machines involved:

Mahcine1:
Dual Core Unix Server
Samba Server
MS Access Database

Machine1:
Dual Core Windows Server
Sql Server
Apache and PHP Server

Thanks in advance.

ALDO