Re: [Модуль] Camshoter (camshoter)
Добавлено: Вт дек 11, 2018 3:25 pm
ОК.directman66 писал(а): ↑Вт дек 11, 2018 2:46 pmдля винды еще нужно прописать корректный путь для curl. Чуть позже сделаю.
ОК.directman66 писал(а): ↑Вт дек 11, 2018 2:46 pmдля винды еще нужно прописать корректный путь для curl. Чуть позже сделаю.
curl расположен по этому адресу, обновился.directman66 писал(а): ↑Вт дек 11, 2018 4:09 pmДля винды прописал корректный путь до curl. Попробуйте. curl должен находиться по адресу с:\_majordomo\apps\curl.exe
пишет этоdirectman66 писал(а): ↑Ср дек 12, 2018 7:19 amЯ сталкивался с тем, что под виндой по умолчанию curl не работает через https, так как не видит сертификат.
попробуйте выполнить в cmd
C:\_majordomo\apps\curl.exe -k -v "https://smarty.mail.ru/api/v1/objects/d ... =Ваш_token'" -F file_0=@C:\_majordomo\htdocs\cms\nvr\cam1\ДАТА\ИМЯ_ФАЙЛА -F meta='{"mode":["object", "scene"],"images":[{"name":"file_0"}]}'
Код: Выделить всё
C:\>C:\_majordomo\apps\curl.exe -k -v "https://smarty.mail.ru/api/v1/objects/detect?oauth_provider=mcs&oauth_token=etUbATtJYvFtB1Lk5uE6T=========wh5kEim28RkMr1xn5'" -F file_0=@C:\_majordomo\htdocs\cms\cached\nvr\cam1\2018-12-12\cam1_2018-12-12_071518.jpg -F meta='{"mode":["object", "scene"],"images":[{"name":"file_0"}]}'
* Protocol https not supported or disabled in libcurl
* Closing connection -1
curl: (1) Protocol https not supported or disabled in libcurl
curl: (3) [globbing] unmatched close brace/bracket at pos 6
Код: Выделить всё
if (!defined('PATH_TO_FFMPEG')) {
if (IsWindowsOS()) {
define("PATH_TO_FFMPEG", SERVER_ROOT.'/apps/ffmpeg/ffmpeg.exe');
} else {
define("PATH_TO_FFMPEG", 'ffmpeg');
Код: Выделить всё
C:\>C:\_majordomo\apps\curl.exe -k -v "https://smarty.mail.ru/api/v1/objects/detect?oauth_provider=mcs&oauth_token=etUbATtJYvFtB1=========CyQwh5kEim28RkMr1xn5'" -F file_0=@C:\_majordomo\htdocs\cms\cached\nvr\cam1\2018-12-12\cam1_2018-12-12_071518.jpg -F meta='{"mode":["object", "scene"],"images":[{"name":"file_0"}]}'
* Trying 94.100.177.167...
* TCP_NODELAY set
* Connected to smarty.mail.ru (94.100.177.167) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* NPN, negotiated HTTP1.1
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Next protocol (67):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=RU; L=Moscow; O=LLC Mail.Ru; OU=IT; CN=*.mail.ru
* start date: Dec 15 00:00:00 2017 GMT
* expire date: Dec 14 12:00:00 2020 GMT
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GeoTrust RSA CA 2018
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> POST /api/v1/objects/detect?oauth_provider=mcs&oauth_token=etUbATtJYvFtB1=========yQwh5kEim28RkMr1xn5' HTTP/1.1
> Host: smarty.mail.ru
> User-Agent: curl/7.63.0
> Accept: */*
> Content-Length: 22656
> Content-Type: multipart/form-data; boundary=------------------------6be04d290671583d
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Server: nginx/1.10.3
< Date: Thu, 13 Dec 2018 08:18:49 GMT
< Content-Type: application/json
< Content-Length: 142
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block; report=https://cspreport.mail.ru/xxssprotection
< Strict-Transport-Security: max-age=604800
<
{"status":400,"body":"could not unmarshal meta: invalid character '\\'' looking for beginning of value","htmlencoded":false,"last_modified":0}* Connection #0 to host smarty.mail.ru left intact
curl: (3) unmatched close brace/bracket in URL position 6:
scene],images:[{name:file_0}]}'
^
Код: Выделить всё
Warning: Illegal string offset 'object_labels' in C:\_majordomo\htdocs\modules\camshoter\camshoter.class.php on line 831
Warning: Illegal string offset 'labels' in C:\_majordomo\htdocs\modules\camshoter\camshoter.class.php on line 831
Warning: Invalid argument supplied for foreach() in C:\_majordomo\htdocs\modules\camshoter\camshoter.class.php on line 833
Warning: Illegal string offset 'object_labels' in C:\_majordomo\htdocs\modules\camshoter\camshoter.class.php on line 831
Warning: Illegal string offset 'labels' in C:\_majordomo\htdocs\modules\camshoter\camshoter.class.php on line 831
Warning: Invalid argument supplied for foreach() in C:\_majordomo\htdocs\modules\camshoter\camshoter.class.php on line 833