Parse error: syntax error, unexpected '[' in /nfs/c01/h07/mnt/9546/domains/domain.com/html/index.php on line 134
The dev site was working fine, then no one touched it for a few days. When we returned after the weekend, we see the following error and cannot access the front or back-end of the site. We checked index.php on the indicated line and nothing seems to be amiss.
Has anyone seen this issue before? What typically causes it? We didn't change anything, not even content.
This is the latest version of CMSMS, relatively new install. CGBlog, LISE and Sitemap Manager installed. There are a few articles, some content pages, sitemaps and templates.
Parse error: syntax error, unexpected '['
Re: Parse error: syntax error, unexpected '['
Any chance someone changed the PHP version?
Not getting the answer you need? CMSMS support options
Re: Parse error: syntax error, unexpected '['
Thank you for your time, DIGI. Not that I know of, would anyone other than me be able to change PHP but maybe the host did without my knowledge. It was set to 5.6.21 but now I changed it to PHP 7. I get a different error, now:DIGI3 wrote:Any chance someone changed the PHP version?
Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php on line 751
Re: Parse error: syntax error, unexpected '['
That's just a warning, you can ignore that until the next version of LISE is released. Sounds like your PHP version got changed then, if that fixed the main problem (note that if you have some of CG's latest modules, you'll need PHP 7.2)
Not getting the answer you need? CMSMS support options
Re: Parse error: syntax error, unexpected '['
Thanks again DIGI, it's v7.2.12. I wish I could ignore it, but it's not rendering anything at all. Front end looks like:DIGI3 wrote:That's just a warning, you can ignore that until the next version of LISE is released. Sounds like your PHP version got changed then, if that fixed the main problem (note that if you have some of CG's latest modules, you'll need PHP 7.2)
/admin looks like: when I go to /admin/login.php, it renders the login with errors: When I log in, I just get a white page with error lines:
Code: Select all
Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php on line 751
Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php on line 751
Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php on line 751
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php:751) in /nfs/c01/h07/mnt/9546/domains/domain.com/html/lib/classes/class.cms_cookies.php on line 106
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php:751) in /nfs/c01/h07/mnt/9546/domains/domain.com/html/lib/classes/class.cms_cookies.php on line 106
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php:751) in /nfs/c01/h07/mnt/9546/domains/domain.com/html/lib/classes/class.cms_cookies.php on line 106
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php:751) in /nfs/c01/h07/mnt/9546/domains/domain.com/html/lib/classes/class.cms_cookies.php on line 106
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h07/mnt/9546/domains/domain.com/html/modules/LISE/LISE.module.php:751) in /nfs/c01/h07/mnt/9546/domains/domain.com/html/lib/classes/class.cms_cookies.php on line 106
Re: Parse error: syntax error, unexpected '['
You may need to clear the site cache after switching PHP versions. You should probably also set display_errors to 0 in your php setup and just have them go to log.
Clear the cache by removing everything in tmp/cache and tmp/templates_c
Usually warnings don't result in a white screen, but if you still get one in admin after clearing the cache, go to /modules and rename the LISE folder temporarily. If admin works after that, you'll at least know where to focus your efforts. You'll need to comment out any LISE calls in your pages/templates to get the frontend to work.
Clear the cache by removing everything in tmp/cache and tmp/templates_c
Usually warnings don't result in a white screen, but if you still get one in admin after clearing the cache, go to /modules and rename the LISE folder temporarily. If admin works after that, you'll at least know where to focus your efforts. You'll need to comment out any LISE calls in your pages/templates to get the frontend to work.
Not getting the answer you need? CMSMS support options