We configure PHP applications on 2 servers with databases in CloudSQL, they require read /write static content in a CloudStorage bucket from PHP applications.

What I did was install GCS Fuse to mount the CloudStorage bucket as a shared folder on a server but PHP applications do not see the bucket files. Review service account, API access is enabled and can be viewed with GSUTIL. In the support forums mention some bookstores but I really do not understand, they also mention solutions in App Engine but it does not apply in this case.

The question is if there is another way to connect PHP applications with Cloud Storage?

  • Does anyone on the server see the files? Can you see them with ls? – Michael Hampton Oct 18 '18 at 17:28

You can take advantage of the usual GCS connectivity, if you configure a Google Cloud Storage properly. Once this is done, you may write from your PHP app with lines analogous to: file_put_contents("gs://${my_bucket}/hello.txt", $newFileContent);

  • Is necessary the PHP API with those line? – Hector Restrepo Jimenez Oct 19 '18 at 18:25
  • The question is not entirely clear. The PHP line is just an example. – George Oct 21 '18 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.