|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49669 SOAP pass incorrect number for long type
Submitted: 2009-09-25 15:04 UTC Modified: 2009-09-25 16:25 UTC
From: persiancity at gmail dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.2.11 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: persiancity at gmail dot com
New email:
PHP Version: OS:


 [2009-09-25 15:04 UTC] persiancity at gmail dot com
I use a SoapClient code to send a number to mysql database on a service server. The field type with bug is xsd:long. when I pass a integer value larger than 2147483647 to this field I get inccorect value on the service server database (All numbers = 2147483647).
I get correct result when send data from a 64bit server and inccorect result when send from 32bit server. but I am not sure it is cause of server type. I have not access to soap service server to know what is it.

Reproduce code:
$value= 3147483647;
$result = $this->client->register_number((int)$value); // result in database is: 2147483647 !!
// the mysql database field type is unsigned bigint

Expected result:
result in database is: 2147483647 !!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-25 15:06 UTC] persiancity at gmail dot com
I should add that I also tried converting to string:
$result = $this->client->register_number((string)$value); 
with no chance.
 [2009-09-25 16:25 UTC]
Thank you for your bug report.

This problem has already been reported to the bug tracker by someone else.

Bug #48717 Cannot pass datatype long (> 2147483647) in SOAP requests

Bug #40099 Cannot pass long (> 2147483647) in SOAP requests
Bug #30045 Cannot pass big integers (> 2147483647) in SOAP requests

 [2010-11-05 15:22 UTC] doebrentei at hotmail dot com
I use Macintosh with MAMP and PHP 5.2.13 and 5.3 and I have the same problem.
I set the value type to float but I think this is not a final solution.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 23:01:29 2024 UTC