Bug 1381905 - php-mssql: After first query to MSSQL (DBLIB) all the other queries return null values
Summary: php-mssql: After first query to MSSQL (DBLIB) all the other queries return nu...
Keywords:
Status: CLOSED DUPLICATE of bug 1381442
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: php-extras
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dmitry Butskoy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-05 10:53 UTC by Martin Lindner
Modified: 2016-10-05 15:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-05 14:15:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 64522 0 None None None 2016-10-05 10:53:01 UTC

Description Martin Lindner 2016-10-05 10:53:01 UTC
Description of problem:
-----------------------
One of our dev teams is moving an application from RHEL 6.8 / PHP 5.3.3 to RHEL 7.2 / PHP 5.4.16. 

They ran into the the following upstream PHP bug:
https://bugs.php.net/bug.php?id=64522

We can reproduce the issue with our in-house code and also with the simple test script from the upstream bug.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
php.x86_64                  5.4.16-36.3.el7_2      @rhel-7-server-rpms
php-pdo.x86_64              5.4.16-36.3.el7_2      @rhel-7-server-rpms
php-mssql.x86_64            5.4.16-4.el7           @epel 

How reproducible:
-----------------
Run the following test script (from upstream bug) against Microsoft SQL server (tested with 2012 SP3):

$pdo=new PDO('dblib:host=db;dbname=admin;charset=UTF-8',$username,$password);

$statement=$pdo->query('select 1+1 as result');
print_r($statement->fetchAll());
$statement->closeCursor();

$statement=$pdo->query('select 1+1 as result');
print_r($statement->fetchAll());


Actual results:
---------------
Array
(
    [0] => Array
        (
            [result] => 2
            [0] => 2
        )

)
Array
(
    [0] => Array
        (
            [result] => 2
            [0] => 2
        )

)

Expected results:
-----------------
Array
(
    [0] => Array
        (
            [result] => 2
            [0] => 2
        )

)
Array
(
)

Additional info:
----------------
-

Thanks a lot for looking into this.

Kind regards,
Martin

Comment 1 Remi Collet 2016-10-05 14:15:45 UTC

*** This bug has been marked as a duplicate of bug 1381442 ***

Comment 2 Martin Lindner 2016-10-05 15:01:33 UTC
Hi Remi, I originally had a ticket with RH support about this - until realizing that the affected library (pdo_dblib.so) is in in php-mssql / EPEL and not in php-pdo.

Unfortunately I didn't notice that support already had bug 1381442 open.

Sorry about the duplicate, thanks a lot for the quick fix!


Note You need to log in before you can comment on or make changes to this bug.