Magento 1.9.3.10, patch PHP 7.2
Closed this issue · 5 comments
Magento 1.9.3.10 with patch PHP 7.2 in some pages where I use crypt functions I have the following error:
Warning: include(Phpseclib\Crypt\Base.php): failed to open stream: No such file or directory in /var/www/html/vendor/romantomchak/magento-composer-autoload/app/code/community/Varien/Autoload.php on line 185 #0 /var/www/html/vendor/romantomchak/magento-composer-autoload/app/code/community/Varien/Autoload.php(185): mageCoreErrorHandler(2, 'include(Phpsecl...', '/var/www/html/v...', 185, Array) #1 /var/www/html/vendor/romantomchak/magento-composer-autoload/app/code/community/Varien/Autoload.php(185): include() #2 [internal function]: Varien_Autoload->autoload('phpseclib\\Crypt...') #3 /var/www/html/lib/mcrypt_compat/mcrypt.php(272): spl_autoload_call('phpseclib\\Crypt...') #4 /var/www/html/lib/mcrypt_compat/mcrypt.php(1199): phpseclib_mcrypt_module_open('blowfish', '', 'ecb', '') #5 /var/www/html/lib/Varien/Crypt/Mcrypt.php(74): mcrypt_module_open('blowfish', '', 'ecb', '') #6 /var/www/html/app/code/core/Mage/Core/Model/Encryption.php(120): Varien_Crypt_Mcrypt->init('jfdj489ugfjkfgj...') #7 /var/www/html/app/code/core/Mage/Core/Model/Encryption.php(144): Mage_Core_Model_Encryption->_getCrypt() #8 /var/www/html/app/code/core/Mage/Core/Helper/Data.php(243): Mage_Core_Model_Encryption->decrypt('ZkuKJdLSKJSTTZY...') #9 /var/www/html/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php(44): Mage_Core_Helper_Data->decrypt('ZkuKJdLSKJSTTZY...') #10 /var/www/html/app/code/core/Mage/Core/Model/Config/Data.php(78): Mage_Adminhtml_Model_System_Config_Backend_Encrypted->_afterLoad() #11 /var/www/html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(334): Mage_Core_Model_Config_Data->afterLoad() #12 /var/www/html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(229): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element)) #13 /var/www/html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(164): Mage_Adminhtml_Block_System_Config_Form->_initGroup(Object(Varien_Data_Form), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element)) #14 /var/www/html/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php(92): Mage_Adminhtml_Block_System_Config_Form->initForm() #15 /var/www/html/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(107): Mage_Adminhtml_Block_System_Config_Edit->initForm() #16 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction() #17 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit') #18 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #19 /var/www/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch() #20 /var/www/html/app/Mage.php(686): Mage_Core_Model_App->run(Array) #21 /var/www/html/index.php(86): Mage::run('', 'store') #22 {main}
Hi @boesbo,
could you please provide your composer.json file and directory structure?
I need it in order to check and reproduce your issue.
Regards,
{ "repositories":[ { "type":"composer", "url":"http://packages.firegento.com" } ], "require": { "php": "7.2.*", "justinrainbow/json-schema": "~4", "magento-hackathon/magento-composer-installer": "^3.1", "aydin-hassan/magento-core-composer-installer": "~1.5", "firegento/magento": "~1.9", "romantomchak/magento-composer-autoload": "^1.0", "n98/magerun": "~1", "cweagans/composer-patches": "~1", "msp/devtools-m1": "~1", "tecnickcom/tcpdf": "~6.2", "connect20/Cm_RedisSession": "~1", "connect20/Doofinder_Feed": "^1.8", "connect20/Vhaldecode_CookieLaw": "~1", "doofinder/doofinder": "^5.7", "aoepeople/aoe_scheduler": "^1.5", "connect20/Apptrian_Image_Optimizer": "^2.2" }, "minimum-stability": "dev", "prefer-stable": true, "config":{ "preferred-install": "dist", "secure-http":false, "disable-tls": true }, "extra":{ "magento-root-dir":"./", "with-bootstrap-patch": false, "composer-exit-on-patch-failure": true, "magento-force": "override", } }
I just saw this error in our logfiles - any news on this?
first of all sorry for such a long delay.
@boesbo you have a typo in your composer.json, you have comma after last line in extra node "magento-force": "override",
.
This issue appear because these packages phpseclib and mcrypt_compat are not installed by composer, Magento moved these packages directly into lib
directory and that is why composer cannot load these files.
As quick workaround you can try to install these packages by composer:
- phpseclib/phpseclib
- phpseclib/mcrypt_compat
It should fix this issue.
Meanwhile, I will prepare fix which will add possibility to load these packages files from Magento lib directory.
I have released 1.1 version which fix this issue (same fix as it was originally done in Magento core).
A new version is 1.1, but please note that this version is compatible only with Magento 1.9 CE and Magento 1.14 EE, because these packages (phpseclib/phpseclib and phpseclib/mcrypt_compat) were added only in these Magento versions.
Please test it and send me an update.
Regards,