• Resolved Kevin Pfeifer

    (@beardcat)


    As the title says i get this warning in the debug.log

    PHP Deprecated: Function mcrypt_create_iv() is deprecated in /www/htdocs/<my-server-folder-structure>/wp-content/plugins/super-socializer/library/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php on line 57

    Would be nice if this could be fixed, because i have all my sites running at least PHP 7.1

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Heateor Support

    (@heateor)

    Sorry about that. This is being generated in the file of Facebook PHP SDK. We will replace the SDK in our plugin with the one compatible with PHP 7, if there is any available in upcoming releases.

    So there is no way to use this plugin with PHP 7.x ? :/

    I get the same error messages.

    • This reply was modified 2 years, 1 month ago by mufffuss.

    @muffuss

    You can use this Plugin with at least PHP 7.1. With PHP 7.2 this function will be removed from PHP and therefore a PHP Error will occur and your site (or the part of the Plugin, which uses this function) wont work any more.

    It just generates a “PHP Deprecation” warning in the debug.log of WordPress, because it uses an outdated function.
    See link here: http://php.net/manual/de/function.mcrypt-create-iv.php

    The Plugin still functions as normal with PHP 7.1, but any future PHP Versions will break your website (or the part of the Plugin, which uses this function) because of the deprecated function.

    But as mentioned from @heateor the part of the programm, which uses this deprecated function, is part of the Facebook SDK, which will be updated in the next release.

    But as of right now, i have the Version 7.11.13 installed and this problem is “still” not resolved.

    But probably the plugin developers cant do anything, because the SDK is provided by Facebook. So if Facebook doesn’t update their SDK to work with PHP 7.2 or higher, there will be more trouble to come.

    OK, new information.

    In the official Facebook PHP SDK Github Repo there is a closed issue with the mcrypt_create_iv() problem.
    See here: https://github.com/facebook/php-graph-sdk/issues/850

    Seems like you should use the “PseudoRandomStringGeneratorFactory” instead of the “McryptPseudoRandomStringGenerator”.

    But this is missing in your Plugins library folder because your current Facebook PHP SDK version is 5.0.0. The most current version on Github is 5.6.1.

    Please check that @muffuss

    Plugin Contributor Heateor Support

    (@heateor)

    The Plugin still functions as normal with PHP 7.1, but any future PHP Versions will break your website (or the part of the Plugin, which uses this function) because of the deprecated function.

    @mufffuss It will not break your website but Facebook login will not work whenever the function mcrypt_create_iv would be called. Are you not able to get it working in any case?
    @beardcat Thanks for the input. We will fix it ASAP.

    Plugin Contributor Heateor Support

    (@heateor)

    We have integrated latest Facebook PHP SDK from the plugin version 7.12. This function is still being used in that SDK itself. We will fix it as soon as there is update available from Facebook.

    As i don’t use your plugin any more i cant tell if it is fixed now.

    I can only tell you that the “PseudoRandomStringGeneratorFactory” has a function to detect which is the best way to “detectDefaultPseudoRandomStringGenerator”. It implements the new “random_bytes” function, which doesn’t generate this warning.

    See here:
    https://github.com/facebook/php-graph-sdk/blob/6d1eb5a3861624cd0ff40c67e517de891d78134a/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorFactory.php

    Plugin Contributor Heateor Support

    (@heateor)

    Okay. Will have a look. Thanks for the feedback 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘mcrypt_create_iv() is deprecated in PHP 7.1’ is closed to new replies.