Error updating PHP 7.4 to 8. Problem with plugin or theme?

Running Omeka Classic ver 3.03
We updated our 8 of the 9 Omeka plugins. Could not find a newer “NALLayouts” plugin from the Omeka site. So not sure if that 1 old plugin is the problem?
Regarding Themes, we are using a custom one. Not sure if & how that would need to be updated?
Tried to update PHP from 7.4 to 8 and the site fails to load. Webpage returns message
“Fatal error: Uncaught Error: Call to undefined function…”
It points to /home/site/public_html/site/bootstrap.php on line 126
We are unclear what else is in need of updating in order to allow PHP 8 to be happy.
Does this bootstrap error help determine where the problem is?

Can you post the whole error message? What function it’s talking about and things like that are important details.

Here’s the error msg. (I replaced our sites details with xxxxxxx)

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/xxxxxxx/public_html/xxxxxxx/bootstrap.php:126 Stack trace: #0 /home/xxxxxxx/public_html/xxxxxxx/index.php(11): require_once() #1 {main} thrown in /home/xxxxxxx/public_html/xxxxxxx/bootstrap.php on line 126

There’s an “OMEKA_VERSION” line near the top of bootstrap.php. What version does it list there?

The function you’re talking about hasn’t been present in the bootstrap.php file for many versions, so it sounds like you have a copy of that file from an older version rather than from 3.0.3. This may indicate you missed some files when updating Omeka (at least this one) or that you’ve made custom changes or something like that.

From bootstrap.php file:

// Define the current version of Omeka.
define(‘OMEKA_VERSION’, ‘3.0.3’);

Can you also check, do you have on line 126 of that file, a mention of get_magic_quotes_gpc?

If you check what the 3.0.3 file should look like, get_magic_quotes_gpc appears nowhere in the file, and line 126 is actually a comment.

There is no mention of get_magic_quotes_qpc in our bootstrap.php file. It shows the following for lines 126 and 127:

// Add the libraries and models directories to the include path.
set_include_path(LIB_DIR. PATH_SEPARATOR . MODEL_DIR . PATH_SEPARATOR . get_include_path());

OK, there are then two things to check.

First, make sure the file you’re looking at is the same one as the error log mentions, and there’s not multiple copies sitting in slightly different paths and you’re just looking at the wrong one. This happens more often than you’d think.

Having confirmed that, the only thing that should cause this would be some caching issue with PHP on your server reading the contents of a previous copy of that file. You should be able to restart PHP (or Apache) or otherwise clear its caches to resolve that if that’s the problem you’re having. If you’re on hosting, you might need to check with them on what would need to be done here.