I'm trying to write to a file in a Google Cloud Storage bucket from my App Engine using PHP. I've followed the documentation for setting up a bucket and accessing it via PHP:
- https://developers.google.com/appengine/docs/python/googlestorage/index#Prerequisites
- https://developers.google.com/appengine/docs/php/googlestorage/
I've added the app engine's Service Account Name as an owner of the bucket in question, but when I attempt to run something like the following:
$fp = fopen('gs://[bucket-name]/log/log.txt', 'a+');
I get the following error:
PHP Warning: fopen(gs://[bucket-name]/log.txt): failed to open stream:
"\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper::stream_open"
call failed in /[myfile.php] on line 33
[bucket-name]
is just a placeholder, I'm using the correct bucket name. Am I missing something?