Skip to main content

How to setup environment variables

Comments

3 comments

  • 24x7server
    Hi, Try the below: # cd ~ # touch .bash_exports # vi .bash_exports Put your environmental variables in here.. # vi .bashrc Add the below bold statement in the .bashrc file. if [ -f $HOME/.bash_exports ]; then . $HOME/.bash_exports fi
    0
  • dimkasta
    Thanks for the response I have already tried this but unfortunately, it does not work. .bashrc is executed when you start bash as a user, so you will have those when using SSH for example. But apache and php-fpm still have no way of knowing those variables.
    0
  • cPanelMichael
    Hello, Could you provide some more information about the specific environmental variables you need to configure? There's a thread here you may find helpful: How to use php-cli 7.X instead 5.6 Thank you.
    0

Please sign in to leave a comment.