php - 启用文件信息扩展

标签 php centos

它在 Centos 7 上,PHP 5.5.38

我以为文件信息是默认启用的,但 phpinfo() 显示如下:

'./configure' **'--disable-fileinfo'** '--disable-opcache' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'

那么如何启用这个文件信息呢?

当前的扩展文件夹没有 fileinfo.so,所以我不知道现在需要做什么才能启用它。

最佳答案

这解决了我的问题,使用 WHM/Cpanel 重新编译 Apache 和 PHP

https://www.opensource-excellence.com/blog/item/464-how-to-install-fileinfo-in-whm.html

关于php - 启用文件信息扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39136256/

相关文章:

php - Laravel 数据库查询

php - 如何将php的uuid v4转换为两个64位整数

centos - 当我启动asterisk 1.8.22时出现非法指令错误

docker - 为什么 Docker CentOS 容器运行 'echo $USER' 什么也没显示?

java - 在 64 位 CENTOS 上安装 32 位 Java : error java/lang/Object

centos - Vagrant + Virtualbox 自定义框 : NAT adapter getting ipv6 address instead of ipv4

php - 如何在不使用自动加载的情况下使用 PHPMailer 创建邮件功能

php - 将大型 XML 文件从 url 加载到 MySQL 中

php - 如何在 Yii 1.6 管理 View 中获取基于外键的名称?

linux - Bigtop (centos) 中缺少 hadoop 包 - 安装问题