PHP extensions not found

落花浮王杯 提交于 2020-01-15 04:36:08

问题


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

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.


回答1:


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

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.



来源:https://stackoverflow.com/questions/16122348/php-extensions-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!