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

查看:118
本文介绍了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.

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

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