Reputation: 45
I'm having really hard trouble installing libsodium
on my local server (WAMP64).
I used this guide and many others, but still no luck.
I successfully installed PEAR
but I can't use it to install the PHP wrapper of libsodium
. Can someone post a little guide step by step to help me?
I would appreciate help installing Halite
, wich needs libsodium
, because maybe it will be my next step.
Thank you everyone.
Upvotes: 3
Views: 2550
Reputation: 408
check-in PHP module if sodium is available or not with the following command
cmd> php -m cmd> php --ri sodium
if sodium is not listed then go to your /php/php.ini and search for ';extension=sodium' and remove ';' you will be good to go
Upvotes: 0
Reputation: 784
On Windows, download the appropriate zip file for your version of PHP and then follow these three steps. (I used 1.0.6 for PHP 7.0 in my testing).
The bolded part in step 1 is what I was missing. As soon as I placed the dll in that folder and restarted Apache, everything started working.
You can create a new php file with this code to verify it is working properly:
<?php
var_dump([
\Sodium\library_version_major(),
\Sodium\library_version_minor(),
\Sodium\version_string()
]);
Upvotes: 6
Reputation: 31088
Do Not Try To Install Pecl Extensions On Windows With Pear/Pecl. It Will Not Work.
Rather use pre-compiled .dll file.
The guide page even says so:
Installing Libsodium and the PHP Extension on Windows
On Windows, download the appropriate zip file for your version of PHP and then follow these three steps.
Upvotes: 1