PHP CGI T_STRING error

December 22, 2009 by: Akhthar Parvez

PHP-CGI not working

If you get the following error while accessing the PHP page, which is running as CGI:

(ASCII=21) state=1 in /usr/local/cpanel/cgi-sys/php4 on line 382

Warning: Unexpected character in input: ‘ in /usr/local/cpanel/cgi-sys/php4 on line 382

Parse error: syntax error, unexpected T_STRING in /usr/local/cpanel/cgi-sys/php4 on line 382

FIX:

Set the following under “Paths and Directories” in php.ini file (probably /usr/local/php4/lib/php.ini on cPanel servers):

cgi.fix_pathinfo=1

And restart the Apache server to see the issue is fixed.

Filed under: PHP
Tags: , , , , , ,

Leave a Reply

You must be logged in to post a comment.