Php.cgi parse error

When POSTing to a PHP page (that worked beautifully on another server) I get the following:

Warning: Unexpected character in input: ‘’ (ASCII=15) state=1 in /usr/local/dh/cgi-system/php.cgi on line 4118

Parse error: parse error, unexpected ‘*’ in /usr/local/dh/cgi-system/php.cgi on line 4118

And the URL is redirected to:

I’ve never received an error message to the like before (usually the parse error specified the .php file and line number). Is this just telling me something is screwy somewhere with my php page? I just find the message a little esoteric and am not certain where to begin troubleshooting. Thanks.

Can you show us your PHP?

Simon Jessey
Keystone Websites | si-blog

Sounds like you’re accessing the php binary directly.

The wrapper will not work unless there’s a file being passed through it. You cannot call the binary itself directly. You must use it as a wrapper to a PHP script.

thanks for your suggestion.

it turns out that i was posting to the /cgi-system/php.cgi file directly from the form.

clearly, it was not my intention to do this, but rather what happened was that the PHP variable $_SERVER[‘SCRIPT_NAME’] used the aforementioned php.cgi file instead of my actual script name (probably due to how PHP is being executed). I hard-coded the script name and everything is groovy.

Thanks guys!

$_SERVER[‘PHP_SELF’] always worked for me.