I'm sorry if this question ever asked before. However, I'm getting frustrate about this stuff.
Currently I'm maintenance a project, I'm using WampServer 2.0, PHP 5.2.5 and SQL Server 2005.
I've added extension=php_sqlsrv_52_ts_vc6.dll inside php.ini copy the file to php's extension. However sqlsrv_connect() in the project didn't work. I read the manual book of the project, I have to install SQL Server 2008 R2 Client Native since this project was developed by other programmer few times ago using wampserver 2.0 and SQL Server 2008. In other word, the prerequisites: - Install Driver SQLSRV20, SQL Server 2008 R2 Native Client. But, I still confuse what's SQL Server 2008 R2 Native Client used for. Do I need to install it though I use SQL Server 2005?
Please help.
Thank in advanced
Yes you do. Explained more fully here.
Related
I am trying to get PHP with the SQL Server driver working under IIS. I had a similar situation 18 months ago with lesser versions of the php and the driver and Apache, and that code worked fine working on Windows Server 2003.
I am trying to set it up on my Windows 7 (Home Premium) Virtual Machine to work out how to do it, before attempting to get the same done on a Windows Server 2011.
Now I am coming to try the same code again and reset up my development environment. This time I am using PHP 5.5 and have installed the threadsafe version version of the driver php_pdo_sqlsrv_55_ts.dll obtained from the downloadable SQLSERVER31.exe file.
Doing all of this in 32 bit mode
As soon as I try and construct a new PDO I get the following error message
SQLSTATE[IMSSP]: This extension requires the ODBC Driver 11 for SQL
Server to communicate with SQL Server. Access the following URL to
download the ODBC Driver 11 for SQL Server for x86:
http://go.microsoft.com/fwlink/?LinkId=163712
So although that link isn't directly to the driver, I eventually find my way there and download it, only for it to fail to install. However, I think that might be because I already have the ODBC Driver 11 for SQL Server installed.
So according to my Data Sources (ODBC) application in the Administrative Tools Section there are two SQL Server ODBC drivers
SQL Server, verion 6.01.7602.17514 SQLSRV32.DLL Dated 21/11/2010
SQL Server Native Client 11, version 2011.110.5058.00 SQLNCLI11.DLL Dated 15/05/2014
So I really don't know how to go from here.
Can I remove a driver and re-install it. If so how?
Any other suggestions as to how to get this to work.
I discovered the answer to my problem. I hadn't installed the odbc driver - the drivers listed above are not the correct ones.
The reason the ODBC driver I downloaded failed to install wasn't because the driver was already installed - it was because I had downloaded the 32 bit version, and it HAS to be the 64 bit version.
As soon as I installed the 64 bit version, another entry appeared in the Data Sources Driver list, and my test program started to work
I’m actually developing a CI app in my developer machine with Windows and XAMPP, using de sqlsrv driver to connect to the MS SQL Server 2008 database.
But the final server machine is an Ubuntu server, and trying to run the app from there doesn’t work because of the sqlsrv driver not installed in the server.
I tried the mssql driver and the app starts to load but it ends with SQL queries errors (SQL queries previously tested and working).
What do you recommend?
Is it possible to connect from Linux/PHP/CI to SQL Server 2008? If there is a way, will it be as fast as running on Windows? It will be compatible with CI Active Record?
Is it better to create a new Windows server?
Thx
I would say that you should develop on whatever you deploy to so if you will stick to dev on windows, deploy to a windows box.
If you do want to get it working, I have seen a ruby app talk to ms sql 2005 before, you need to make sure you have FreeTds working, this looks like a good walkthrough:
http://php.net/manual/en/mssql.setup.php
If you are using sql 2008 there are some features which probably are not in sql 2008 like table valued parameters which FreeTds won't support so it might be not working because you are trying to use something it can't do - have a look at the query that fails and see what types it has and the types of the responses, if anything is new to sql 2008 it might not work.
I'm having a really difficult time trying to get php to connect to SQL Server 2005. It seems like no matter what I do or what page I visit, I either get the wrong extension/driver or find a dead link. The most recent attempt was php_sqlsrv_52_ts_vc6.dll which apparently doesn't support anything prior to 2008.
After over two days of searching, I'm lost, and upgrading either php or SQL Server is not an option unfortunately...
EDIT:
Everything is running on IIS 6 - Server 2003 (Same box).
Your problem probably is that you are running IIS6, which will require the nts-version.
Additionally you have to install the SQL Server Native Client 2008, which is a bit misleading as it will still work with MSSQL 2005.
It should go something like this:
Download SQL Server Driver 2.0 for PHP
Place the dll (5.2 nts) into PHP's ext-folder
Enable the extension in the php.ini extension=sqlsrv*.dll
Install a recent version of Microsoft's Native Client (e.g. from the SQL Server 2012 Feature Pack)
Restart your web server.
I use Apache, so I'm not sure if there is anything else to do on IIS or whether some of the steps differ, but this is how I got it working.
Is it possible in any ways to connect Drupal 6.x to SQL Server 2008 R2? I am really struggling to find a way out.
please let me know. Any help would be greatly appreciated!
No, by default, Microsoft SQL Server is not within the Drupal 6 system requirements.
Additionally, if you need that database server, it's highly suggested to use Drupal 7 instead which has PDO support and PDO supports (somehow) Microsoft SQL Server.
Will microsofts SQL for PHP driver version 1.1 work with x64 builds of php 5.3?
It's not a general question as much as it sounds, we are currently having trouble with it. I just would like to know if someone can confirm if it works/should work or not.
Found out that it will not work on x64 builds of php. Though the x86 builds of php work fine on x64 operative systems and so will the sql driver. It is tested and confirmed for version 1.1 of the driver.