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