Open jwdinkel opened 3 years ago
Hello,
I'm trying to run this in Google Cloud Shell.
Any thoughts on what this vendor folder is and what autoload.php should contain?
Thank you!
jd@cloudshell:~/$ git clone https://github.com/bcastellano/drivelink jd@cloudshell:~/$ cd drivelink/web jd@cloudshell:~/drivelink/web$ php -S localhost:8080 PHP 7.2.34-21+0~20210501.61+debian10~1.gbp6622c7 Development Server started at Fri Jun 4 11:35:58 2021 Listening on http://localhost:8080 Document root is /home/jd/drivelink/web Press Ctrl-C to quit. [Fri Jun 4 11:36:26 2021] PHP Warning: require_once(/home/jd/drivelink/web/../vendor/autoload.php): failed to open stream: No such file or directory in /home/jd/drivelink/web/index.php on line 3 [Fri Jun 4 11:36:26 2021] PHP Fatal error: require_once(): Failed opening required '/home/jd/drivelink/web/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/jd/drivelink/web/index.php on line 3 [Fri Jun 4 11:36:26 2021] 127.
Once the PHP is running, you go to the upper right and click the web preview button
I think there are a couple of steps missing in the readme. You need to copy the file "config/config.php.dist" to be "config/config.php" and change credentials inside. You also need to run "composer install" to install dependencies of the project. This will create the vendor folder and some php files (like the autoload.php file) inside.
Nice. Thank you!
So I have edited the config.php file inside config by adding my clientId and client secret from the https://console.cloud.google.com/apis/credentials/oauthclient
Below the composer install seems to have worked, but running the project fails with a call to Memcashed. I'll have a look, but that's where I stand right now. Thanks you in advance for any further assistance you may have time to give me.
jd@cloudshell:~$ cd drivelink
jd@cloudshell:~/drivelink$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 19 installs, 0 updates, 0 removals
- Downloading google/apiclient (1.1.7)
- Downloading symfony/routing (v3.0.6)
- Downloading symfony/polyfill-mbstring (v1.1.1)
- Downloading symfony/http-foundation (v3.0.6)
- Downloading symfony/event-dispatcher (v3.0.6)
- Downloading psr/log (1.0.0)
- Downloading symfony/debug (v3.0.6)
- Downloading symfony/http-kernel (v3.0.6)
- Downloading pimple/pimple (v1.1.1)
- Downloading silex/silex (v1.3.5)
- Downloading ircmaxell/password-compat (v1.0.4)
- Downloading symfony/polyfill-php55 (v1.1.1)
- Downloading symfony/polyfill-util (v1.1.1)
- Downloading symfony/polyfill-php56 (v1.1.1)
- Downloading paragonie/random_compat (v1.4.1)
- Downloading symfony/polyfill-php70 (v1.1.1)
- Downloading symfony/property-access (v3.0.6)
- Downloading symfony/security-acl (v3.0.0)
- Downloading symfony/security (v2.8.6)
- Installing google/apiclient (1.1.7): Extracting archive
- Installing symfony/routing (v3.0.6): Extracting archive
- Installing symfony/polyfill-mbstring (v1.1.1): Extracting archive
- Installing symfony/http-foundation (v3.0.6): Extracting archive
- Installing symfony/event-dispatcher (v3.0.6): Extracting archive
- Installing psr/log (1.0.0): Extracting archive
- Installing symfony/debug (v3.0.6): Extracting archive
- Installing symfony/http-kernel (v3.0.6): Extracting archive
- Installing pimple/pimple (v1.1.1): Extracting archive
- Installing silex/silex (v1.3.5): Extracting archive
- Installing ircmaxell/password-compat (v1.0.4): Extracting archive
- Installing symfony/polyfill-php55 (v1.1.1): Extracting archive
- Installing symfony/polyfill-util (v1.1.1): Extracting archive
- Installing symfony/polyfill-php56 (v1.1.1): Extracting archive
- Installing paragonie/random_compat (v1.4.1): Extracting archive
- Installing symfony/polyfill-php70 (v1.1.1): Extracting archive
- Installing symfony/property-access (v3.0.6): Extracting archive
- Installing symfony/security-acl (v3.0.0): Extracting archive
- Installing symfony/security (v2.8.6): Extracting archive
Generating autoload files
jd@cloudshell:~/drivelink/web$ php -S localhost:8080
PHP 7.2.34-21+0~20210501.61+debian10~1.gbp6622c7 Development Server started at Tue Jun 8 09:36:09 2021
Listening on http://localhost:8080
Document root is /home/jd/drivelink/web
Press Ctrl-C to quit.
[Tue Jun 8 09:36:22 2021] PHP Fatal error: Uncaught Error: Class 'Memcached' not found in /home/jd/drivelink/src/app.php:26
Stack trace:
#0 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(126): DriveLink\{closure}(Object(Silex\Application))
#1 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(83): Pimple::{closure}(Object(Silex\Application))
#2 /home/jd/drivelink/src/app.php(29): Pimple->offsetGet('session.storage...')
#3 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(126): DriveLink\{closure}(Object(Silex\Application))
#4 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(83): Pimple::{closure}(Object(Silex\Application))
#5 /home/jd/drivelink/vendor/silex/silex/src/Silex/Provider/SessionServiceProvider.php(60): Pimple->offsetGet('session.storage...')
#6 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(126): Silex\Provider\SessionServiceProvider->Silex\Provider\{closure}(Object(Silex\Application))
#7 /home/jd/drivelink/vendor/pimple/ in /home/jd/drivelink/src/app.php on line 26
[Tue Jun 8 09:36:22 2021] 127.0.0.1:44128 [500]: /?authuser=0 - Uncaught Error: Class 'Memcached' not found in /home/jd/drivelink/src/app.php:26
Stack trace:
#0 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(126): DriveLink\{closure}(Object(Silex\Application))
#1 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(83): Pimple::{closure}(Object(Silex\Application))
#2 /home/jd/drivelink/src/app.php(29): Pimple->offsetGet('session.storage...')
#3 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(126): DriveLink\{closure}(Object(Silex\Application))
#4 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(83): Pimple::{closure}(Object(Silex\Application))
#5 /home/jd/drivelink/vendor/silex/silex/src/Silex/Provider/SessionServiceProvider.php(60): Pimple->offsetGet('session.storage...')
#6 /home/jd/drivelink/vendor/pimple/pimple/lib/Pimple.php(126): Silex\Provider\SessionServiceProvider->Silex\Provider\{closure}(Object(Silex\Application))
#7 /home/jd/drivelink/vendor/pimple/ in /home/jd/drivelink/src/app.php on line 26
It seems you need to install/enable the Memcached extensión for PHP in Google Cloud. That class is provided with this extension and used in this file. The code currently doesn't support not using Memcache for the session because it's hardcoded, you can change the code to not use Memcached and save the session in the server memory.
Hello,
I'm trying to run this in Google Cloud Shell.
Any thoughts on what this vendor folder is and what autoload.php should contain?
Thank you!
Once the PHP is running, you go to the upper right and click the web preview button