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