HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla doesn't start after installation: PHP Parse error
rocxjo
New
Version: 3.3, downloaded today, 2020-03-20
PHP 7.3.16, Apache 2.4.6, MariaDB 5.5.64
I have copied the unzipped directory 'package' to /var/www and renamed it /var/www/vanilla. Everytime I go to the ip adress or domain name of my server, I see a completely empty page in my browser, and the following line is written to /var/log/httpd/vanilla_error.log:
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/vanilla/environment.php on line 74
(line 74 of environment.php looks like this:
spl_autoload_register([Vanilla\AliasLoader::class, 'autoload']);
Am I missing something in my installation, or is there a way to fix this issue?
Tagged:
0
Comments
Add this lione to your conf/config.php file to get more info on your error.
If that don't help try this
https://open.vanillaforums.com/discussion/26786/tutorial-how-to-enable-a-debug-log-and-collect-debugging-information
The error is shown already in the log. But it is quite surprising. That language feature is implemented since PHP 5.5: https://www.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class
To me that looks like some kind of weird PHP/server configuration issue...
My Vanilla installation has not run succesfully and the file conf/config.php does not exist yet, so I copied config-defaults.php to a new config.php and edited this line, but it does not change the output to vanilla_error.log (editing config-defaults.php directly didn't have any effect either).
Note that I am not familiar with PHP, so if this is a problem in Vanilla's code, I'm not likely to find it.
It surely must be a server config thing if you are not seeing the install page. does your server meet all the requirements here.
If you are not sure contact your host