Sodium is not loading on XAMPP PHP 7.2(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 上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Sodium 未在 XAMPP PHP 7.2 上加载
基础教程推荐
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
