PHP connects to Oracle, prompting call to undefined function ora_logon (), how to resolve

Source: Internet
Author: User
PHP connects to Oracle, prompting call to undefined function Ora_logon ()
A small piece of code written according to the data


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 ();
?>

Hint Ora_logon function for definition, why?

I've got Extension=php_oci8.dll's semicolon removed from the php.ini.
And put Php_oci8.dll into the windows/system32 inside.

------Solution--------------------
Not that you can install Oracle's extended ...


And Ora_logon belonged to CXIII. Oracle functions (deprecated)

You have to use CVII. Oracle functions

http://cn.php.net/manual/zh/ref.oci8.php
------Solution--------------------
Did your 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 with Oci_connect () or with oci_newconnect (), please check the PHP doc for detail
  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.