Laravel 5.4 on PHP 5.6.40 Syntax error Hi,
I have Laravel 5.4 installed on PHP 5.6.4 server, and i can't start the app. Everything works ok locally with the same configuration, but on the server i get this error:
(1/1) FatalErrorException
syntax error, unexpected '?', expecting variable (T_VARIABLE)
in PDOConnection.php line 24
Thanks :)
Are you sure both the web and cli versions of php are the same version (5.6.4)?
This is the local config:
PHP 5.6.19
PDO drivers: mysql
Server web
PHP 5.6.40 (phpinfo: https://dev.careertools.com.au/phpinfo.php)
CLI version is 7.2
I can't change the server version because there's old php code that would not work on 7. Will changing the cli version fix it ?
PHP 5.6.19 code will run (should) on php 7.2. I'm on 7.3 and have had no trouble with older code.
The only thing I've had to do is an older framework rename a class from error to something else.
That is unless you have some way out in left field code.
Please sign in or create an account to participate in this conversation.