- Форум
- Re: Fileinfo PHP extension как установить
- Re: Fileinfo PHP extension как установить
- fileinfo.dll missing despite being un-commented in php.ini
- требует ext-fileinfo. Как добавить это в мой файл composer.json?
- wget http://pecl.php.net/get/Fileinfo-1.0.4.tgz
- tar -zxf Fileinfo-1.0.4.tgz
- cd Fileinfo-1.0.4
- phpize
- ./configure
- делать
- сделать установку
- перезагрузка службы httpd
- php -i | grep fileinfo
- pecl install fileinfo
- Шаг 1. Создайте файл конфигурации PHP (phprc)
- Шаг 2: отредактируйте phprc чтобы включить расширение
- Шаг 3: Перезапустите PHP и / или ваш веб-сервер.
- How to Enable PHP Fileinfo Extensions?
- How to enable PHP FileInfo Extension?
- How to enable PHP FileInfo extension in cPanel?
- How to enable PHP FileInfo extension XAMPP?
Форум
Your requirements could not be resolved to an installable set of packages.
Problem 1
— league/flysystem 1.1.9 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP’s fileinfo extension.
— laravel/framework v8.83.19 requires league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.9].
— laravel/framework is locked to version v8.83.19 and an update of this package was not requested.
To enable extensions, verify that they are enabled in your .ini files:
— C:\PHP\php.ini
You can also run `php —ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `—ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. «composer require tcg/voyager:*» to figure out if any version is installable, or «composer require tcg/voyager:^2.1» if you know which you need.
Re: Fileinfo PHP extension как установить
Не воспроизводится. Что модуль league/flysystem:1.1.9, что laravel/framework:8.83.19 ставятся безо всяких проблем. Composer запускаете из консоли OpenServer? Версия PHP какая? Версия OpenServer?
Re: Fileinfo PHP extension как установить
У меня точно такая же ситуация. При чём интересно, что вчера такой ошибки не было.
Версия OpenServer 5.4.3. Включена версия PHP 8.1.9 и Laravel 9.50.2.
Да ещё интересно, что при команде в консоли OpenServer-a
fileinfo.dll missing despite being un-commented in php.ini
I’m learning laravel and trying to install laravel collective. Using Xampp, PHP 7.3.4, Laravel 5.8.14. I get the following issue in GitBash when trying to do so: Your requirements could not be resolved to an installable set of packages.
Problem 1 - league/flysystem 1.0.51 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system. - league/flysystem 1.0.51 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system. - league/flysystem 1.0.51 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system. - Installation request for league/flysystem (locked at 1.0.51) -> satisfiable by league/flysystem[1.0.51]. To enable extensions, verify that they are enabled in your .ini files: - C:\Program Files (x86)\iis express\PHP\v7.1\php.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
in my php.ini file the extension=php_fileinfo.dll line is not commented, I’m editing the xampp/htdocs/php/php.ini file which is right according to phpinfo() but the above would seem to indicate the php.ini file on my machine.
php --ini produces the following: Configuration File (php.ini) Path: C:\windows Loaded Configuration File: C:\Program Files (x86)\iis express\PHP\v7.1\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)
требует ext-fileinfo. Как добавить это в мой файл composer.json?
Вам необходимо установить & включить расширение FileInfo PHP, которое устанавливается по умолчанию, начиная с PHP 5.3.0. Версии до 5.3+ могут использовать прерванное расширение PECL .
Чтобы включить расширение FileInfo, вам нужно отредактировать php.ini и изменить одну строку.
Чтобы узнать, где находится ваш php.ini, вы можете запустить следующую команду с терминала:
и найдите « Загруженный файл конфигурации ».
Обратите внимание : PHP CLI может загружать другой файл php.ini, чем в Интернете, поэтому не полагайтесь на путь, указанный в phpinfo() . Выполните команду, указанную выше в терминале, чтобы узнать файл, загруженный PHP CLI.
Нам не нужно ничего делать в composer.json
Включить расширение fileinfo в php.ini
extension= php_fileinfo.dll
1) Загрузите и разблокируйте пакет
wget http://pecl.php.net/get/Fileinfo-1.0.4.tgz
tar -zxf Fileinfo-1.0.4.tgz
cd Fileinfo-1.0.4
2) Создайте расширение для компиляции
phpize
./configure
4) сгенерировать установочные файлы и установить их
делать
сделать установку
5) Теперь расширение будет доступно в каталоге / usr / lib64 / php / modules. Теперь вам нужно добавить расширение где-нибудь в файле конфигурации php. Измените /etc/php.ini и добавьте следующее: extension = fileinfo.so 6) Сохраните файл и перезапустите веб-сервер
перезагрузка службы httpd
Чтобы проверить, что модуль fileinfo включен правильно, выполните:
php -i | grep fileinfo
поддержка fileinfo => включена
Просто FYI, модуль также может быть установлен с помощью команды PECL, т.е.
pecl install fileinfo
После этого просто выполните шаги 5 и 6, упомянутые выше, чтобы включить его. Вот и все.
Если кто-то еще находится на DreamHost (например, я) или обнаруживает, что исправления php.ini не делают то, что вы хотите, вы можете попробовать другой маршрут.
Вот страница Wiki DreamHost на PHP.ini , но я также перечислим приведенные ниже шаги.
Шаг 1. Создайте файл конфигурации PHP (phprc)
- В домашней папке вашего пользователя ( /home/your_user_name ) создайте новую папку под названием .php (обратите внимание на /home/your_user_name период)
- Внутри этой новой папки создайте другую папку на основе используемой вами версии PHP . Вы можете найти это (и изменить его) на панели хостинга (DreamHost находится на панели.dreamhost.com в разделе «Домены»> «Управление доменами»). Поэтому, если вы используете PHP версии 5.6, создайте папку под названием 5.6 .
- В этой новой папке создайте новый файл phprc (без расширения). Если в этой папке уже есть файл phprc , вы можете создать резервную копию, изменив имя файла на phprc.old .
Шаг 2: отредактируйте phprc чтобы включить расширение
- Откройте новый файл phprc .
- Добавьте эту строку в конец: extension = fileinfo.so
- Сохранить файл
Шаг 3: Перезапустите PHP и / или ваш веб-сервер.
Если у вас есть общий хостинг или вам не нравится SSH или командная строка, вы можете заставить DreamHost забрать ваши новые настройки phprc .
- Перейдите к панели и перейдите в раздел Домены> Управление доменами.
- Нажмите « Edit рядом с доменом, над которым вы работаете.
- Не вносите никаких изменений здесь. Просто прокрутите вниз и нажмите в нижней части первой секции.
- В течение примерно 10 минут DreamHost потянет ваши изменения.
- Если вы не видите обновления через 10 минут (будьте терпеливы!), Обратитесь за помощью в службу поддержки.
Если вам удобно использовать командную строку (и вы не используете общий хостинг), SSH на свой сервер и выполните следующие команды:
sudo /etc/init.d/httpd2 restart
sudo /etc/init.d/nginx stop pkill -9 php sudo /etc/init.d/nginx start
Ваши конкретные команды могут немного отличаться, но если вам удобно с CLI, вы, вероятно, знаете свою конкретную команду.
Щелкните левой кнопкой мыши значок в трее -> PHP -> Расширение PHP -> php_fileinfo
Он перезапустит ваш сервер, и все будет готово.
Если это не сработает, попробуйте отредактировать php.ini внутри: C:\wamp\bin\php\php5.4.12 (последняя часть зависит от вашей версии php)
Найдите строку ;extension=php_fileinfo.dll и удалите ;
Сохраните и перезапустите службы WAMP.
- Youtube PHP APi Check VIdeo дублируется или нет
- Двойной не (!!) оператор в PHP
- Можем ли мы установить «allow_url_fopen» «ON» с помощью функции ini_set () в php
- Android: отправка файла на сервер: PHP получает этот файл на сервере
- Как добавить несколько значений в один параметр в форме html?
- Проблемы с отображением японских символов с использованием PHP и MySQL
- php – один час раньше, чем с датой
- Как преобразовать SOAP-ответ в PHP-массив?
- Разница между возвращаемым значением выражения PHP и переменной
- Пользовательская страница 404 – PHP
- одиночная цитата внутри двойной цитаты в php
- Является ли XMLReader синтаксическим анализатором SAX, парсером DOM или нет?
- PHP Web Application (Magento) взломан; Что делает этот код хакера?
- Зачем вызывать mb_convert_encoding для дезинфекции текста?
- Какие инструменты и расширения являются критическими для разработки Magento?
How to Enable PHP Fileinfo Extensions?
The FileInfo PHP file is a small, open source library that provides a set of functions and objects to deal with file information. It is often used with WordPress CMS in order to manage various types of file types, such as audio, video, images, documents, and other file types.
FileInfo allows WordPress CMS to recognize many common file types, and it can help accurately identify the type of a file. This is useful for websites that often require images, audio, video, or other types of files to be uploaded.
The FileInfo library can be installed with the command line, the installer, and most PHP distributions, including those used by WordPress CMS.
How to enable PHP FileInfo Extension?
Below we will talk about PHP 8, but it can be applied to PHP 7.xx.
So, to enable the PHP Fileinfo extension on WordPress when using PHP 8, you will need to follow these steps:
1. Open your WordPress site’s wp-config.php file in a text editor.
2. Add the following line of code to the file, just above the line that says /* That’s all, stop editing! Happy publishing. */:
// Enable PHP Fileinfo extension if (PHP_MAJOR_VERSION >= 8)
3. Save the wp-config.php file and upload it to your web server.
4. Restart your web server for the changes to take effect.
After following these steps, the PHP Fileinfo extension should be enabled on your WordPress site when using PHP 8.
How to enable PHP FileInfo extension in cPanel?
To enable the PHP Fileinfo extension in cPanel, you will need to follow these steps:
- Log in to your cPanel account.
- In the “Software” section, click on the “Select PHP Version” icon.
- In the “PHP Extensions” section, select the “Fileinfo” extension from the list and click on the “Save” button.
- The Fileinfo extension should now be enabled on your server.
- If you have any PHP scripts that require the Fileinfo extension, you may need to restart your web server for the changes to take effect.
After following these steps, the PHP Fileinfo extension should be enabled on your server and available to your PHP scripts.
How to enable PHP FileInfo extension XAMPP?
To enable the PHP Fileinfo extension on XAMPP, you will need to follow these steps:
- Open the XAMPP Control Panel on your computer.
- Click on the “Config” button next to the Apache row, and then select the “PHP (php.ini)” option.
- In the PHP configuration file that opens, search for the following line:
After following these steps, the PHP Fileinfo extension should be enabled on your XAMPP installation and available to your PHP scripts.