Php-cgi vs Php as an Apache module
Php-cgi is useful in that it allows you to run php as specific user instead of as the user apache runs as, but php doesn’t present exactly the same enviornment to the php programmer when running under the different modes. One example is documented here [http://wiki.dreamhost.com/index.php/WordPress]
“Certain plugins make use of environment variables that are not present on DreamHost’s servers. If you run into weird problems, try adding this to your wp-config.php on the line after the initial “<?php”:
$_SERVER[‘SCRIPT_NAME’] = $_SERVER[‘SCRIPT_URL’];
$_SERVER[‘SCRIPT_FILENAME’] = $_SERVER[‘DOCUMENT_ROOT’].$_SERVER[‘SCRIPT_URL’];
Since $_SERVER[‘SCRIPT_NAME’] variable will
return the php.cgi binary rather than the name of your script, WP 1.5.1 with multiple front page index will not work in a php-cgi enviornment. Is there an easy way to make WordPress enviornment neutral in this regard? Thanks!
- The topic ‘Php-cgi vs Php as an Apache module’ is closed to new replies.