php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74420 oci_pconnect over tls problems
Submitted: 2017-04-12 11:13 UTC Modified: 2018-12-16 04:22 UTC
Votes:14
Avg. Score:4.9 ± 0.3
Reproduced:12 of 14 (85.7%)
Same Version:12 (100.0%)
Same OS:11 (91.7%)
From: sega234 at mail dot ru Assigned: sixd (profile)
Status: No Feedback Package: OCI8 related
PHP Version: 7.* OS: Ubuntu 16.04/CentOS 6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sega234 at mail dot ru
New email:
PHP Version: OS:

 

 [2017-04-12 11:13 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-15 04:11 UTC] sega234 at mail dot ru
-Operating System: Ubuntu 16.04 +Operating System: Ubuntu 16.04/CentOS 6 -PHP Version: 7.1.3 +PHP Version: 7.*
 [2017-06-15 04:11 UTC] sega234 at mail dot ru
Problem also found on PHP 7.0.18 and CentOS 6
 [2017-06-15 18:49 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: sixd
 [2017-06-15 18:49 UTC] kalle@php.net
Assigning to Oracle
 [2017-12-06 08:41 UTC] sega234 at mail dot ru
Reproduced on PHP Version 7.2.0
 [2018-09-04 17:40 UTC] php at koenigskind dot net
Possibly related to Bug #76804 and might also be fixed with the pull request: https://github.com/php/php-src/pull/3491
 [2018-12-08 10:31 UTC] sixd@php.net
-Status: Assigned +Status: Feedback
 [2018-12-08 10:31 UTC] sixd@php.net
Try the fix merged for #76804
 [2018-12-16 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 13:01:27 2024 UTC