I'm trying connecting a remote SQL Server database and getting its data for writting to my local Mysql database on Ubuntu. I've been using Microsoft Drivers for PHP for SQL Server (ODBC driver installed) and it works in the browsers.
But while I run it in command-line, it shows could not find driver
, just like the Driver is never installed.
My environment:
- Ubuntu 16.04.5
- PHP 7.0.32
- Apache 2.4.18
- MySQL 5.7.24
The remote server is Windows Server 2012 with SQL Server 14.0.1000.
I've configured my Apache and PHP correctly followed the official tutorial (otherwise it probably could not work even in the browser), so I don't know why it doesn't work in the command-line or terminal. Please help, thanks.