本文介绍了发生客户端错误:无法创建存储目录:/tmp/Google_Client/00的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此错误对于Youtube API v3.0意味着什么?
What does this error mean with the Youtube API v3.0:
A client error occurred: Could not create storage directory: /tmp/Google_Client/00
我正在Google文档的此处上使用PHP Youtube API.
I am using the PHP Youtube API on Google's documentation found here.
推荐答案
我解决了这个问题,而没有更改任何Google API行.在您的php代码中,您只需要指定缓存文件夹所在的位置即可:
I solved this problem without changing any line of Google API.In your php code, you juste need to specify where you want the cache folder to be:
$config = new Google_Config();
$config->setClassConfig('Google_Cache_File', array('directory' => '../tmp/cache'));
// Here I set a relative folder to avoid pb on permissions to a folder like /tmp that is not permitted on my mutualised host
$client = new Google_Client($config);
// And then, you pass the config for your GoogleClient
使用Google日历服务对我来说效果很好.
It works fine for me using the Google Calendar Service.
这篇关于发生客户端错误:无法创建存储目录:/tmp/Google_Client/00的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!