ZF-9708: Floating point number converted to some negative exponent number
Description
Hi, I'm using flex builder 3 and sdk3.3, in our last project we used ZendAmfphp as our server side script. when we send a floating point number in a value object (for example 3.8756 like some thing) to php, the number get converted to some negative value (some thing like 1.9383e-28) in the php side when they try to get the value from the Value Object. Is there any one know, where we went wrong.
Comments
Posted by Wade Arnold (wadearnold) on 2010-05-05T12:54:21.000+0000
Can you supply a PHP class file example. This will help me pinpoint if this is and AMF0 or AMF3 issue. We are currently using 31.57 for the test case of the float value.
Posted by jagan langa (jagan) on 2010-05-05T22:50:19.000+0000
Hi,
its working on solaris(intel hardware)with coolstock, but not work in same solaris version(sparc hardware).
Other details:
Server OS : SunOS File System : UFS Apache Version : Apache/2.2.9 PHP Version : PHP/5.2.6 Apache API Version : 20051115 php API : 20041225
RenderVO.php // Value object class in php class RenderVO { var $photoId=""; var $albumId = ""; var $vFlip = 0; var $hFlip = 0; var $rotation = 0; var $cropX = 0; var $cropY = 0; var $cropWidth = 0; var $cropHeight = 0; var $vignette; var $mediumWidth = 0; var $mediumHeight = 0; var $colorEffects; var $tintColor; var $base64ImageSnapShot; var $originalMedSource = ""; var $_explicitType = "com.source.model.render.vo.RenderVO";
}
require_once "com/source/model/render/vo/RenderVO.php"; // Class which is used by flex to save details class PhotoService {
function savePhoto($render=NULL, $saveAndReplace = false, $albumtype="", $shareid="") { $vType = $saveAndReplace == 1 ? 2 : 1; $render->photoId; $colorEffects = $render->colorEffects; $vData='rotation='.$render->rotation.',cropX='.$render->cropX.',cropY='.$render->cropY.',cropWidth='.$render->cropWidth.',cropHeight='.$render->cropHeight.',hFlip='.$render->hFlip.',vFlip='.$render->vFlip.',width='.$render->mediumWidth.',height='.$render->mediumHeight;
}
}
Posted by jagan langa (jagan) on 2010-05-05T23:28:07.000+0000
hi, here is the updated h/w and s/w details,
OS : SunOS 5.10 Generic_142900-02 HARDWARE : sparc openssl version 0.9.7d apache and php installed using coolstack packages[1.3.1] apache version 2.2.9 php version 5.2.6
Posted by Wade Arnold (wadearnold) on 2010-05-12T06:46:00.000+0000
Jagan,
I do not have access to such hardware. I have requested a test server from zend or someone from zend to look into this issue.