|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64042 Post/json_decode
Submitted: 2013-01-21 22:09 UTC Modified: 2013-01-22 07:37 UTC
From: andreyp at dukascopy dot com Assigned:
Status: Not a bug Package: FPM related
PHP Version: 5.3.21 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: andreyp at dukascopy dot com
New email:
PHP Version: OS:


 [2013-01-21 22:09 UTC] andreyp at dukascopy dot com
Simple script give different result under php-fastcgi and php-fpm with apache2.

Test script:
$data = $_POST["data"];
$data = json_decode($data);

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-22 00:31 UTC]
Can you please check phpinfo() on both installations — specifically, does the FPM installation have magic_quotes_gpc enabled?
 [2013-01-22 00:31 UTC]
-Status: Open +Status: Feedback
 [2013-01-22 07:34 UTC] andreyp at dukascopy dot com
You right. On FPM magic_quotes_gpc was enabled. After disable magic_quotes_gpc it 
 [2013-01-22 07:34 UTC] andreyp at dukascopy dot com
-Status: Feedback +Status: Open
 [2013-01-22 07:37 UTC]
 [2013-01-22 07:37 UTC]
-Status: Open +Status: Not a bug
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 03 02:01:26 2023 UTC