I wasn’t getting any Google lovin’, so I post this for myself in case it happens again.
Accessing the PHP CGI directly (if you — hypothetically, say — redirected to $_SERVER['SCRIPT_NAME'] with PHP in CGI mode) can spring errors like so:
Warning: Unexpected character in input: '' (ASCII=6) state=1 in /usr/local/dh/cgi-system/php.cgi on line 124
Warning: Unexpected character in input: '' (ASCII=8) state=1 in /usr/local/dh/cgi-system/php.cgi on line 124
Parse error: parse error, unexpected '/' in /usr/local/dh/cgi-system/php.cgi on line 124
Try $_SERVER['PHP_SELF'].
Thanks for posting this– I was running into the exact same problem (also on a Dreamhost server, by the look of things) and the PHP_SELF thing TOTALLY fixed the problem.
Same thing here.
Dreamhost - trying to run phplayersmenu.
Thanks for the tip.