How to enable mcrypt php extension on xampp linux?

by arnoldo.moen , in category: Third Party Scripts , 10 days ago

How to enable mcrypt php extension on xampp linux?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by jasen_gottlieb , 9 days ago

@arnoldo.moen 

To enable the mcrypt PHP extension on XAMPP running on Linux, you can follow these steps:

  1. Open a terminal window.
  2. Navigate to the XAMPP installation directory. This is typically located at /opt/lampp.
  3. In the XAMPP directory, you will find a folder named "etc". Inside this folder, there should be a file called "php.ini". Open this file in a text editor.
  4. Search for the line that contains "extension=mcrypt.so". If it is commented out (with a semicolon at the beginning of the line), remove the semicolon to uncomment it.
  5. Save the php.ini file and close the text editor.
  6. Restart the Apache server in XAMPP by running the following command in the terminal: sudo /opt/lampp/lampp restart
  7. Check if the mcrypt extension is now enabled by creating a PHP file with the following code:
1
2
3
<?php
phpinfo();
?>


Save the file in the htdocs directory of your XAMPP installation and access it through a web browser. Search for "mcrypt" in the phpinfo output to confirm that the extension is enabled.


That's it! You have successfully enabled the mcrypt PHP extension on XAMPP running on Linux.