Good Day
Thanks for module
I have trubble
When I posting node on site, image cross-posting not always, But. if image crodd-posting too, I haves error on site:
Deprecated function: curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead in function vkxp_query() (строка 271 in file /....../sites/all/modules/vkxp/vkxp.module).
Проще говоря
Модуль кросспостит как надо, но почему то картинки попадают в ВК далеко не всегда. А если и попадают, то на странице сайта выводится ошибка:
Deprecated function: curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead в функции vkxp_query() (строка 271 в файле /тут_путь/sites/all/modules/vkxp/vkxp.module).
Подскажите, с чем может быть связано
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | vkxp_deprecated_curl_function_2425933.patch | 445 bytes | imyaro |
Comments
Comment #1
spleshkaError is related to the deprecated approach to upload files. We should refactor this code and provide a current way to upload files. That's it.
Comment #2
Aurochs commented@Spleshka so how can we do it?
Comment #3
Aurochs commentedComment #4
imyaro commentedIn PHP version < 5.5 for making a POST request via Curl to send an image you should use
@{path_to_file}expressionn.In PHP 5.5 + usage of @{path_to_file} became deprecated and new function curl_file_create() has appeared.
I've prepared patch to change
@usage to curl_file_create() function in module.Comment #5
Aurochs commentedК сожалению чтото не пашет у меня. Не отсылает ничего почему-то. Я вообще удалял модуль может по новой что не так настроил. Без патча виснет с патчем не отсылает. Заново создал приложение standalone, все внес все данные, постить от юзера или страницы не получается. Группу перевел в страницу. Тестил только от юзера и страницу как от группы ставил.
Comment #6
imyaro commentedAurochs, патч меняет только механику добавления изображения в пост, так что на саму отсылку никак не может повлиять. Максимум что может случиться - пост отправится без изображения.
Comment #7
Aurochs commentedСпасибо Ярослав. Я забил на модуль.
Comment #9
eugene.ilyin commentedCommitted. Thank you Yaroslav.