downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

oci_commit> <oci_client_version
[edit] Last updated: Fri, 17 May 2013

view this page in

oci_close

(PHP 5, PECL OCI8 >= 1.1.0)

oci_closeSchließt eine Oracle-Verbindung

Beschreibung

bool oci_close ( resource $connection )

Schließt die Oracle-Verbindung connection.

Parameter-Liste

connection

Ein Zeiger auf eine Oracle-Verbindung, die durch oci_connect() zurückgegeben wurde.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Anmerkungen

Hinweis:

Seit der Version 1.1 schließt oci_close() die Verbindung ordnungsgemäß. Benutze die Option oci8.old_oci_close_semantics, um das alte Verhalten dieser Funktion herzustellen.



add a note add a note User Contributed Notes oci_close - [2 notes]
up
0
Fahd Alwashmi (F-A-W)
1 year ago
please note, you can use oci_close() to close persistent connections opened with oci_pconnect() in PHP ver 5.3 or above.
as stated in here:
http://www.php.net/manual/en/oci8.configuration.php#ini.oci8.persistent-timeout
up
0
yepster at hotmail dot com
11 years ago
For using persistent connections && being able to sleep, I use:

function close_db_locks_on_abort( ) {
    global $conn;
    if( connection_aborted() ) {
        $fp = fopen( "/tmp/shutdown-func.txt", "a" );
        fwrite( $fp, sprintf( "connection aborted on %s\n", date( "d-m-Y H:i:s" ) ) );
        if( $conn ) {
            OCIRollBack( $conn );
            fwrite( $fp, sprintf( "-- DURING CONNECTION! ip=%s, user=%s, page=%s\n", $_SERVER["REMOTE_ADDR"], $_SERVER["PHP_AUTH_USER"], $_SERVER["SCRIPT_FILENAME"] ) );
        }
        fclose( $fp );
    }
}

register_shutdown_function ( "close_db_locks_on_abort" );

This makes sure a rollback is done on a connection when a user hits 'stop', so there will be no locks on table rows.

 
show source | credits | sitemap | contact | advertising | mirror sites