干预/图像需要FileInfo [英] Intervention/Image requires FileInfo

查看:128
本文介绍了干预/图像需要FileInfo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在干预/图像方面遇到麻烦,Laravel #composer install

Im having trouble with Intervention/image, Laravel #composer install

- intervention/image 2.1.1 requires ext-fileinfo * -> the requested PHP
extension fileinfo is missing from your system.

我知道它正在尝试检索扩展名fileinfo,但是我对加载扩展名感到很幸运.

I understand that it is trying to retrieve the extension fileinfo however I am having 0 luck with getting the extension to load.

我认为,自PHP 5.4起,扩展名fileinfo是自动启用的,但是未显示在#php -m模块中.

I believe that as of PHP 5.4 the extension fileinfo is automatically enabled, however it isnt showing up in #php -m modules.

#pecl install fileinfo都不起作用,因为我的php版本不适合fileinfo的任何版本.

#pecl install fileinfo doesnt work either because my php version doesnt suit any versions of fileinfo.

我的PHP版本是:

PHP 5.4.37 (cli)

操作系统:

Linux
CentOS 6.5 cPanel 11.46 / Softaculous x64


我尝试添加


Ive tried adding

extension = "fileinfo.so"

php.ini ,但是没有运气,它什么也没做.

to the php.ini however to no luck, it does nothing.

注意::我设法使php 5.4的Windows版本扩展正常工作...仅当我将网站上传到服务器时,我才无法加载它,并加载该库( Intervention/Image ).

NOTE: I managed to get the extension for windows version of php 5.4 working... Its just when I have uploaded my website to my server, I have been unable to get it to load, well get that library (Intervention/Image) to load.

其他详细信息:

  • 服务器是 VPS ,可以访问 WHM cPanel
  • 网站正常运行.除了干预/图像以外的所有内容
  • Server is a VPS with access to WHM and cPanel
  • Website works. Everything except the Intervention/Image

推荐答案

我遇到了同样的问题,在寻找解决方案几个小时之后,我遵循了本教程:

I've bumped to the same issue, and after couple of hours of searching for a solution, I've followed this tutorial: https://www.opensource-excellence.com/blog/item/464-how-to-install-fileinfo-in-whm.html, and it works :)

重建Apache之后,将加载fileinfo扩展名,并通过composer成功安装了干预映像包.

After rebuilding Apache, fileinfo extension is loaded, and intervention image package successfully installed via composer.

这篇关于干预/图像需要FileInfo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆