how to login in redmine from php?

Added by Andre Lee 5 months ago

tried to simulate here: https://www.postman.com (works perfectly well)

my login test: http://controlc.com/09816a14

I get the next error:
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents($url): Failed to open stream: operation failed

tried to activate ssl (but it does not give anything):
'ssl' => array('cafile' => 'cacert.pem', //from http://curl.haxx.se/ca/cacert.pem
'verify_peer'=> true,
'verify_peer_name'=> true
)

implemented two versions of cookies parse, because I am not sure what is more correct
see function get_redmine_cookie
//return $result_without_params;
return $result_with_params;

what am I doing wrong?