_dbh; // Not sure if we really need to lock tables here, the Oracle row // locking mechanism should be more than enough // For the time being, lets stay on the safe side and lock... if ($write_lock) { // Next line is default behaviour, so just skip it // $dbh->query("SET TRANSACTION READ WRITE"); foreach ($this->_table_names as $table) { $dbh->exec("LOCK TABLE $table IN EXCLUSIVE MODE"); } } else { // Just ensure read consistency $dbh->exec("SET TRANSACTION READ ONLY"); } } function backendType() { return 'oci8'; } function write_accesslog(&$entry) { global $request; $dbh = &$this->_dbh; $log_tbl = $entry->_accesslog->logtable; $sth = $dbh->prepare("INSERT INTO $log_tbl" . " (time_stamp,remote_host,remote_user,request_method,request_line,request_args," . "request_file,request_uri,request_time,status,bytes_sent,referer,agent,request_duration)" . " VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"); // Either use unixtime as %d (long), or the native timestamp format. $sth->bindParam(1, date('d-M-Y H:i:s', $entry->time)); $sth->bindParam(2, $entry->host, PDO_PARAM_STR, 100); $sth->bindParam(3, $entry->user, PDO_PARAM_STR, 50); $sth->bindParam(4, $entry->request_method, PDO_PARAM_STR, 10); $sth->bindParam(5, $entry->request, PDO_PARAM_STR, 255); $sth->bindParam(6, $entry->request_args, PDO_PARAM_STR, 255); $sth->bindParam(7, $entry->request_uri, PDO_PARAM_STR, 255); $sth->bindParam(8, $entry->_ncsa_time($entry->time), PDO_PARAM_STR, 28); $sth->bindParam(9, $entry->time, PDO_PARAM_INT); $sth->bindParam(10,$entry->status, PDO_PARAM_INT); $sth->bindParam(11,$entry->size, PDO_PARAM_INT); $sth->bindParam(12,$entry->referer, PDO_PARAM_STR, 255); $sth->bindParam(13,$entry->user_agent, PDO_PARAM_STR, 255); $sth->bindParam(14,$entry->duration, PDO_PARAM_FLOAT); $sth->execute(); } } // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: