美文网首页
Centos8 php7 安装php-json扩展

Centos8 php7 安装php-json扩展

作者: RoyalNever_2398 | 来源:发表于2020-11-11 21:33 被阅读0次

前情提要:自己的服务器配置好之后,PHP代码中使用了json_decode(); http报了500错误 排查之后发现php没有安装json扩展,百度了一堆 使用了网上那些错误的编译安装方法json-1.2.1 这个无法在php7中安装。最后找到适合php7的方法 正确方法如下;

1、安装php-json

yum install php-json
image.png

输入y 确定安装

2、查看是否安装成功

cd /usr/lib64/php/modules
php -m 
image.png
image.png

这样就成功了 !

相关文章

网友评论

      本文标题:Centos8 php7 安装php-json扩展

      本文链接:https://www.haomeiwen.com/subject/mxvybktx.html