On Tue, January 8, 2008 4:06 pm, Alexis wrote: > I am pulling my hair out trying to set up PHP to connect to SQL > Server. > > The office server, running Server 2003, has SQL Server on it. > > One of my computers is running XP with Apache 2.2 and PHP 5.2.3. > Another one has Ubuntu Gusty Gibbon, Apache 2.2 and PHP 5.2.3 > > Ideally I would like to get the Linux box to connect to the main > server, > but I can't even get it to recognise the server, let alone create a > MSSQL link, so I'll start off with the windows box. > > I have read all the various comments in http://ca3.php.net/mssql and > have tried all the relevant ones but still no joy. > It just will not connect. > > > I have tried the ADO approach but get the following error: > > Fatal error: Uncaught exception 'com_exception' with message > '<b>Source:</b> Microsoft OLE DB Provider for SQL > Server<br/><b>Description:</b> [DBNETLIB][ConnectionOpen > (Connect()).]SQL Server does not exist or access denied.' in > D:\Apache2.2\htdocs\includes\mssqlinfo.inc:9 Stack trace: #0 > D:\Apache2.2\htdocs\includes\mssqlinfo.inc(9): > com->Open('Provider=SQLOLE...') #1 D:\Apache2.2\htdocs\mssql.php(3): > include('D:\Apache2.2\ht...') #2 {main} thrown in > D:\Apache2.2\htdocs\includes\mssqlinfo.inc on line 9 > > > Does anyone have a definite and easy to understand set of instructions > as to how to get PHP to talk to SQL Server please? The most likely cause is SQL server rejecting the login based on IP/host/username/password. Take PHP out of the picture for a moment, and use whatever command line tool or Windows GUI thingie that you can to connect from the Linux box to the SQL Server. You may also want to look at using the Sybase drivers instead of the Microsoft ones. MS bought the Sybase codebase, and the APIs still work, and may be faster and easier to work with than MS-originated stuff. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php