cgi-system redirect (aka Dreamhost issue)

Not sure if this has been resolved by someone else, but the Dreamhost problem is a result of Dreamhost defaulting new domains to run PHP as a CGI (mostly for permissions). This means the $_SERVER['SCRIPT_FILENAME'] returns /dh/cgi-system/php.cgi instead of the zen script.

For users, the very easy workaround for this is to use an 0.8 config.php which does not auto-detect the paths.

As for fixing the auto-detection, you might be able to use the constant __FILE__ to auto-detect the SERVERPATH, and I guess $_SERVER['REQUEST_URI'] for WEBPATH?

For reference, $_SERVER['SCRIPT_NAME'] returns 'cgi-system/php.cgi' and $_SERVER['SCRIPT_FILENAME'] returns '/dh/cgi-system/php.cgi' on Dreamhost with PHP running as a CGI, neither of which are useful.

Comments

Sign In or Register to comment.