linux - Sudden PHP parse error on RHEL -


i have various php files, none of have been modified prior app working , breaking. problem reason, these files throwing php parse errors things 'unexpected' square brackets in seemingly random places throughout file, upon manually checking file, syntax correct.

the thing did have 'altered' files various chmod operations change permissions. how/why change actual content of files?

the files called on boot have been, , have worked fine in past, until recent chmod changes.

is permanent, or have restore system earlier time?

rhel 6.5, php 5.4.

edit:

example of error:

php parse error:  syntax error, unexpected '[' in /var/ptc/crm-dev/tools/init on line 122 

what's on line 122:

$files = []; 

another example:

php parse error:  syntax error, unexpected '[', expecting ')' in /var/ptc/crm-dev/vendor/react/promise/src/functions.php on line 68 

what's on line 68:

 return resolve([]); 

but these files haven't been changed (as far i'm aware), , syntax looks correct.

phpinfo() gives 5.4.39, same when running php -v on server.

if php version has been changed may stumbling on php 5.4 square bracket array syntax.

use phpinfo(); sure php version running web server same 1 you're using on cli.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -