This is a platform to work with different encryption algorithms in PHP
DEPRECATED This function is deprecated in PHP in PHP 7.1.0 and removed in PHP 7.2.0

Enabling mcrypt setting inside PHP.INI

Inside your php.ini file search for the line
Change this line to

Loading the extension

Inside your php extension directory ( where all other extension dll files are stored) your dll file should be there . like this
mcrypt dll file inside extension directory
If it is not there then you have to install the extension. Go to control panel

Control Panel > Programs > Programs and Features
Uninstall or change a program

Select PHP and go for Change
adding mcrypt extension

Checking php installation

We can use phpinfo() function to know the settings of our PHP installation. If mcrypt is available then we will get this while using phpinfo() .
php info on  mcrypt support

For Linux or LAMP

Add the extension by adding this line.
After this you have to restart your web server.

Checking extension status and function

We can use function_exists() to check of mycrypt functions are available or not. Similarly we can check status of extension by using extension_loaded(). Here is a sample code to know the status of mcrypt support in your PHP installation.
echo "<br>mcrypt_create_iv function support is available ";
echo "<br>mcrypt_create_iv function support is NOT available ";

if (extension_loaded('mcrypt')) {
echo "<br>mcrypt support is loaded ";
echo "<br>mcrypt support is NOT loaded ";
The output of above code will tell about the mrypt support in our PHP installation.
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here .

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer