Bug #64042 [Opn->Nab]: Post/json_decode

From: Date: Tue, 22 Jan 2013 07:37:51 +0000
Subject: Bug #64042 [Opn->Nab]: Post/json_decode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-176171@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64042&edit=1 ID: 64042 Updated by: aharvey@php.net Reported by: andreyp at dukascopy dot com Summary: Post/json_decode -Status: Open +Status: Not a bug Type: Bug Package: FPM related Operating System: linux PHP Version: 5.3.21 Block user comment: N Private report: N New Comment: Thanks! Previous Comments: ------------------------------------------------------------------------ [2013-01-22 07:34:29] andreyp at dukascopy dot com You right. On FPM magic_quotes_gpc was enabled. After disable magic_quotes_gpc it work. ------------------------------------------------------------------------ [2013-01-22 00:31:06] aharvey@php.net Can you please check phpinfo() on both installations — specifically, does the FPM installation have magic_quotes_gpc enabled? ------------------------------------------------------------------------ [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

« previous php.bugs (#176171) next »