title: PHP PDO SQL Server cannot connect via Ubuntu terminal
body: <p>I have one php script want to connect with SQL Server database using PDO. The connection is working with the browser, however, when I run it on the terminal, it shows the error message: &quot;Could not find driver&quot;. On the phpinfo. The reason I want to run it by terminal is I want to use it on crontab. But the connection is failed. I can see the PDO with sqlsrv driver has already installed, and if it's working with browser, that should work for terminal too. There is only one PHP installed on the Ubuntu server. Can someone help me?</p>
  <p><a href="https://i.stack.imgur.com/SdTRi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SdTRi.png" alt="enter image description here" /></a></p>
  <p>Edit:</p>
  <p>I can see the phpinfo php.ini is from fpm folder, and I compared this php.ini with the one under cli folder and found they're almost same.</p>
  <p><a href="https://i.stack.imgur.com/bnPXV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bnPXV.png" alt="enter image description here" /></a></p>