I'm trying to set up an apache environment variable using .htaccess file in the following way:
SetEnv SERVER_KEY "qwerty"
After that i gracefully restart my apache web server:
apachectl graceful
Then i create a file called version.php in /var/www/html
<?php phpinfo() ?>
And go to MYIPADDRESS/version.php to check but i find out that the environment variable has not been set up.
Here are further details: OS: RHEL6 PHP Version: 5.3.3 Apache Version: 2.2.15 (Red Hat)
What do i do?
Update: I solved my problem by changing AllowOverride None to AllowOverride All in the server configuration file!