Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5027

JSON functions WIndows CLI

$
0
0

From the Windows CLI, I have a php script (that is referencing the dreamfactory php.ini and included JSON 2.1 support. However, when I try to use json_decode or json_encode functions they return blank. No errors, just blank.

The relevant output from php --ini :

json
json support => enabled
json version => 1.2.1

Any ideas why json specifically isn't working? Other libs work fine (like curl, simpleXML, etc) Just for giggles, I wrote a quick script to test for the functions and they are not available.

<?php

if(!function_exists('json_decode')){
 	echo ('JSON Decode OK' . PHP_EOL);
}
else {
 	echo ('JSON Decode Not Available' . PHP_EOL);
}
if(!function_exists('json_encode')){
 	echo ('JSON Encode OK' . PHP_EOL);
}
else {
 	echo ('JSON Encode Not Available' . PHP_EOL);
}

?>

Viewing all articles
Browse latest Browse all 5027

Trending Articles