Loading...


Related Products


How can I set a custom environment variable to use with my application?

If you set a custom environment variable through dotfiles or the terminal, the variable is not available in your Drupal application. Therefore, you must create a new .conf file under /home/ide/configs/apache2. The following is an example:

1. Create the variables.conf file and populate it with one or more SetEnv lines to declare your custom environment variables:

SetEnv FOO "bar"
  1. Restart Apache:
ide:~$ acli ide:service-restart apache
  1. Print the new environment variable in your application:
print $_ENV["FOO"];

Drupal should return bar.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation