0

I'm not expert in php and it my first time trying to connect php with oracle database
I've made mistake before as I was trying to connect to MySQL while I should've connected to oracle instead

Oracle instant client is installed in the uni server and with features static IP and firewall

I tried to place the file in the uni server but I got this error I've been trying to solve this error since 10 am and now it 8 pm I've run out of solutions please HELP!

*Warning: ocilogon(): ORA-12537: TNS:connection closed
Fatal error: Maximum execution time of 30 seconds exceeded
*
and when I place it in WAMPSERVER

I get this error

Fatal error: Call to undefined function OCILogon()

this is my php file

<?php
    $db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = name.database.uniName.ac.uk)(PORT = xxxx)))(CONNECT_DATA=(SID=orcl)))" ;

    if($c = OCILogon("student", "student", $db))
    {
        echo 'YEAH connected to Oracle';
        OCILogoff($c);
    }
    else
    {
        $err = OCIError();
        echo 'Connection failed.' . $err[text];
    }
?> 
2
Contributors
1
Reply
18
Views
3 Years
Discussion Span
Last Post by diafol
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.