apache2拒绝加载自建的php 5.2.8模块

时间:2017-03-15 13:07:20

标签: php apache

我需要将某些内容下载到php 5并尝试构建php 5.2.8并用它替换正常的php7.0。 但是,当我启动apache2时,我收到以下错误消息:

apache2: Syntax error on line 147 of /etc/apache2/apache2.conf: 
Syntax error on line 7 of /etc/apache2/mods-enabled/php5.conf: 
    Cannot load /usr/lib/apache2/modules/libphp5.so into server: 
    /usr/lib/apache2/modules/libphp5.so: 
    undefined symbol: php_ini_scanned_path`

当我查看导出的符号时,php_ini_scanned_pa​​th看起来不行:

root@host:~/Downloads/php-5.2.8# readelf -s libs/libphp5.so | grep php_ini
    76: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_ini_scanned_path
    86: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_ini_scanned_files
   182: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_ini_opened_path
   250: 0000000000214cf8     8 OBJECT  GLOBAL DEFAULT   25 apache2_php_ini_path_over
   293: 000000000000b930    82 FUNC    GLOBAL DEFAULT   12 zif_php_ini_loaded_file
   297: 000000000000b920    12 FUNC    GLOBAL DEFAULT   12 zif_php_ini_scanned_files
   196: 0000000000214cf8     8 OBJECT  GLOBAL DEFAULT   25 apache2_php_ini_path_over
   210: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_ini_scanned_path
   222: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_ini_scanned_files
   336: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_ini_opened_path
   340: 000000000000b930    82 FUNC    GLOBAL DEFAULT   12 zif_php_ini_loaded_file
   365: 000000000000b920    12 FUNC    GLOBAL DEFAULT   12 zif_php_ini_scanned_files

我用

构建了模块
./configure --with-apxs2 --prefix=/usr/lib/apache2/php
make

有人可以帮助我找到导致此问题的不兼容性吗? 操作系统是kali 2.0。

0 个答案:

没有答案