Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Class 'google\appengine\datastore\v4\RunQueryRequest' not found #134

Closed
reyadrian opened this issue Sep 15, 2016 · 2 comments
Closed

Comments

@reyadrian
Copy link

Using datastore-api-v1:


    $obj_gateway = new GDS\Gateway\ProtoBuf("Test123");

    $obj_schema = (new GDS\Schema("Messages"))
        ->addString('message_id')
        ->addString('type')
        ->addString('action')
        ->addInteger('to')
        ->addDatetime('created_at')
        ->addString('status')
        ->addString('message', FALSE);

    $obj_store = new GDS\Store($obj_schema,$obj_gateway);


    $query = "SELECT * FROM notifications WHERE `to` = 1 ORDER BY created_at";
    $obj_store->query($query);
    $arr_page = $obj_store->fetchPage(10, 0);

This is the error I got:

Fatal error: Class 'google\appengine\datastore\v4\RunQueryRequest' not found in /usr/share/nginx/html/csfiles/third_party/gds/vendor/tomwalder/php-gds/src/GDS/Gateway/ProtoBuf.php on line 164

I just followed this code from your examples.

@tomwalder
Copy link
Owner

Hello,

I can see you are running this code sample on nginx.

The ProtoBuf gateway will only work either

  • on AppEngine
  • in the local AppEngine development environment

If you want to use the remote (JSON/REST) API, then you need to use the
RESTv1 Gateway.

Hope that helps!

Tom

On Thursday, 15 September 2016, reyadrian notifications@github.com wrote:

Using datastore-api-v1:

$obj_gateway = new GDS\Gateway\ProtoBuf("Test123");

$obj_schema = (new GDS\Schema("Messages"))
    ->addString('message_id')
    ->addString('type')
    ->addString('action')
    ->addInteger('to')
    ->addDatetime('created_at')
    ->addString('status')
    ->addString('message', FALSE);

$obj_store = new GDS\Store($obj_schema,$obj_gateway);


$query = "SELECT * FROM notifications WHERE `to` = 1 ORDER BY created_at";
$obj_store->query($query);
$arr_page = $obj_store->fetchPage(10, 0);

This is the error I got:

Fatal error: Class 'google\appengine\datastore\v4\RunQueryRequest' not
found in /usr/share/nginx/html/csfiles/third_party/gds/vendor/
tomwalder/php-gds/src/GDS/Gateway/ProtoBuf.php on line 164

I just followed this code from your examples.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#134, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABMyk6VgAGcN6PvIqwGUofLqradnqmq_ks5qqOTkgaJpZM4J9iT-
.

Tom Walder, CTO

We're exhibiting in September & October.

[image: GCP NEXT London - 20th October 2016]
https://cloudplatformonline.com/NEXT2016-London.html
[image: eCommerce expo London - 28-29 September 2016]
http://www.ecommerceexpo.co.uk/
We're hiring. Find out more at www.docnet.nu/jobs
http://www.docnet.nu/jobs?utm_source=email_signature&utm_medium=email&utm_campaign=email_signature
Call: 0161 660 7110 / Web: www.docnet.nu
http://www.docnet.nu/?utm_source=email_signature&utm_medium=email&utm_campaign=email_signature
This message is private and confidential. If you have received this message
in error, please notify us and remove it from your system. Venditan Limited
t/a Docnet is a company registered in England and Wales. Registered number:
9604502. Registered office: Speakers House, 39 Deansgate, Manchester, M3 2BA

@reyadrian
Copy link
Author

ok thank you, Tom 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants