folks!
This is my first experience with big scripts in PHP CLI and I'm facing a 'not found' error when using the sqlsrv_connect
function in my script.
Running the script in the browser is okay, connects all fine, the queries goes as fine as it could; but when in the CLI, my friend, it shows
Fatal error: Call to undefined function sqlsrv_connect()
What could it be, dark magic or newbie developer?
This is how i use the function:
$_dbip = '127.0.0.1';
$_dbnome = $nome_bd;
$_dbuid = 'sa';
$_dbpwd = 'very_strong_secret_pwd';
$conn = sqlsrv_connect($_dbip, array('Database' => $_dbnome, 'UID' => $_dbuid, 'PWD' => $_dbpwd)) or die( print_r( sqlsrv_errors(), true));
Thanks in advance!