mssql + PHP issue - URGENT.
mark at foster.cc
Mon Apr 26 18:54:55 UTC 2010
I'm almost positive you ALSO need the sybase client package(s)
installed. The php5-sybase is not a pure driver but a hook.
On 04/26/2010 08:51 AM, Jamie McDonald wrote:
> Hello all,
> I've just managed to convince the management to let us run Linux boxes
> as our new frontend webservers - they are ubuntu-server 9.10 boxes
> configured for fail over using heartbeat and DRBD.
> Our database servers however have remained as Microsoft SQL 2008 servers.
> The issue I am having is that with the testing of our webserver's I
> cannot seem to connect to an MS SQL 2008 Express db server, every time
> I get the error
> *"Warning*: mssql_connect() [function.mssql-connect
> <http://192.168.1.61/digyourhome/function.mssql-connect>]: Unable to
> connect to server: 192.168.1.15,1433 in
> */shared/var/www/oursite/inc/oursite_dbcon.php* on line *2*
> Could not connect to database: "
> The PHP code used to connect is a standard connection string i.e.
> "mssql_connect("192.168.1.15,1433","username","passw0rd") or die
> ("Could not connect to database: ".mssql_get_last_message());"
> The web server has has 'apt-get install php5-sybase' run on it and
> apache restarted so the mssql.so object has been loaded - this is also
> confirmed by its presence on the output from phpinfo();.
> I have disabled the firewall on the SQL2008 server - and can see the
> port 1433 listening on the test sql server (my workstation) from the
> webserver. I am also able to telnet to port 1433 on the SQL server
> from the webserver. The username and password are also correct - I
> have quadruple checked this.
> I've been googling all afternoon and seem to be finding conflicting
> information regarding the ability of PHP to connect directly to an
> MSSQL database. Some sites seem to suggest you must use a DSN via an
> odbc connection but other sites suggest the old school connection
> string method should work fine just as you would if using mysql. I
> really don't want to start modfying the developers code, as far as I'm
> concerned this codebase worked fine under windows/iis so it should run
> in our new Linux environment.
> If anyone can give me any clarification on this issue I would be very
> thankful as these servers are going to be racked this week and I do
> not want to have the powers that be decide we should revert to Windows
> Server / IIS.
> Kind Regards,
I hate racists. Mark D. Foster<mark at foster.cc>
http://mark.foster.cc/ | http://www.freegeekseattle.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-server