Php.exe in CMD throws “Call to undefined function oci_connect()”

时光毁灭记忆、已成空白 提交于 2019-12-24 17:53:28

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/8012682/php-exe-in-cmd-throws-call-to-undefined-function-oci-connect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!