Sodium 未在 XAMPP PHP 7.2 上加载 [英] Sodium is not loading on XAMPP PHP 7.2

查看:34
本文介绍了Sodium 未在 XAMPP PHP 7.2 上加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,由于某种原因,当我使用 XAMPP PHP 7.2 时,所有的钠函数都不起作用.当我运行 print_r(get_loaded_extensions()); 它不会在列表中显示钠.当我去 http://php.net/manual/en/sodium.installation.php 它说不需要安装它们是核心的一部分.所以我去了我的 php.ini 配置文件并确保它没有禁用钠,它说 extension=php_sodium.dll.我去控制台仔细检查他们是否有任何错误,没有.这很奇怪,因为 Argon2i 工作正常.Argon2i 常量都已定义,当在 password_hash() 函数中使用时,它会生成密码哈希没有问题.我使用 Windows 作为我的操作系统.还有什么可能导致这样的事情,任何帮助都会很好.提前致谢.

Hey for some reason when i use XAMPP PHP 7.2, all of the sodium functions are not working. When i run print_r(get_loaded_extensions()); it does not show sodium on the list. When i go to http://php.net/manual/en/sodium.installation.php it says no installation needed they are a part of the core. So i went to my php.ini configuration file and made sure that it did not disable sodium, it says extension=php_sodium.dll. I went to the console to double check to see if their were any errors, there was none. It was weird because Argon2i is working fine. The Argon2i constants are all defined and when used in the password_hash() function it generates a password hash no problem. I am using windows as my OS. Is there anything else that can cause something like this, any help would be nice. Thanks in advance.

推荐答案

你确定你编辑了正确的 php.ini 吗?

Are you sure that you edit the correct php.ini?

从 PHP 7.2 开始,ini 文件(至少在我的 Windows PC 上),加载扩展的语法现在是 extension=modulename 而不是 extension=php_modulename.dll.

Starting with PHP 7.2, ini file (at least on my Windows PC), the syntax to load extension is now extension=modulename instead of extension=php_modulename.dll.

这篇关于Sodium 未在 XAMPP PHP 7.2 上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆