Php.exe in CMD throws “Call to undefined function oci_connect()”
-
21-02-2021 - |
문제
I have XAMPP installed with PHP 5.2.6 in Windows XP. In my php.ini I have the next lines uncommented:
- extension=php_oracle.dll
- extension=php_oci8.dll
I have a file with something like this:
<?php
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
?>
But when I try call to php.exe through cmd to that file, the console always give me an error:
Fatal Error: Call to undefined function oci_connect()
In my localhost I have no problem with this.
해결책
Probably, you're not looking at the right php.ini file for the command line.
In php.exe, run:
echo phpinfo();
then look for the php.ini path at the top.
제휴하지 않습니다 StackOverflow