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

Slim application error #152

Closed
jornvdcb opened this issue Feb 18, 2019 · 5 comments
Closed

Slim application error #152

jornvdcb opened this issue Feb 18, 2019 · 5 comments
Labels

Comments

@jornvdcb
Copy link

I really want to use Grocy on my Centos 7 server but I just cannot seem to get past this error. I have the following dependencies installed:

Grocy: Cloned latest github version (18-02-2019)
Sqlite: sqlite3 --version : 3.27.1 2019-02-08 13:17:39
Php: php -v : PHP 7.2.15
I've also checked issues: #119 & #104

Isn't there a pre-build database which I can use to test with?

Slim Application Error

The application could not run because of the following error:
Details
Type: PDOException
Code: HY000
Message: SQLSTATE[HY000]: General error: 1 near "WITH": syntax error
File: /var/www/html/grocy/services/DatabaseService.php
Line: 45
Trace

#0 /var/www/html/grocy/services/DatabaseService.php(45): PDO->exec('CREATE TABLE re...')
#1 /var/www/html/grocy/services/DatabaseMigrationService.php(47): Grocy\Services\DatabaseService->ExecuteDbStatement('CREATE TABLE re...')
#2 /var/www/html/grocy/services/DatabaseMigrationService.php(23): Grocy\Services\DatabaseMigrationService->ExecuteSqlMigrationWhenNeeded(43, 'CREATE TABLE re...')
#3 /var/www/html/grocy/controllers/LoginController.php(70): Grocy\Services\DatabaseMigrationService->MigrateDatabase()
#4 [internal function]: Grocy\Controllers\LoginController->Root(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#5 /var/www/html/grocy/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#6 /var/www/html/grocy/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#7 /var/www/html/grocy/middleware/SessionAuthMiddleware.php(26): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#8 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#9 /var/www/html/grocy/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#10 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#11 /var/www/html/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#12 /var/www/html/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /var/www/html/grocy/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /var/www/html/grocy/vendor/slim/slim/Slim/App.php(515): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /var/www/html/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /var/www/html/grocy/vendor/slim/slim/Slim/App.php(406): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /var/www/html/grocy/vendor/slim/slim/Slim/App.php(314): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /var/www/html/grocy/app.php(71): Slim\App->run()
#19 /var/www/html/grocy/public/index.php(3): require_once('/var/www/html/g...')
#20 {main}

@berrnd
Copy link
Member

berrnd commented Feb 18, 2019

Seems pretty identical to #104, are you sure your PHP runtime uses the mentioned SQLite version?
(When you've cloned the current master branch, the SQLite version is displayed in the about dialog.)

I have attached a pre-built database (up to migration 50, username/password admin).
grocy.zip

@jornvdcb
Copy link
Author

You're right, it's still SQLite Library | 3.7.17.. I wonder why there isn't an update available. Too bad grocy doesn't work on MySQL.

@berrnd
Copy link
Member

berrnd commented Feb 19, 2019

Ok, that explains it then...

MySQL - maybe some time - see #89...

@berrnd berrnd closed this as completed Feb 19, 2019
@marc700
Copy link

marc700 commented Oct 15, 2020

Would love to try out grocy but I'm having trouble getting it to run on an ubuntu 16 server. I followed #694 step by step but continue to get a blank page or a 500 error. I've installed PHP 7.3 and I believe all the modules I need. The error is the log file is
[Thu Oct 15 19:27:55.407931 2020] [:error] [pid 2121] [client 192.168.15.20:45988] PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/html/grocy/vendor/slim/slim/Slim/Factory/AppFactory.php on line 84

@berrnd
Copy link
Member

berrnd commented Oct 16, 2020

I've installed PHP 7.3

That's the issue, README says that PHP 7.4 works better....

@berrnd berrnd mentioned this issue Oct 16, 2020
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

3 participants