text: Q:
  
  Add Variable to $_SERVER array via php.ini
  
  I need to add a variable to the $_SERVER array in a php script. Is there a possibility to do this via the php.ini file? I want to add the variable for all scripts on the webserver, so it's quite inconvenient to add it in each script.
  Thanks,
  TSS
  
  A:
  
  You can set it in your .htaccess or in the apache configuration
  <VirtualHost *:80>
      ...
      SetEnv PARAM "VALUE"
      ...
  </VirtualHost>
  
  It will be added to the variable $_SERVER['PARAM'].
  
  A:
  
  If you're using Apache, try the SetEnv module.
  (you can see more here: Declaring global variable with php.ini)
  
  