I've been using MediaTemple's GridService as a production environment for a couple of relatively lightweight PHP sites. The process of setting up testing and staging environments is kind of cumbersome and leads to staff taking shortcuts, so I'm trying to put together a quality control environment that provides a similar environment to GridService but that allows me to hook it more closely to our automated deployment process (provisioning new environments in GridService requires you to use the web interface; mod_vhost_alias would just allow us to create directories that are subdomains of our test url).
I am very, very close, but encountered an issue - with PHP running as CGI, apache automatically prepends REDIRECT_ to any variables I set in .htaccess (remember, I'm simulating GridService) using SetEnv. For example:
SetEnv HTTP_TEST_VAR "Some Value"
echo getenv('HTTP_TEST_VAR'); // prints "" echo getenv('REDIRECT_HTTP_TEST_VAR'); // prints "Some Value"
This wouldn't be a big deal (we could code around it), except that it doesn't happen in GridService, and I really would prefer to have identical code paths (adding switching logic to the code would defeat the point of all the work we've done to get configuration out of the codebase).
For the rest of the background, I'm using a brand new (2 weeks old) (ve) instance running Ubuntu, got apache and all dependencies from apt, and built PHP (5.3.15) using the configure string from a
<?php phpinfo() ?> on GridService, minus db4 support.
I would really appreciate any help. Thanks!