Edit report at https://bugs.php.net/bug.php?id=64042&edit=1
ID: 64042 User updated by: andreyp at dukascopy dot com Reported by: andreyp at dukascopy dot com Summary: Post/json_decode -Status: Feedback +Status: Open Type: Bug Package: FPM related Operating System: linux PHP Version: 5.3.21 Block user comment: N Private report: N New Comment: You right. On FPM magic_quotes_gpc was enabled. After disable magic_quotes_gpc it work. Previous Comments: ------------------------------------------------------------------------ [2013-01-22 00:31:06] ahar...@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