2

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

2
  • Have you found any solution of this problem? Nov 29, 2022 at 12:59
  • run composer update
    – Alex
    Oct 20, 2023 at 8:35

2 Answers 2

1

mcrypt module is depricated and seems to be enforced from php 8.1

Try below steps-

  1. Check if mcrypt module is there using

    php -m

  2. If mcrypt module is listed, disable it in php8.1

  3. Restart php

  4. Verify magento cmd now.

1
  • I don't have mcrypt module listed. What should I do then? And I am using docker container. Nov 9, 2022 at 11:47
0

First update the mcrypt module which is compatible with php 8.1

Check Here - https://github.com/phpseclib/mcrypt_compat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.