A client error occurred: Could not create storage directory: /tmp/Google_Client/00

前端 未结 6 1748
野的像风
野的像风 2021-01-06 05:00

What does this error mean with the Youtube API v3.0:

A client error occurred: Could not create storage directory: /tmp/Google_Client/00

I a

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-06 05:29

    I was having a similar issue. I am on a shared hosting.

    I was working on youtube api which was asking me to create Google_Client folder under the main \tmp on the server. Due to restriction that was not happening so I went into the

    google-api-php-client/src/conifg.php and changed the following line.

        /***********************************Shared server therefore cannot write to server's /tmp drive therefore using an alternate location*************************************************/
        //'ioFileCache_directory'  => (function_exists('sys_get_temp_dir') ? sys_get_temp_dir().'/Google_Client' : '/tmp/Google_Client'),
        'ioFileCache_directory'  => 'tmp/Google_Client',
    

    Then I created a tmp directory under google-api-php-client/src

    Then I created a Google_Client directory under google-api-php-client/src/tmp

    This worked for me. Hope this helps. If yes then mark it as answer as many folks are having the same problem.

提交回复
热议问题