|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78259 PDO::PARAM_INT can't handle more then 2147483647
Submitted: 2019-07-06 14:55 UTC Modified: 2019-07-09 12:12 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: soheyb dot djellali at outlook dot com Assigned:
Status: Open Package: pdo_sqlsrv (PECL)
PHP Version: 7.3Git-2019-07-06 (Git) OS: Windows 10 x64 bit
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-07-06 14:55 UTC] soheyb dot djellali at outlook dot com
when ever i output data from sql using pdo bindparam 

if the output is integer and is (bigint) +2147483647 
it always come back 0 

Test script:
$con = new PDO('sqlsrv:server=localhost;database=Telecaster','sa','');

$stmt = $con->prepare('{CALL cpanel_temp_gold(?)}');

echo number_format($gold);

}catch(PDOEXCEPTION $e){

	echo $e->getMessage();

Expected result:
actualle number

Actual result:
return 0 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-09 12:12 UTC]
-Package: PDO related +Package: pdo_sqlsrv
 [2019-07-09 12:12 UTC]
This is likely not a general PDO issue, but rather specific to
PDO_SQLSRV, and therefore it might be best to report it in its
issue tracker[1].  On a quick glance, the int cast[2] looks fishy,
since zend_long is 64bit wide on x64.

[1] <>
[2] <>
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 13 00:01:25 2020 UTC