I'm off on a new tangent. And this is probably a bit more of a linux server setup question for linux setup gurus than a PHPR question.
Has anyone succeeded in connecting to an MSSQL 2000 database server (backend) from a Linux (LAMP) web server running PHPR generated pages?
I have no trouble connecting to an external MSSQL backend server from an XAMPP web server running on Windows. I build the project using the 'Microsoft SQL Server' option in PHPRunner. I enter my creditials and see the backend tables, build the app, and it all works. Magic. But I'm not that surprised because the environment has been setup and I have been using a variety of tools to access the MSSQL backend.
However I'm having trouble getting this to work on a Linux Apache web server (LAMP, RHEL 5.5, PHP 5.1.6). Here's what I have done so far: used YUM to add php-odbc & php-mssql, which also installs unixODBC and freeTDS. Configured odbcinst.conf and odbc.conf & freetds.conf is there, using tds version 8.0 for the mssql connection, checked there is a libtdsobdc.so driver, mssql.secure_connection = Off, but that's not to say this is all configured correctly or in the right places or that I'm even on the right track, I'm no expert on linux ODBC. I've turned off SElinux, opened mssql standard firewall ports for 1433 (even turned off the firewalls temporarily).
Here is my error when I upload and try to run the same page on the LAMP server.
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: MSSERVER in /var/www/html/tsa/include/dbconnection.mssql.unix.php on line 8
Fatal error: in /var/www/html/tsa/include/dbconnection.mssql.unix.php on line 10
All this means to me is 1) it found the mssql-connect function on the LAMP box, but 2) its not setup correctly to allow the connection. Tracing the TCP shows no traffic, so its not something like wrong creditials or ports.
But firstly back to basics/fundamentals. What's the recommended way to do this? What modules do a I need? How do I configure (PHPR, PHP, ODBC, etc)?
If I'm sorta on the right track, any debugging tips?
I really appreciate your feedback on this problem. Thxs