Support

Admin Tools

#38819 syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
3.10.11
PHP version
7.4.33
Admin Tools version
??

Latest post by nicholas on Tuesday, 04 April 2023 01:51 CDT

NuevaCommunications

I tried using Emergency Offline, then when that didn't work, tried the instructions for doing it manually.

In both cases, front and back end both yield "syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'"

I know I can get the site back online by changing out the htaccess, but I'd like to know how to get the site fully offline, not just the Offline in the the site Global Config

Thanks,

Matt

nicholas
Akeeba Staff
Manager

Multiple PHP versions are usually installed on most servers.

You enable a specific PHP version by using a .htaccess directive, usually an AddHandler or a SetHandler directive.

If this directive is missing from the .htaccess file, the default PHP version of the server will be used.

In most cases, the "default" PHP version is an ancient one, e.g. PHP 5.3 which I suspect is the case with your server.

Putting your site in Emergency Off-line Mode replaces the .htaccess file. The new .htaccess file does not have the AddHandler / SetHandler directive.

Since the default PHP version of your site is too old, it cannot understand the code it sees and throws an error.

You should go to your hosting control panel AFTER enabling the Emergency Off-line Mode and select the PHP version you want to apply.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

NuevaCommunications

Ok, that got rid of the error, thanks!

But now the offline.html file is being ignored -- it just shows the login screen that you get if you put the site offline in the site's Global Config. Is there something else I need to do to get it to show the offline.html page instead?

Thank,

Matt

nicholas
Akeeba Staff
Manager

The offline.html page is not shown to you, i.e. any request coming from the IP address which enabled the Emergency Off-Line Mode.

This is deliberate. It allows you to work on your site's frontend while everyone else sees the offline.html page.

To test that, set your phone to only use cellular data (e.g. 5G) but no Wi-Fi, then try to access your site from your phone. You will see the static HTML page.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!