[英]How to fix error “Uncaught Error: Call to undefined function oci_connect()” in wamp server?
I have uncommented the following two lines in my php.ini:我在 php.ini 中取消了以下两行的注释:
extension=php_pdo_oci.dll
extension=php_oci8_12c.dll
Code:代码:
public static function getAllNames(){
$dbUser = "xxx";
$dbPass = "xxxx";
$dbConn = "(DESCRIPTION = (ADDRESS = (PROTOCOL=TCP)(HOST=xxxx)(PORT=xxxx))(CONNECT_DATA=(SID=xxxx)))";
$conn = oci_connect($dbUser, $dbPass, $dbConn);
$sql = oci_parse($conn,"Select FNAME, LNAME from PERSONA WHERE STATUS = 'A' ORDER BY FNAME");
return $sql;
}
I'm not able to get rid of the error.我无法摆脱错误。 I have seen a couple of questions similar to mine, but most of them were using apache server and couldn't really solve my problem.我看到了几个与我类似的问题,但其中大多数都使用 apache 服务器,并不能真正解决我的问题。 Any help would be appreciated.任何帮助,将不胜感激。 Thanks谢谢
I had the same issue but with mysqli_connect()
我有同样的问题,但使用mysqli_connect()
I removed and did autoremove the webserver and php and reinstalled them again, and it worked.我删除并自动删除了网络服务器和 php 并再次重新安装它们,它工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.