oci_pconnect - Connect to an Oracle database using a persistent connection
- username - The Oracle user name.
- password - The password for username.
- connection_string - Contains the Oracle instanceto connect to. It can be an » Easy Connect string, or a Connect Name from the tnsnames.orafile, 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 instanceto 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 statuson the database server machine. The tnsnames.orafile can be in the Oracle Net search path, which includes /network/adminand /etc. Alternatively set TNS_ADMINso that /tnsnames.orais read. Make sure the web daemon has read access to the file.
- character_set - Determines the character set used by the Oracle Client libraries. The character set does not need to match the character set used by the database. If it doesn\'t match, Oracle will do its best to convert data to and from the database character set. Depending on the character sets this may not give usable results. Conversion also adds some time overhead. If not specified, the Oracle Client libraries determine a character set from the NLS_LANG environment variable. Passing this parameter can reduce connection time.
Creates a persistent connection to an Oracle server and logs on.
PHP 5, PECL OCI8 >= 1.1.0
Returns a connection identifier or FALSE on error.