title: php, apache & .htaccess: include php configuration file globally
body: <p>i have a php project which has a configuration file config.php that stores config information like database info, directories, etc.</p>
  
  <p>normally we would include this config file at the top of every php page like require_once(".../config.php); however, i have found a way to do this by creating  a .htaccess file and include this:</p>
  
  <pre><code>php_value  auto_prepend_file  /home/public_html/..../config.php
  </code></pre>
  
  <p>this works fine until i transferred it to the shared hosting. apparently, this shared hosting allows us to change the PHP version from 4x to 5x. After changing to 5x, i realised they have created a .htaccess file with the following content: </p>
  
  <pre><code>&lt;FilesMatch "\.php$"&gt; # phpvs v5
  AddHandler x-httpd-php5 .php # phpvs v5
  &lt;/FilesMatch&gt; # phpvs v5
  </code></pre>
  
  <p>with this, it ignores the include path to the config file.. how can i go about fixing this? i certainly do not wanna include my config.php in every php files.</p>