Edit report at https://bugs.php.net/bug.php?id=64042&edit=1

 ID:                 64042
 Updated by:         ahar...@php.net
 Reported by:        andreyp at dukascopy dot com
 Summary:            Post/json_decode
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            FPM related
 Operating System:   linux
 PHP Version:        5.3.21
 Block user comment: N
 Private report:     N

 New Comment:

Can you please check phpinfo() on both installations — specifically, does the 
FPM installation have magic_quotes_gpc enabled?


Previous Comments:
------------------------------------------------------------------------
[2013-01-21 22:09:40] andreyp at dukascopy dot com

Description:
------------
Simple script give different result under php-fastcgi and php-fpm with apache2.



Test script:
---------------
<?php
$data = $_POST["data"];
var_dump($data);
$data = json_decode($data);
var_dump($data);
?>

result with php-fastcgi
 curl -k https://localhost/json-test.php -X POST -d 
data=[{\"datumType\":\"message\"}]
string(25) "[{"datumType":"message"}]"
array(1) {
  [0]=>
  object(stdClass)#1 (1) {
    ["datumType"]=>
    string(7) "message"
  }
}

result with php-fpm
curl -k https://localhost/json-test.php -X POST -d 
data=[{\"datumType\":\"message\"}]
string(29) "[{\"datumType\":\"message\"}]"
NULL



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64042&edit=1

Reply via email to