Jump to content

Recommended Posts

Ok I'm new to Microsoft's world of crap... So is there an easy way or at least recommendations for me to get connected to an MS SQL server? I have access to the server it is on to make changes as I want & have lost the nerve of dealing with microsoft languages since I am not a MS guy and I need the comfort of PHP back. So I've read some on ODBC but seriously it seems like all that is written by people talking microsoft speak... Any links, help, pointers, or just plain "Look idiot do this" out there to help me try to figure this out?

 

 

SIDE-NOTE: Not sure if this is appropriate area to ask this, if not please move it for me thanks!

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/
Share on other sites

You might want to consider using the PHP driver (sqlsrv) released by Microsoft. There is more information about the difference between the mssql and the sqlsrv divers here: http://blogs.msdn.com/brian_swan/archive/2010/03/08/mssql-vs-sqlsrv-what-s-the-difference-part-1.aspx. If you choose to go that route, this might be helpful for getting set up: http://blogs.msdn.com/brian_swan/archive/2010/02/08/getting-started-with-the-sql-server-driver-for-php.aspx.

 

To your last question, you shouldn't have any problems with the web server and database server being on different machines as long as your database server is configured to allow remote connections.

 

Hope that helps.

 

-Brian

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/#findComment-1059715
Share on other sites

You might want to consider using the PHP driver (sqlsrv) released by Microsoft. There is more information about the difference between the mssql and the sqlsrv divers here: http://blogs.msdn.com/brian_swan/archive/2010/03/08/mssql-vs-sqlsrv-what-s-the-difference-part-1.aspx. If you choose to go that route, this might be helpful for getting set up: http://blogs.msdn.com/brian_swan/archive/2010/02/08/getting-started-with-the-sql-server-driver-for-php.aspx.

 

To your last question, you shouldn't have any problems with the web server and database server being on different machines as long as your database server is configured to allow remote connections.

 

Hope that helps.

 

-Brian

 

Using the sqlsrv option seems like a good choice, so programmically do I still use the mssql() function in my php scripts

 

EDIT: And Nevermind didn't read your second blog there at first that already answer my questions. Thanks to Both of you

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/#findComment-1059733
Share on other sites

I do not express right? I have Microsoft server installed here already by someone else, I've access to the server so I'd just need to apply the driver to the server, seriously I'm an idiot with MS technology I'm an linux server guy... feel so lost.

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/#findComment-1060030
Share on other sites

Not sure I understand your last question. If you install the sqlsrv driver just like you would any other PHP extension (put the .dll in the extension directory, add extension=php_sqlsrv.dll to your php.ini file, then restart your web server), the driver should be loaded and ready to use.

 

Is that what you were asking?

 

-Brian

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/#findComment-1060147
Share on other sites

Sorry, meant in reference to your blog on: Getting Started with the SQL Server Driver for PHP.

 

I can use the same example on SQL Server 2008 and not just SQL server express, that is the question.

 

Here's my scenario though. I've a web server running IIS with sharepoint and a third party software for an erp system that uses it. Well their VB-webpart thing is so limited that I can't do much with it, and what I want to do is simple in php so I want to connect to the SQL Server that I have priviledges too on a seperate machine. So I want to install php on iis7 and then try to connect to the database. Within in intranet and if possible using windows authentication/AD... I'm limited knowlegde though with microsoft networking, you know just enough to get me in trouble, but I have an awesome administrator to help me not break stuff if I get set in the right direction.

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/#findComment-1060188
Share on other sites

Ah...I see. You can use any version of SQL Server...I just used SQL Express becuase I figured most folks would be interested in the free version.

 

It sounds to me like you should be able to use Windows Authentication in your scenario. More info here: http://msdn.microsoft.com/en-us/library/cc296198(SQL.90).aspx

Link to comment
https://forums.phpfreaks.com/topic/202076-using-ms-sql-php/#findComment-1060258
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.