cron job error 'Unsupported declare 'strict_types'

since a few months, my cronjob for recurring invoices and reminders give an error:

Warning: Unsupported declare ‘strict_types’ in /home/nursesat/public_html/facturatie/vendor/sabre/uri/lib/functions.php on line 1

Parse error: syntax error, unexpected ‘:’, expecting ‘{’ in /home/nursesat/public_html/facturatie/vendor/sabre/uri/lib/functions.php on line 22

I’m running php 7.2, so this should be correct.

can anyone help please?

What do you see if you run php -v

how exactly do I do that?

You would need to SSH into the server.

Sometimes the web server and command line use different versions of PHP, I think that may be the case here.

I just got the confirmation of the server that there is no problem there :frowning: the gave me :

That confirms the web version, you’d need to run php -v from the command line to confirm the CLI version.

thank you !!! That was indeed the problem!
After a support chat with my host, they solved it!

Great to hear, thanks for letting us know!