Search code examples
laravelcpanellumen

STR class error when deploying lumen to hosting


I was Deplyoying my lumen project to cpanel hosting , i did it as usual same as other person but i keep getting this error

''' PHP Parse error: syntax error, unexpected '?' in /home/k5169896/public_html/apiFunderAsia/vendor/illuminate/support/Str.php on line 681 '''


Solution

  • This is usually caused by the version of PHP you are using, check the version on your new host, if it is < PHP 7.2 which is the minimum requirement for Lumen then it causes this issue.