When i run this command i got error
php bin/magento maintenance:enable
PHP Deprecated: Return type of phpseclib_mcrypt_filter::filter($in, $out, &$consumed, $closing) should either be compatible with php_user_filter::filter($in, $out, &$consumed, bool $closing): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/phpseclib/mcrypt_compat/lib/mcrypt.php on line 1107
PHP Deprecated: Return type of phpseclib_mcrypt_filter::onCreate() should either be compatible with php_user_filter::onCreate(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/phpseclib/mcrypt_compat/lib/mcrypt.php on line 1158
3 Answers 3
mcrypt module is depricated and seems to be enforced from php 8.1
Try below steps-
Check if mcrypt module is there using
php -m
If mcrypt module is listed, disable it in php8.1
Restart php
Verify magento cmd now.
-
I don't have mcrypt module listed. What should I do then? And I am using docker container.Murtaza Bharmal– Murtaza Bharmal2022年11月09日 11:47:56 +00:00Commented Nov 9, 2022 at 11:47
First update the mcrypt module which is compatible with php 8.1
Check Here - https://github.com/phpseclib/mcrypt_compat
add below line above function defination at line 1107
#[\ReturnTypeWillChange]
public function filter($in, $out, &$consumed, $closing)
{
Explore related questions
See similar questions with these tags.
composer update