Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install PHP extension libsodium in Wampserver?

I am trying to install the Libsodium PHP extension using PECL, but I have no idea how to get the dll files needed. I want to use it with Wampserver on Windows 7 (64-bit).

Can any one help me?

like image 222
LearningToCode Avatar asked Oct 08 '15 06:10

LearningToCode


People also ask

Where can I download PHP extensions?

Downloading PECL extensions ¶ » https://pecl.php.net/ The PECL web site contains information about the different extensions that are offered by the PHP Development Team. The information available here includes: ChangeLog, release notes, requirements and other similar details.


2 Answers

Here is How I did it.

  1. Download the libsodium from here > For PHP 7.0, For PHP 5.6 And For PHP 5.5 (All x64). #One Important Note, Please download appropriate x86-32 bit or x64-64 bit of this extension matching of your environment from here
  2. Extract the Downloaded file and copy libsodium.dll to wamp->bin->php->php5(x).x.xx Folder
  3. Copy php_libsodium.dll From the extracted File to wamp->bin->php->php5(x).x.xx ->ext
  4. Now Click on the WAMP System tray icon. enter image description here
  5. Go to PHP-> PHP Settings and Click on the enable dl from the menu of the WampManager from the system tray
  6. Now Add bellow line to php.ini from PHP -> php.ini from the menu of Wampmanager, save and close it

extension=php_libsodium.dll

  1. Now Restart Apache or click Restart All Services from the menu of WampManager

You should now get your php_libsodium in the extensions of the php Up and Running. :)

**I didn't notice that, this question is 4 months old. I hope You have solved this.

like image 190
Asif Kibria Avatar answered Oct 01 '22 18:10

Asif Kibria


use command prompt :
pecl install libsodium

and go to wamp folder find php.ini in php folder :
append this line: to ini file
extension=libsodium.so


You might be able to achieve this result by running php5enmod libsodium, depending on which webserver you use. Make sure you restart your webserver after installing PECL libsodium


here is good references: https://paragonie.com/book/pecl-libsodium/read/00-intro.md#installing-libsodium

like image 37
Mohsen Avatar answered Oct 01 '22 20:10

Mohsen