Bug #74420 [Opn]: oci_pconnect over tls problems

From: Date: Thu, 15 Jun 2017 04:11:27 +0000
Subject: Bug #74420 [Opn]: oci_pconnect over tls problems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209542@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74420&edit=1 ID: 74420 User updated by: sega234 at mail dot ru Reported by: sega234 at mail dot ru Summary: oci_pconnect over tls problems Status: Open Type: Bug Package: OCI8 related -Operating System: Ubuntu 16.04 +Operating System: Ubuntu 16.04/CentOS 6 -PHP Version: 7.1.3 +PHP Version: 7.* Block user comment: N Private report: N New Comment: Problem also found on PHP 7.0.18 and CentOS 6 Previous Comments: ------------------------------------------------------------------------ [2017-04-12 11:13:20] sega234 at mail dot ru Description: ------------ I try to use persistent connection to database with tls protocol. Also i use nginx and php-fpm. During first 6 requests connections to db are established. In next request I receive php Warning: Errno: 2 Errstr: oci_parse(): supplied resource is not a valid oci8 connection resource Errline: 16 If I restart php-fpm, then i can do 6 requests more, and in 7th I will recive warning. If in php-fpm I set pm.start_servers = 10 and restart php-fpm, then i can do 11 requests, and in 12th I will recive warning. Requests without error correlates with pm.start_servers parameter. Also, in cloned vm with php version 5.6.22 problem does not exists. Also, oci_pconnect() with php7.1.3 works without tls protocol. OCI8 Version 2.1.3 Oracle Run-time Client Library Version 12.2.0.1.0 Oracle Compile-time Instant Client Version 12.2 php.ini default settings php.fpm settings: pm.max_children = 250 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 25 Test script: --------------- <?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); function errorsHandler($errno , $errstr, $errfile, $errline) { echo "Errno: " . $errno . "\n"; echo "Errstr: " . $errstr . "\n"; echo "Errline: " . $errline . "\n"; die(); } set_error_handler('errorsHandler'); $conn = oci_pconnect('/', '', 'SECUREDCONNECTION','AL32UTF8',OCI_CRED_EXT); if (!$conn) { die("Connection problems: " . oci_error()); } $stid = oci_parse($conn, 'select * from accounts where number = :number'); $value = '4080************2622'; oci_bind_by_name($stid, ':number', $value, -1, SQLT_CHR); oci_execute($stid); echo "Sql executed" . PHP_EOL; oci_free_statement($stid); Expected result: ---------------- Sql executed Actual result: -------------- Errno: 2 Errstr: oci_parse(): supplied resource is not a valid oci8 connection resource Errline: 16 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74420&edit=1

« previous php.bugs (#209542) next »