找不到PHP扩展 [英] PHP extensions not found

查看:257
本文介绍了找不到PHP扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用与5.4.13版本相同的配置在Linux系统上编译了PHP 5.4.14版本.我运行以下PHP -i命令,我得到了:

I have compiled version 5.4.14 of PHP on a linux system using the same configuration I had for a 5.4.13 version. I run the following PHP -i command and I get:

[root@localhost php-5.4.14]# php -i
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/20100525/fileinfo.so' - /usr/lib64/20100525/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/20100525/json.so' - /usr/lib64/20100525/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/20100525/phar.so' - /usr/lib64/20100525/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/20100525/zip.so' - /usr/lib64/20100525/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

现在,我知道JSON现在已成为PHP核心的一部分,并且没有JSON.SO(我对其他假定相同).有谁知道为什么这是一个问题?我的php.ini文件中没有任何extension = XXXX.so行.我正在Centos 6.4下进行编译.

Now I know that JSON is now part of the PHP core and there is no JSON.SO (I assume the same for the others). Is anyone aware of why this is a problem? I do not have any extension=XXXX.so lines in my php.ini file. I am compiling under Centos 6.4.

推荐答案

知道了-添加了目录/etc/php.d.其中包含一堆.ini文件,这些文件已添加到php.ini的处理中.例如,json.ini文件只是说:extension = json.so

Got it -- A directory /etc/php.d was added. This contains a bunch of .ini files which are added to the processing of php.ini. The json.ini file, for example, simply says: extension=json.so

花了太长时间寻找答案之后,我碰巧在php -i输出中发现了一行,指定了附加的.ini目录.希望这可以为某人节省一些时间.

After spending too long looking for the answer, I happened to catch a line in the php -i output specifying the additional .ini directory. Hope this saves someone some time some day.

这篇关于找不到PHP扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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