I’m using PHP 5, Windows (IIS), and when i try access the file from command line, i get the following error (via browser, everything works great):
Fatal error: Uncaught Error: Call to undefined function odbc_connect()
My current code is:
$connection = odbc_connect(DATABASE, 'user', 'user', SQL_CUR_USE_DRIVER ) or die (odbc_errormsg(). "Error");
Also have this extension:
extension=php_sqlsrv_52_nts_vc6.dll extension=php_pdo_sqlsrv_52_nts_vc6.dll
I read to uncomment (php.ini) line with code php_odbc.dll
, but i don’t have these line and file.
Any tips to help?
Thank you!
Advertisement
Answer
I have the IIS and xampp installed and the problem is the environment variables.
I changed the path C:xamppphp
to C:php
and now, works like expected.