Enabling Google Cloud SQL Server ODBC
At Scriptcase, we have the following drivers available for connection to Google Cloud MSSQL Server: MSSQL Server NATIVE SRV, MSSQL Server NATIVE SRV PDO and MSSQL Server ODBC. If you are using your own pre-configured environment, MSSQL Server extensions must be manually enabled in PHP.
Prerequisites
Before proceeding with this documentation, check your PHP architecture. For drivers to be enabled correctly, files must be downloaded according to the architecture used.
- In your Scriptcase, there is the file info.php, access it by the URL:
http://127.0.0.1:8092/scriptcase/info.php
, where you will find the information regarding the architecture in phpinfo().
NOTE: If you are using Scriptcase’s automatic installer, the PHP architecture will be the same as the one you downloaded. Download Microsoft ODBC Driver 13 For SQL Server according to your PHP architecture .
- x86 Architecture = 32 bits
- x64 Architecture = 64 bits
File list
Listed below are the necessary files for the drivers to be enabled.
- Download Microsoft ODBC Driver 13 For SQL Server x64
- Download Microsoft ODBC Driver 13 For SQL Server x86
- SQL Server extensions for PHP
Compatibility Table
Server 2016 | Server 2012 /R2 | Windows 10 | Windows 8 / 8.1 | Server 2008 SP2 / R2 SP1 | Windows 7 SP1 | Windows Vista SP2 | |
---|---|---|---|---|---|---|---|
Native SRV PDO | |||||||
Native SRV | |||||||
ODBC |
IMPORTANT: if you need to use Database Identifiers in your tables, we recommend using the double quotation marks( “ ) instead of the brackets( [ ] ) because of the conflict with the of Global Variables syntax Scriptcase. Using the brackets as database identifiers may lead to problems in the Scriptcase applications.
Configuring and enabling Google Cloud SQL Server ODBC on Windows
If you are using Scriptcase’s automatic installer, the extensions are already enabled in PHP, requiring only the installation of the client. Proceed to item 3
1 - Extract the .zip file and copy the files from the php_pdo_sqlsrv_81_nts_x64 and php_sqlsrv_81_nts_x64 .dll extensions previously downloaded to your PHP’s ext
folder.
2 - In the php.ini
file, located in C:\php
, add the lines referring to the MSSQL Server extensions php_pdo_sqlsrv_81_nts_x64 and php_sqlsrv_81_nts_x64. See the example below:
extension=pdo_sqlsrv_81_nts_x64
extension=sqlsrv_81_nts_x64
3 - After downloading the Microsoft ODBC Driver 13 For SQL Server file, run the installer and follow the steps below:
4 - Accept the terms of the license agreement and click Next.
5 - Check the option “ODBC Driver for SQL Server SDK”, because the components that we will need are also in this option.
- In this option, leave the option “Client Components” checked.
6 - Click Install to start the client installation.
7 - The program features you selected are being installed.
8 - Click finish to exit.
9 - Restart Apache service through Task Manager.
-
Open the Task Manager and click on the Services tab.
-
Look for the
ApacheScriptcase9php81
orApache2.4
service and right click on that service, then click Reiniciar.
Conexão com o Scriptcase
- MSSQL Server ODBC: click here
Connection Questions or Problems? Contact our [support][link_support]{:target=’_ blank’} in case of connection problems or questions regarding this database.