Bug #74420 [NEW]: oci_pconnect over tls problems
| From: | sega234 at mail dot ru | Date: | Wed, 12 Apr 2017 11:13:28 +0000 |
| Subject: | Bug #74420 [NEW]: oci_pconnect over tls problems | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208488@lists.php.net to get a copy of this message | ||
From: sega234 at mail dot ru
Operating system: Ubuntu 16.04
PHP version: 7.1.3
Package: OCI8 related
Bug Type: Bug
Bug description:oci_pconnect over tls problems
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 bug report at https://bugs.php.net/bug.php?id=74420&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74420&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74420&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74420&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74420&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74420&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74420&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74420&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74420&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74420&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74420&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74420&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74420&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74420&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74420&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74420&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74420&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74420&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74420&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74420&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74420&r=mysqlcfg