Just add the variable as an Apache environment variable:
SetEnv foo bar
You could set that in httpd.conf
, apache2.conf
, or .htaccess
.PHP should then be able to access it via one or more of the following methods:
$_SERVER['foo']
$_ENV['foo']
getenv('foo')