I am trying to install intervention/image. After running the composer update, I get:
We dont need to do anything in composer.json
Windows
Enable fileinfo extension in php.ini
extension= php_fileinfo.dll
In Linux
1) Download and untar the package
2) Generate the extension for compiling
3) Configure the module
4) generate the install files and install it
5) Now the extension will be available under the /usr/lib64/php/modules directory. You now need to add the extension somewhere in the php configuration file. Edit /etc/php.ini and add the following: extension=fileinfo.so 6) Save the file and restart the webserver
To verify fileinfo module is enabled properly, execute:
fileinfo support => enabled
Alternate method
Just an FYI, the module can also be installed using the PECL command i.e.
Once done, just follow steps 5 and 6 mentioned above to enable it. That’s it.
Nothing to do with your composer.json.
You need to install & enable FileInfo PHP extension, which is installed by default starting with PHP 5.3.0. Versions prior to 5.3+ may use the discontinued PECL extension.
To enable FileInfo extension, you need to edit your php.ini and change a single line.
Locate the line:
;extension=php_fileinfo.dll
Remove the starting comment:
extension=php_fileinfo.dll
To find out where your php.ini is located, you can run the following command from a terminal:
$ php --ini
and search for "Loaded Configuration File".
Please note that the PHP CLI can load a different php.ini file than the web, so don't rely on the path provided in phpinfo()
. Run the command specified above in a terminal to find out the file loaded by PHP CLI.
For people with WAMP
Left click the tray icon -> PHP -> PHP extension -> php_fileinfo
It will restart your server and you're done.
If that does not work, try editing the php.ini inside:
C:\wamp\bin\php\php5.4.12
(last part depends on your version of php)
Look for the line: ;extension=php_fileinfo.dll
and remove the ;
Save and restart WAMP services.
If anyone else is on DreamHost (like me) or finds that the php.ini edits don't do what you want, you can try another route.
Here's the DreamHost Wiki page on PHP.ini, but I'll list the steps below as well.
/home/your_user_name
), create a new folder called .php
(notice the leading period)5.6
.phprc
(no extension). If there's already a phprc
file in this folder, you can back it up by changing the filename to phprc.old
.phprc
to include the extensionphprc
file.extension = fileinfo.so
If you have shared hosting, or you aren't comfortable with SSH or the command line, you can force DreamHost to pick up your new phprc
settings.
Edit
next to the domain you're working on.If you're comfortable with the command line (and you're not using shared hosting), SSH into your server and run the following commands:
For Apache web serverssudo /etc/init.d/httpd2 restart
For Nginx web servers
sudo /etc/init.d/nginx stop
pkill -9 php
sudo /etc/init.d/nginx start
Your specific commands may be slightly different, but if you're comfortable with CLI then you probably know your specific command.