1024programmer Java When php connects to Oracle, it prompts CalltoundefinedfunctionOra_Logon(), how to solve it?

When php connects to Oracle, it prompts CalltoundefinedfunctionOra_Logon(), how to solve it?

PHP connects to Oracle and prompts Call to undefined function Ora_Logon()
A short piece of code written according to the information

<?

if ($cOnn=Ora_Logon( “hr@ TNSNAME “, “hr “))
{
echo “SUCCESS ! Connected to database\n “;
}
else
{
echo “Failed 🙁 Could not connect to database\n “;}
Ora_Logoff($conn);
phpinfo();
?>

Prompt Ora_Logon function is defined , why?

I have removed the semicolon of extension=php_oci8.dll in php.ini
and imported php_oci8.dll into windows/system32.

/>——Solution——————–
It’s not like you You can install the Oracle extension…

And ora_logon belongs to CXIII. Oracle function (obsolete)

You have to use 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

./configure –prefix=/appbin/php –with-apxs2=/appbin/apache/bin/apxs –with- oci8=$ORACLE_HOME

$ORACLE_HOME is path which your Oracle clinet/server located,

then use oci_connect() or use oci_newconnect(), Please check php doc for detail

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/when-php-connects-to-oracle-it-prompts-calltoundefinedfunctionora_logon-how-to-solve-it-3/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索