Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Wed Jul 14, 2010 9:00 am


Postby nayeem007 » Wed Jul 14, 2010 9:19 am

Im new to php and oracle. I dont understand the 3rd parameter of the oci_connect function. Can anyone tell?

New php-forum User
New php-forum User
Posts: 12
Joined: Fri Apr 16, 2010 9:02 pm

Re: oci_connect()

Postby mysamsung » Thu Jul 15, 2010 2:50 am

Contains the Oracle instance to connect to. It can be an » Easy Connect string, or a Connect Name from the tnsnames.ora file, or the name of a local Oracle instance.

If not specified, PHP uses environment variables such as TWO_TASK (on Linux) or LOCAL (on Windows) and ORACLE_SID to determine the Oracle instance to connect to.

To use the Easy Connect naming method, PHP must be linked with Oracle 10g or greater Client libraries. The Easy Connect string for Oracle 10g is of the form: [//]host_name[:port][/service_name]. With Oracle 11g, the syntax is: [//]host_name[:port][/service_name][:server_type][/instance_name]. Service names can be found by running the Oracle utility lsnrctl status on the database server machine.

The tnsnames.ora file can be in the Oracle Net search path, which includes $ORACLE_HOME/network/admin and /etc. Alternatively set TNS_ADMIN so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web daemon has read access to the file.

Simply it is the "HOST".

New php-forum User
New php-forum User
Posts: 2
Joined: Thu Jan 13, 2011 10:52 am

Re: oci_connect()

Postby vaughtg » Thu Jan 13, 2011 11:03 am

Do you think you could find an online help page to copy and paste? A simple link to that page would have sufficed, like this:


The problem *I* am running into is that this information is not helpful.

Return to “Other Database Engines”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests