Archived from the Transloadit support forum. Originally posted on July 10, 2012; details may be outdated, see our docs for current behavior. Original thread
I’ve recently had plesk upgrade our server to latest php etc and now when I use transloadit the notification is failing at our server end of things (Assembly REDACTED)
If I use json_last_error() I get 4 = syntax error. Just wondering if this is something you have come across recently - couldnt’ see anything on your knowledgebase but I’ve come across some discussions elsewhere about new json_decode issues with PHP
This is my PHP code:
if (!empty($_POST[‘transloadit’]))
{
//----- GET THE TRANSLOADIT DATA -----
$json = $_POST['transloadit'];
if (ini_get(‘magic_quotes_gpc’) === ‘1’)
{
$json = stripslashes($json); //Also fails with this commented out
}
echo "json_last_error is: ".json_last_error()."\n"; //Gives '0'
echo "Doing json_decode";
$json = json_decode($json, true);
echo "json_last_error is: ".json_last_error()."\n"; //Gives '4'
No worries if not, just asking in case you’ve already had to deal with this