Closed
Description
So this is probably just me being too rusty at PHP but I am struggling to get the config.php (well.. really its an ini file...) to pick up environment variables. I can connect to the database when I hardcode the username, password and host, but if I try and use environment variables at all such as
dsn = "pgsql:host=db;dbname=privatebin"
tbl = "privatebin_" ; table prefix
usr = $_ENV['DB_USER']
pwd = $_ENV['DB_PASSWORD']
They are not picked up at all, either you get the full variable name parsed as if it were a string (and I don't have a user called $_ENV['DB_USER']
oddly), or if I try the version which works with php.ini files and just have ${DB_USER}
they are blank. Do you have any guides for this? or is it one where I should update the code to not get this from the config.php file and instead just read in direct?
Metadata
Metadata
Assignees
Labels
No labels