GAE php CloudStorageTools class is missing

670 views
Skip to first unread message

Joe Seph

unread,
May 28, 2015, 11:13:34 PM5/28/15
to google-a...@googlegroups.com
I downloaded google-api-PHP-client from GitHub from this link ( https://github.com/google/google-api-php-client ) and installed it on my localhost then created a bucket on our google project and used storage class from this library to upload files on this bucket . with this class i could upload and get details of all files in any bucket on this project . now I need to use tools called CloudStorageTools and i need to know if it is separated on this library because I can't find this class and I need to know how to install it in details and preferred if there is any example to how install it on a localhost environment and how to install it on server environment using PHP .

Thanks .

Patrice (Cloud Platform Support)

unread,
May 29, 2015, 1:33:59 PM5/29/15
to google-a...@googlegroups.com, josep...@gmail.com
Hi Joe,

Not 100% sure what you mean by "CloudStorageTools", but I will assume you meant gsutil (the command line utilitary for google storage).

This page contains everything you need to install, run, and use it.

If I'm mistaken in the tool you need, let me know where you get that name exactly and I'll investigate.

Cheers!

Joe Seph

unread,
May 29, 2015, 1:51:42 PM5/29/15
to google-a...@googlegroups.com
Hey Patrice thanks for your quick reply ,
I'm trying to use dynamic image feature using PHP app engine according to the official documentation in order to use  this feature I have to use CloudStorageTools . as declared in the following code 
require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
use google\appengine\api\cloud_storage\CloudStorageTools;

$object_image_file
= 'gs://my-bucket/myfile.png';
$object_image_url
= CloudStorageTools::getImageServingUrl($object_image_file,
                                           
['size' => 400, 'crop' => true]);

header
('Location:' .$object_image_url);
the problem that I can't find CloudStorageTools Class in Google PHP client library .
I have  a doubt that CloudStorageTools is a part of Google cloud storage and I have to integrate both Google cloud storage and Google app engine together in order to do the above code I could be mistaken .

Thanks ,

Patrice (Cloud Platform Support)

unread,
May 29, 2015, 1:54:30 PM5/29/15
to google-a...@googlegroups.com, josep...@gmail.com
Hey Joe,

Thanks for clarifying it. Honestly, that does completely invalidate my whole gsutil answer.

I'm looking this up, I should be able to come back with something soon :).

Cheers!

Mars Lan

unread,
May 29, 2015, 3:06:56 PM5/29/15
to google-a...@googlegroups.com
CloudStorageTool.php is part of the GAE PHP SDK so there's no need to download and include it manually. Your example code from https://cloud.google.com/appengine/docs/php/googlestorage/images should work as-is. What error message are you getting?

mohamed hassan

unread,
Jun 2, 2015, 11:35:31 AM6/2/15
to google-a...@googlegroups.com
Fatal error: Call to undefined function make_call() in C:\xampp\htdocs\google_cloud\google\appengine\runtime\RealApiProxy.php on line 49

this is the error which we get when trying to use this code and i can't figure where is the problem in it ?

Vinny P

unread,
Jun 3, 2015, 10:37:41 PM6/3/15
to google-a...@googlegroups.com
On Tue, Jun 2, 2015 at 10:35 AM, mohamed hassan <mohamedh...@gmail.com> wrote:
Fatal error: Call to undefined function make_call() in C:\xampp\htdocs\google_cloud\google\appengine\runtime\RealApiProxy.php on line 49


Are you using the App Engine development server, or another PHP server on your local machine? Can you post the commands you use to launch the dev server?

 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
  
Reply all
Reply to author
Forward
0 new messages