How to enable features for php-curl

↘锁芯ラ 提交于 2019-12-01 01:39:28

It looks like you may need to recompile curl with the argument "--with-spnego" in your configure command.

For an example of a configure command: http://curl.haxx.se/mail/lib-2012-02/0094.html

Full on docs (overkill): http://curl.haxx.se/docs/install.html

Turns out that I do not need SPNEGO enabled with CURL as it works fine with GSS auth. Just like with the CLI I need to set CURLOPT_USERPWD without providing a password:

$username = rtrim(`id -un`, "\n");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPAUTH => CURLAUTH_ANY,
    CURLOPT_POSTFIELDS => [...],
    CURLOPT_USERPWD => "$username:"
]);

Now it works just fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!