I'm developing a new Backdrop site to replace a Drupal 7 site (steampunk-explorer.com). I've been developing the new site on the staging server at the subdomain backdrop.steampunk-explorer.com.
I just updated a bunch of Backdrop modules through the admin interface, and now I'm locked out. They seemed to download and update without any problem, but when I tried to go to the home page, I was redirected to the maintenance page with the error message "syntax error, unexpected '|', expecting variable (T_VARIABLE)"
I can access the admin tools on the main site (steampunk-explorer.com), but not the Backdrop site.
I have full FTP access to both sites, but can't do anything in Backdrop through the admin tools.
Can somebody help?
Comments
In case it helps, these are the modules that were updated prior to when I was locked out. I looked in the modules folder via FTP and they all have the same time stamp. Is there PHP code in one of these modules that's generating the error message and locking me out?
adaptive_image
antiscan
backup_migrate
captcha
entity_plus
fast_token_browser
feeds
imce
ip_blocking
node_clone
paragraphs
paragraphs_jquery_ui_accordion
smart_menu
token_filter
views_accordion
views_bulk_operations
views_slideshow
webform
xmlsitemap
This sounds like a combination of a buggy module and the "wrong" version of PHP. The fact that you are being redirected to the maintenance page may be an indication that your site was put on maintenance mode to run the update script and failed doing so.
Check the PHP versions of both your development and your production environments. Be sure they match. Some contrib will not work in php 7.2 or lower, and some will not on PHP 8.1 or higher. If they are the same version, then perhaps try to move your dev site again to production (export and import the database, copy the modules folder and the file folder to your server).
Hi argiepiano,
Is there a way to find out which is the optimal PHP version for a given module.
I have a site with Ubercart, which when switching to PHP 8.2 causes problems, so I maintain PHP 7.4 for this hosting account.
I assume that at some point the code will be optimized for PHP 8.2 as well, but how could that be known from the documentation or the module web page itself.
From what was written in your post, the idea comes to me to try with 8.1 or 8.0.
The best you can do is test and report. If you find a contrib that doesn't work in php 8.3, create an issue in its queue so it gets fixed.
In my experience, I've found that 7.4 is safest, but unfortunately it's now being removed by many shared hosting providers. However, all my sites are now working on php 8.1 without any issues. Core should work on 8.3 fine, as do most contrib modules.
Thank you very much. I will follow your advice.