How to know the Oracle Database Name?

I am designing a generic page in PHP with oracle database in the backend. I don't know how to successfully connect and close the front and back end? Please help.

  • Answer:

    I've never implemented this myself, but have you looked through this resource? http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/oow10/php_db/php_db.htm Specifically, review the section "Creating a Standard Connection". What error(s) you are getting?Using the PHP OCI8 extension gives you maximum control over what you are needing to do.If you already know all this, then have you made sure to close all your open connections by using (you'll need to close every created connection to avoid resource leaks)? oci_close($conn);

Christopher Dabel at Quora Visit the source

Was this solution helpful to you?

Other answers

Depends on how you are using php! If you are using php through Xampp! Its really easy: Make sure you have Xampp installed. Download Oracle Instant Client From Oracle Website. (Go for 32bit as XAMPP is 32bit architecture) Unzip the instantclient to your c:/xampp/php/ext/ folder Add 'c:/xampp/php/ext/instantclient11_2'   ( or whatever the file location of unzipped folder is) to your Environment Variables before any Oracle variable that is already there. To set Environment variable. Open properties for my computer, open advanced settings and you will find Environment variable button, click on it and find the "path" in the given variables to edit it. Now, open XAMPP control panel and click config button for apache, find php.ini file to open and edit it. Search for 'oci8' mentioned in the php.ini text file. Your will see two entries for oci8 , one for instant client 10gR2 ,and other one for instant client 11gR2. Just remove the semicolon(';') from the begining of the line. Restart Xampp Start apache and try running any php script which uses "ociconnect" to connect to oracle database. Make sure you put all the parameters(username,passeword, databaseHost:port/sid) in Ociconnect function correctly.

Naman Rajpal

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.