I added environment variables to /home/user1/.bashrc and they are available with printenv command but not in PHP with getenv().
What I am doing wrong?
Content of ".bashrc":
Content of php file:
What I am doing wrong?
Content of ".bashrc":
Code:
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export SENTRY_ENVIRONMENT=example
export SENTRY_DSN=https://example
PHP:
<?php
echo getenv('SENTRY_DSN');
?>
Last edited: