Fatal error: Uncaught Error: Class 'Zend_Controller_Request_Http' not found in /storage/websites/agricomnew/app/code/local/Amasty/Fpc/Model/Fpc/Front.php:103 Stack trace: #0 /storage/websites/agricomnew/app/code/core/Mage/Core/Model/Cache.php(703): Amasty_Fpc_Model_Fpc_Front->__construct() #1 /storage/websites/agricomnew/app/code/core/Mage/Core/Model/Cache.php(685): Mage_Core_Model_Cache->_getProcessor('Amasty_Fpc_Mode...') #2 /storage/websites/agricomnew/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Cache->processRequest() #3 /storage/websites/agricomnew/app/Mage.php(686): Mage_Core_Model_App->run(Array) #4 /storage/websites/agricomnew/index.php(86): Mage::run('', 'store') #5 {main} thrown in /storage/websites/agricomnew/app/code/local/Amasty/Fpc/Model/Fpc/Front.php on line 103
Have no clue on where to check and seeking some advice.
Thanks!
You have some sort of Amasty full page cache module installed that is throwing that error.
Hello @fabrizioma65d5,
The Zend Framework, which is now outdated and not supported in newer PHP versions. As you've upgraded to Debian 12, it's possible you're now using a PHP version that no longer supports Zend, causing the error: Class 'Zend_Controller_Request_Http' not found.
The Laminas equivalent of Zend_Controller_Request_Http is Laminas\Http\Request. This is part of the Laminas framework, which is the successor to the Zend Framework. Here's how you can map Zend components to Laminas:
Replacement Overview
Code Replacement Example
If you're migrating code from Zend to Laminas, you'll need to replace instances of Zend_Controller_Request_Http with Laminas\Http\Request.
Here's an example of what the code replacement might look like:
Before (Zend):
$request = new Zend_Controller_Request_Http(); $method = $request->getMethod();
After (Laminas):
use Laminas\Http\Request;
$request = new Request(); $method = $request->getMethod();
Namespaces and Changes
If laminas package is not installed for this you can installed it with:
composer require laminas/laminas-http
After this, your Magento code should work with Laminas in place of Zend for HTTP requests.
If the issue will be resolved, Click Kudos & Accept as a Solution.
"That error typically occurs if the Zend Framework isn’t installed or properly configured in your Magento setup. Double-check your dependencies and ensure Zend Framework is correctly included. On a side note, if you're looking for a break from debugging, explore the menu pedros full chicken price for a tasty treat!"