1

I've this error when I run the website,

ParameterNotFoundException: You have requested a non-existent parameter "ppr.database.host.dev".

I put the var in my terminal env, env returns me :

SYMFONY__PPR__DATABASE__HOST__DEV=localhost

I also put the var in my 2 php.ini files, export

SetEnv SYMFONY__PPR__DATABASE__HOST__DEV localhost

And this var appears also in app/config/parameters.ini,

database_host = %ppr.database.host.dev%
2
  • why don't you want to put 'ppr.database.host.dev' directly in parameters.ini? another question: why don't you use 'yml' parameters instead of 'ini'? Commented Oct 24, 2012 at 15:33
  • Because I take part to the development of a project so I can modify the code like I want to. config.yml makes the import of parameters.ini like in symfony2 tutorial (symfony.com/doc/2.0/cookbook/configuration/… Miscellaneous Configuration) Commented Oct 24, 2012 at 15:46

1 Answer 1

1

for parameters.ini just simple add:

[parameters]
    ppr.database.host.dev = "localhost"
    database_host = %ppr.database.host.dev%

another way to have this parameter available for website: you should set evn in your host configuration. for arapache it should be something like:

<VirtualHost *:80>
    ...
    SetEnv          SYMFONY__PPR__DATABASE__HOST__DEV localhost
    ...
</VirtualHost>
Sign up to request clarification or add additional context in comments.

2 Comments

Here is my code in my apache2/php.ini file and cli/php.ini file. SetEnv SYMFONY__PPR__DATABASE__HOST__DEV localhost I put this code a the end of the file
SetEnv SYMFONY__PPR__DATABASE__HOST__DEV localhost - this code should be in your apache virtual host configuration, not in php.ini. try to put it there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.