Skip to main content
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
NorthStar
New

Connect to an external MS SQL Server with PHP 7.4 and sqlsrv

I'm trying to connect to an external MS SQL Server database with my Grow Business Plan in PHP 7.4, I added sqlsrv and pdo_sqlsrv in the cPanel, but I still get the "This extension requires the Microsoft ODBC Driver for SQL Server to communicate with SQL Server.". Any suggestions? I try both PDO and sqlsrv connection same result. I contacted GoDaddy Chat Support and they tell me ODBC can't be installed on a Share Hosting. Why having sqlsrv and pdo_sqlsrv in the cPanel if the ODBC driver can't be installed? Any way around?

1 ACCEPTED SOLUTION
PL281
Super User IV

@NorthStar 

 

I think part of your issue is you are mixing linux and windows - the PHP extensions are part of the standard PHP distribution which is why you see them - and it does look like there is an ODBC driver for linux but you would need a VPS in order to install it where you have root access to the server. 

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

2 REPLIES 2
PL281
Super User IV

@NorthStar 

 

I think part of your issue is you are mixing linux and windows - the PHP extensions are part of the standard PHP distribution which is why you see them - and it does look like there is an ODBC driver for linux but you would need a VPS in order to install it where you have root access to the server. 

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

Thank you @PL281, it just too bad, since the extension is there, they should have installed the ODBC driver by default, it's not a big issue for them. For me, managing a VPS seems too much time to invest. I will look into JSON and web API to communicate with the SQL Server.