Hello,
I have a strange error when trying to upload OTA from a app via a PHP script.
Below is the script:
<? $userAgent = $_SERVER['HTTP_USER_AGENT']; $target_url = 'https://mdash.net/api/v2/devices/'.'device_name'.'/ota?access_token='.'token'; $file_name_with_full_path = realpath('20200202-162927.zip'); $post = array('file'=>'@'.$file_name_with_full_path); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$target_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $result=curl_exec ($ch); http_response_code(200); if (curl_errno($ch)) { $error_msg = curl_error($ch); } echo $result; curl_close ($ch); ?>
Above script works OK if php from hosting service is set to 5.4, but if I set php to 5.6 i get folowing response > {"message":"Internal Server Error"}
Anny ideas?