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

%kernel.project_dir% in docker/php/env gives an error #6127

Open
harmtemolder opened this issue Dec 8, 2022 · 3 comments
Open

%kernel.project_dir% in docker/php/env gives an error #6127

harmtemolder opened this issue Dec 8, 2022 · 3 comments

Comments

@harmtemolder
Copy link

Running docker-compose run --rm php composer install after copying docker/php/env.example to env (as described here) and leaving it with its default values results in this error:

In Inline.php line 310:
                                                                                                                                       
  The reserved indicator "%" cannot start a plain scalar; you need to quote the scalar at line 9 (near "database_path: %kernel.projec  
  t_dir%/data/db/wallabag.sqlite").

When I change DATABASE_PATH to the absolute path to the same folder, it succeeds.

But then the next command, docker-compose run --rm php bin/console wallabag:install, fails with:

Database connection       ERROR!   Can't connect to the database: An exception occurred in driver: SQLSTATE[HY000] [14] unable to open database file

What am I doing wrong?

@harmtemolder
Copy link
Author

I have found #5790 but I don't think it's the same issue. I will try another database driver though, see if I at least can get it to work.

@nicosomb
Copy link
Member

nicosomb commented Aug 3, 2023

I will try another database driver though, see if I at least can get it to work.

@harmtemolder do you have more details about your problem?

@lifepillar
Copy link

Does enclosing the value in double quotes fix the problem?

database_path: "%kernel.project_dir%/data/db/wallabag.sqlite"

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

No branches or pull requests

3 participants