IcePHP无法打开共享对象文件:第0行的“未知”中没有此类文件或目录

时间:2014-02-03 08:40:45

标签: php apache

我在Apache error_log中收到错误:

[03-Feb-2014 08:28:28 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/IcePHP.so' - libIce.so.35: cannot open shared object file: No such file or directory in Unknown on line 0

运行ldd命令显示:

[/builds/Ice-3.5.0/php]# ldd /usr/local/lib/php/extensions/no-debug-non-zts-20100525/IcePHP.so
    linux-vdso.so.1 =>  (0x00007fff70fff000)
    libIce.so.35 => /opt/Ice-3.5.0/lib64/libIce.so.35 (0x00007fce80322000)
    libSlice.so.35 => /opt/Ice-3.5.0/lib64/libSlice.so.35 (0x00007fce7fea6000)
    libIceUtil.so.35 => /opt/Ice-3.5.0/lib64/libIceUtil.so.35 (0x00007fce7fc2d000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fce7fa04000)
    librt.so.1 => /lib64/librt.so.1 (0x00007fce7f7fb000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fce7f4f5000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fce7f271000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fce7f05a000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fce7ecc6000)
    libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fce7eab5000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fce7e8b0000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003441800000)

有问题的文件上的ls命令返回:

[/builds/Ice-3.5.0/php]#  ls /opt/Ice-3.5.0/lib64/libIce.so.35
/opt/Ice-3.5.0/lib64/libIce.so.35@

我重新启动了apache:service httpd restart

为什么这仍然会返回错误?

1 个答案:

答案 0 :(得分:0)

原来我必须添加PHP.ini include_path的路径:

include_path = ".:/usr/lib/php:/usr/local/lib/php:/opt/Ice-3.5.0/lib"