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:
- Restart Apache:
ide:~$ acli ide:service-restart apache
- Print the new environment variable in your application:
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.