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

New setup shows a blank page #20

Closed
Drudoo opened this issue Jul 17, 2018 · 8 comments
Closed

New setup shows a blank page #20

Drudoo opened this issue Jul 17, 2018 · 8 comments
Labels

Comments

@Drudoo
Copy link

Drudoo commented Jul 17, 2018

I have tried using both docker with a lamp stack or my regular hosted webhost and both times i get a blank page when trying to connect to public/index.php

@berrnd
Copy link
Member

berrnd commented Jul 17, 2018

What does the webserver error log say? Are you sure you use PHP 7.2 and SQLite extension is enabled?

@Drudoo
Copy link
Author

Drudoo commented Jul 17, 2018

I was sure i had php 7.2, but i tried a fresh docker with php7.2 for sure and this is the error i get:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/services/DatabaseService.php:17 Stack trace: #0 /var/www/html/services/DatabaseService.php(17): PDO->__construct('sqlite:/var/www...') #1 /var/www/html/services/DatabaseService.php(33): Grocy\Services\DatabaseService->GetDbConnectionRaw() #2 /var/www/html/controllers/BaseController.php(13): Grocy\Services\DatabaseService->GetDbConnection() #3 /var/www/html/controllers/LoginController.php(14): Grocy\Controllers\BaseController->__construct(Object(Slim\Container)) #4 /var/www/html/app.php(25): Grocy\Controllers\LoginController->__construct(Object(Slim\Container), 'grocy_session') #5 /var/www/html/vendor/pimple/pimple/src/Pimple/Container.php(118): {closure}(Object(Slim\Container)) #6 /var/www/html/vendor/slim/slim/Slim/Container.php(123): Pimple\Container->offsetGet('LoginController...') #7 /var/www/html/vendor/slim/slim/Slim/Container.php(172): Slim\Container->get('LoginController...') #8 /var/www/html/routes.php(60): Slim in /var/www/html/services/DatabaseService.php on line 17

@Drudoo
Copy link
Author

Drudoo commented Jul 17, 2018

This might have fixed the problem chown -R www-data:www-data /var/www/html/

@berrnd
Copy link
Member

berrnd commented Jul 17, 2018

Yes, the /data directory must be writable...

@codywarmbo
Copy link

I am having this same error, but the permissions are correct for the directories. Is therea nything else that may cause this? I'm running PHP 7.2 and SqLite 3.8.3

@berrnd
Copy link
Member

berrnd commented Mar 26, 2019

Double check that your configured webserver root directory is /public...

What's the error message - as above about "unable to open database file" - that it can only be permissions or wrong paths...

@codywarmbo
Copy link

The sqlite PDO driver for some reason was not working in the VM I spun up. Running

sudo apt install php7.2-sqlite

again was enough to solve the issue. Thanks. Great tool!

@Mannshoch
Copy link

I have a similar error Messasge:

Fatal error: 
Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /volume1/web/grocy/services/DatabaseService.php on line 66 
PDOException: SQLSTATE[HY000] [14] unable to open database file in /volume1/web/grocy/services/DatabaseService.php on line 66 
Call Stack: 0.0017 355200 
1. {main}() /volume1/web/grocy/public/index.php:0 0.0437 356944 
2. require_once('/volume1/web/grocy/app.php') /volume1/web/grocy/public/index.php:45 0.5318 620680 
3. Slim\App->run() /volume1/web/grocy/app.php:94 0.5913 781224 
4. Slim\App->handle() /volume1/web/grocy/vendor/slim/slim/Slim/App.php:199 0.5913 781224 
5. Slim\MiddlewareDispatcher->handle() /volume1/web/grocy/vendor/slim/slim/Slim/App.php:215 0.5913 781224 
6. {anonymous-class:/volume1/web/grocy/vendor/slim/slim/Slim/MiddlewareDispatcher.php:294-315}->handle() /volume1/web/grocy/vendor/slim/slim/Slim/MiddlewareDispatcher.php:81 0.5913 781224 
7. Grocy\Middleware\CorsMiddleware->__invoke() /volume1/web/grocy/vendor/slim/slim/Slim/MiddlewareDispatcher.php:313 0.5914 781224 
8. {anonymous-class:/volume1/web/grocy/vendor/slim/slim/Slim/MiddlewareDispatcher.php:128-149}->handle() /volume1/web/grocy/middleware/CorsMiddleware.php:30 0.5914 781224 
9. Slim\Middleware\ErrorMiddleware->process() /volume1/web/grocy/vendor/slim/slim/Slim/MiddlewareDispatcher.php:147 0.6865 882128 
10. Slim\Middleware\ErrorMiddleware->handleException() /volume1/web/grocy/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php:109 0.6866 882128 
11. Grocy\Controllers\ExceptionController->__invoke() /volume1/web/grocy/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php:127 0.7066 889768 
12. Grocy\Controllers\ExceptionController->renderPage() /volume1/web/grocy/controllers/ExceptionController.php:65 0.7066 889768 
13. Grocy\Controllers\ExceptionController->getDatabase() /volume1/web/grocy/controllers/BaseController.php:178 0.7085 889904 
14. Grocy\Services\DatabaseService->GetDbConnection() /volume1/web/grocy/controllers/BaseController.php:58 0.7210 890176 
15. Grocy\Services\DatabaseService->GetDbConnectionRaw() /volume1/web/grocy/services/DatabaseService.php:53 0.7211 890464 
16. PDO->__construct() /volume1/web/grocy/services/DatabaseService.php:66 

I'm using a Synology DSM216j I activated php7.4 and sqlite3

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

No branches or pull requests

4 participants