rest api curl enable/disable stream target works in local not in live

Hi ,

I am using wowza stream engine 4.7.0 . i am able to enable/disable stream target in local but not in live. I am using shared hosting.

$url=“http://103.49.235.15:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/rajdemo/pushpublish/mapentries/rajstreamdemo/actions/enable”;

$json = " ";

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $json);

curl_setopt($ch, CURLOPT_HEADER ,0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “PUT”);

curl_setopt($ch, CURLOPT_USERPWD, “cherri:cherri123”);

curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);

curl_setopt($ch, CURLOPT_HTTPHEADER, array( ‘Accept:application/json; charset=utf-8’, ‘Content-type:application/json; charset=utf-8’, 'Content-Length: '.strlen($json)));

$contents = curl_exec($ch);

curl_close($ch);

$obj = json_decode($contents);

echo “

”;

print_r($obj);

exit();

It sounds like your command works fine against one server instance, but not another? What response are you getting when you run your command? I would recommend sending this in as a support request so that we can review the server’s conf/ and logs/. I’d also recommend redacting sensitive info from your post above, such as username, password, and IP addresses.

Michelle