this combo: php on a windows2003 + ms access on a samba share
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
this combo: php on a windows2003 + ms access on a samba share
hi, i didnt know where exactly to post this question:
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 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");
Unfortunately, I don't have any experiences with Samba shares but - before we start guessing in the wild:
What's the literal error message and number?
Some guesses though:
The error occurs on "connection.open()" or an equivalent I guess?
Does the user your web is running under have write permissions to the directory the MDB is in?
Unfortunately, I don't have any experiences with Samba shares but - before we start guessing in the wild:
What's the literal error message and number?
Some guesses though:
The error occurs on "connection.open()" or an equivalent I guess?
Does the user your web is running under have write permissions to the directory the MDB is in?
well am getting no error codes, the php page is just displaying a blank page, it takes a bit to load the blank page, so i think it loads something but it isnt rendering, weirdo.
about the write permissions for the web user... you mean the computer wich is running the web as a client or as a server?
well am getting no error codes, the php page is just displaying a blank page
So there's "On Error Resume Next" error handling? - Remove that! - You'll definitely need to get the literal error message and number; in programming there is no other way of debugging.
Quote:
about the write permissions for the web user... you mean the computer wich is running the web as a client or as a server?
That's just a quick guess. Guessing is not debugging, so we need to catch the actual error, at any rate. - Nevertheless, an explanation of my thoughts: Using IIS, each website or Virtual Directory runs either in the identiy of (= is impersonificated by) the default "anonymous user" (IUSR_COMPUTERNAME) or of a Windows identity that has specifically been set. Moreover, any Windows process, like Apache itself, or one of Apache's sub-processes (like a web) runs under / is impersonified by a Windows identity. I'm not sure how this is set up for Apache though.
now, i think i can do any conventional type of databaser 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
In my experience, a db connection to Access does not necessarily need to be significantly slower than SQL Server. (No, I'm not an Access fan.) Nevertheless, Access doesn't scale well (1. simultanious queries, 2. file size). Of course, there are no query optimizations as with SQL Server.
What's most important is setting the indexes right, and Access is suitable for that.
OLEDB and ADODB both are additional layers over ODBC. You'll need such a layer as it is your db connection object for programming. I'm not sure how much your way of using ADODB with PHP costs itself. You could do a research for a more native PHP layer to ODBC.
As for using a system DSN vs. a DSN-less connection (yours is DSN-less), I think I remember DSN-less benchmarked better in several aspects.
AFAIK, linked servers from within SQL Server are not faster than their native datasources (the "link", in case of Access, is done via OLEDB), i.e., there are no SQL Server query optimizations. There's a performance gain if you JOIN SQL Server and the linked server's tables as well as when using a T-SQL cursor to loop the linked server's tables - in opposite to using an ADODB.Recordset, like you're doing.
Remember, an ADODB.Recordset contains meta, and more, information than just the recordset's values. I.e., it contains information about the field size, type, etc. Anyways (I'm talking too much), this only becomes significant when you're doing bulk operations on ten or hundred thousands of records. For outputting a few dozends or hundreds of records on some client application, ADODB is just great.
As for the PHP/ADODB interaction, I tend to think, COM interoperability has become a mature feature within PHP in the meantime. So I wouldn't expect significant performance decreases from there.
What I don't know about is how Samba integrates. You could check this by manually opening the original Access database, and fire a harder query on it, and doing the same with a local copy of the database.
After all, I really need to ask: Are there performance issues, actually? If so, how many queries are running simultaniously (on the same tables)? Are there Updates simultaniously with Selects? And, how much is the size of the DB?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.