服务帐户Google oAuth:file_get_contents .p12无法打开流:没有此类文件或目录

时间:2015-01-06 07:29:41

标签: google-oauth google-api-php-client file-not-found

我正在尝试通过指定keyfilelocation运行Google oAuth服务帐户,如下所示:

$client_id = 'xccsssds-ib5c5qmr7n34aifss95ue7qouplh7v3r.apps.googleusercontent.com'; //Client ID
$service_account_name = 'sdfdsfsxxxxxxxxxsdfdsf-ib5c5qmr7n34aifss95ue7qouplh7v3r@developer.gserviceaccount.com'; //Email Address
$key_file_location = 'My Cloud Project-e2a5b459dfd9.p12'; //key.p12 

但是我的服务器抛出的错误如下:

file_get_contents(My Cloud Project-e2a5b459dfd9.p12): failed to open stream: No such file or directory in XXXXXXXXXX
Uncaught exception 'Google_Auth_Exception' with message 'Unable to parse the p12 file. Is this a .p12 file? Is the password correct? OpenSSL error: ' 

p12文件的路径正确并且正确地提供了文件权限但是它抛出了这个错误。

0 个答案:

没有答案