tomwalder / php-gds-session

Datastore Session Handler for PHP on Google AppEngine
Apache License 2.0
7 stars 3 forks source link

Error on session_start() #9

Open federicobaraldi opened 2 years ago

federicobaraldi commented 2 years ago

Hi Tom, i'm trying to use your php-gds-session code in my local environment before releasing it in production but i always get this error: "Warning: session_start(): Failed to read session data: user (path: )" and then could not dtermine DATASET. Any hint? Thank.

tomwalder commented 2 years ago

Hi there.

The library was quite out of date (only supported App Engine php55 runtime).

I have released a new version which may help. It requires php-gds v5.1 and PHP 7+.

Let me know how that goes.

federicobaraldi commented 2 years ago

It work's like a charm in the appengine environment .... Thank you very much ... only one question: when I try to debug in the local environment I get this error:

Warning: session_start(): Failed to read session data: user (path: ) in /Users/federico/Sites/timesheet/vendor/tomwalder/php-gds-session/src/GDS/Session/Handler.php on line 135

Fatal error: Uncaught RuntimeException: Could not determine project ID, please configure your Gateway in /Users/federico/Sites/timesheet/vendor/tomwalder/php-gds/src/GDS/Gateway.php:229 Stack trace: #0 /Users/federico/Sites/timesheet/vendor/tomwalder/php-gds/src/GDS/Store.php(82): GDS\Gateway::determineProjectId() #1 /Users/federico/Sites/timesheet/vendor/tomwalder/php-gds-session/src/GDS/Session/Handler.php(305): GDS\Store->__construct(Object(GDS\Schema), NULL) #2 /Users/federico/Sites/timesheet/vendor/tomwalder/php-gds-session/src/GDS/Session/Handler.php(210): GDS\Session\Handler->getStore() #3 [internal function]: GDS\Session\Handler->read('0930cucq1daju5r...') #4 /Users/federico/Sites/timesheet/vendor/tomwalder/php-gds-session/src/GDS/Session/Handler.php(135): session_start() #5 /Users/federico/Sites/timesheet/index1.php(17): GDS\Session\Handler::start(3600) #6 /Users/federico/Sites/timesheet/index.php(9): require('/Users/federico...')

7 {main} thrown in

/Users/federico/Sites/timesheet/vendor/tomwalder/php-gds/src/GDS/Gateway.php on line 229

Any hints on how to solve ? I tried also setting env variables with "putenv('GOOGLE_APPLICATION_CREDENTIALS=' . DIR .'/client_secret.json');" but without success.

Have a great day,

Il giorno mer 16 mar 2022 alle ore 17:59 Tom Walder < @.***> ha scritto:

Hi there.

The library was quite out of date (only supported App Engine php55 runtime).

I have released a new version which may help. It requires php-gds v5.1 and PHP 7+.

Let me know how that goes.

— Reply to this email directly, view it on GitHub https://github.com/tomwalder/php-gds-session/issues/9#issuecomment-1069354659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ7N6AGLBFMMYUUX5MRNXDVAIHNNANCNFSM5PKORP6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

-- Federico Baraldi