问题描述
嘿,由于某种原因,当我使用 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 上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)