Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从源代码安装时,PHP扩展在哪里?_Php_Linux - Fatal编程技术网

从源代码安装时,PHP扩展在哪里?

从源代码安装时,PHP扩展在哪里?,php,linux,Php,Linux,当我尝试运行PHP脚本时,会出现以下错误: Warning: PHP Startup: Unable to load dynamic library '/home/user/php-5.4.28/installdir/include/php/ext/php_bz2.so' - /home/user/php-5.4.28/installdir/include/php/ext/php_bz2.so: cannot open shared object file: No such file or di

当我尝试运行PHP脚本时,会出现以下错误:

Warning: PHP Startup: Unable to load dynamic library '/home/user/php-5.4.28/installdir/include/php/ext/php_bz2.so' - /home/user/php-5.4.28/installdir/include/php/ext/php_bz2.so: cannot open shared object file: No such file or directory in Unknown on line 0
php.ini:

extension_dir = "/home/user/php-5.4.28/installdir/include/php/ext"
扩展目录路径上的内容:

~/php-5.4.28/installdir/include/php/ext$ ls
date  ereg    gd    iconv  libxml    mysqli   pcre  session  sqlite3   xml
dom   filter  hash  json   mbstring  mysqlnd  pdo   spl      standard
分机在哪里? 我已经从源代码安装了PHP。
所有错误和phpinfo()都可以看到

您不必找到扩展名。您必须重新编译PHP,将选项
--with-bz2
传递到
/configure
脚本。默认情况下,Bzip2支持未如所述启用

请记住,为了使用此扩展编译PHP,您需要开发头和/或库。如果缺少
/configure
,则无法说出缺少的内容。如果发生这种情况,只需使用您的软件包管理器(apt、yum或zypper-distro-dependent)安装所需的软件包,然后重试

您的PHP应用程序也可能正在使用其他扩展。程序完全相同。您只需添加更多选项。假设还需要旋度,那么:

./configure --with-bz2 --with-curl
将工作-再次需要更多的标题和包


请记住,在覆盖以前编译的结果时,始终使用您需要的所有选项。

我知道这一点,因此我的配置代码包含了我需要的扩展。但我仍然得到问题中提到的错误。我有:./configure--prefix=$PWD/installdir--enable-bcmath--mysql--zlib--enable-calendar--curl--enable-ftp--gd--enable-exif--enable-mbstring--mysqli--pdo-mysqli--pdo-mysqli,但正如我所说,你没有
--with-bz2
./configure --with-bz2 --with-curl