Php connects to Oracle and prompts CalltoundefinedfunctionOra_Logon (). how can this problem be solved?
Source: Internet
Author: User
Php connects to Oracle and prompts CalltoundefinedfunctionOra_Logon () to write a short piece of code according to the Data & lt ;? If & nbsp; ($ conn = Ora_Logon (& quot; hr @ TNSNAME & quot;, & quot; hr & quot;) {php connects to Oracle, message: Call to undefined function Ora_Logon ()
A short piece of code written by data
If ($ conn = Ora_Logon ("hr @ TNSNAME", "hr "))
{
Echo "SUCCESS! Connected to database \ n ";
}
Else
{
Echo "Failed:-(cocould not connect to database \ n ";}
Ora_Logoff ($ conn );
Phpinfo ();
?>
The prompt "Ora_Logon function" is defined. why?
In php. ini, I have removed the semicolon of extension = php_oci8.dll.
In addition, php_oci8.dll is included in windows/system32.
------ Solution --------------------
In this case, you can install the Oracle extension ......
And ora_logon belongs to the CXIII. Oracle function (obsolete)
You must use the CVII. Oracle function.
Http://cn.php.net/manual/zh/ref.oci8.php
------ Solution --------------------
Did you config your php with Oracle while installing it? Please check below
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.