Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 PHP Connection to remote SQL server

Author  Topic 

jgsketch
Starting Member

3 Posts

Posted - 2008-09-15 : 11:55:25
Hope I've reached the right forum for this question.

I'm trying to connect to our companies remote MS SQL database from a Linux hosted website on 1and1. I'm trying several different codes located on this site: http://www.webcheatsheet.com/php/connect_mssql_database.php

I tried using "Connect without a DSN (using a connection string)" as well as very first connection method. I even created the test databases used in the example. I get this error:
Fatal error: Cannot instantiate non-existent class: com in ...
as well as this error when using the other connection:
fatal error: Call to undefined function: mssql_connect() in...

Could anyone point me in the right direction? Is it maybe my host and the way PHP is setup? I hope not, 1and1 are very hard to deal with.

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-15 : 12:12:06
www.connectionstrings.com
Go to Top of Page

jgsketch
Starting Member

3 Posts

Posted - 2008-09-15 : 13:26:18
Thanks for the link. It should come in handy. However, it still did not work, I replaced my code with the single line for the ODBC connection since the rest were for .net. I got an error that said: Parse error: syntax error, unexpected '=' in ... I asume this is not php then. So I'm still lost, I could not find any php info on that site. Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-15 : 13:30:56
This isn't a SQL Server issue, but rather it is an issue with how you are using php. I'd suggest posting your question on a php forum as I don't think there is much experience here for php by the regular posters.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jgsketch
Starting Member

3 Posts

Posted - 2008-09-15 : 13:40:22
Ok, Thanks.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-15 : 16:19:59
try http://www.sitepoint.com/forums/forumdisplay.php?f=34
Go to Top of Page
   

- Advertisement -