[Sovled] - mod_fcgid: stderr: PHP Parse error: syntax error, unexpected ‘[’

Posted 2 years ago

There’s a million ways to get a PHP Parse error, however if you do receive the problem (in my case, working with a plugin on a Expression Engine) which looks similar to PHP Parse error: syntax error, unexpected ‘[’ try tailing your error logs, find out how to tail your logs here.

After tailing the logs I noticed the error which looked similar to this


mod_fcgid: stderr: PHP Parse error:  syntax error, unexpected '[' in /var/www/vhosts/domain.com/httpdocs/system/user/addons/tag/Model/Data.php on line 100, referer: http://www.domain.com/admin.php?/cp/channels/fields/18

The solution to my problem was, my PHP version. I temporarily took my PHP version down a couple of points to upgrade some old software. After a bit of a searching around, I found I needed to be running 5.3 as a minimum with the CMS (I upgraded it back to the highest stable version) and viola, problem solved. I hope this helps.