Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beacon failing with internal server error #33

Closed
pashasiraja opened this issue Jan 4, 2022 · 3 comments
Closed

Beacon failing with internal server error #33

pashasiraja opened this issue Jan 4, 2022 · 3 comments

Comments

@pashasiraja
Copy link

pashasiraja commented Jan 4, 2022

I've got a simple shared host with a local development environment with OctoberCMS installed.

When I check the beacon it returns this PHP error:
Parse error: syntax error, unexpected '?' in REDACTED/webroot/bootstrap/beacon.php on line 40

PHP 7.4 with https

Can anyone help please?

@pashasiraja pashasiraja changed the title Beacon not failing with internal server error Beacon failing with internal server error Jan 4, 2022
@daftspunk
Copy link
Member

Hi @pashasiraja

Wishing you a happy new year. Sorry to hear you are having difficulty with this.

Line 40 contains a "null coalescing operator" that was added in PHP 7.0 and onwards. This suggests your server may be running an incompatible version of PHP. Please check with your service provider on how to ensure that the web server uses PHP 7.4, sometimes it can be customized per website.

I hope this helps!

@pashasiraja
Copy link
Author

pashasiraja commented Jan 5, 2022 via email

@daftspunk
Copy link
Member

daftspunk commented Jan 5, 2022

Using this code

<?php

echo $a ?? 'a variable is not defined';

The exact error can be reproduced here using PHP 5.6.29:

Parse error: syntax error, unexpected '?' in [...][...] on line 5

Notice the error does not occur using PHP 7.0.1:

a variable is not defined

This confirms that your server is not using PHP 7.4. Please contact your web host for support with switching the version. There is no module, the syntax error comes directly from the PHP version. I'm sorry we can't be of more assistance.

Best of luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants