I am trying to install spatie/media-library on a Laravel project on codespace.
it works on my local machine but in codespace, it says ext-exif not found.
how can I install it on codespace?
I have instantiated a codespace using the default image
{"image":"mcr.microsoft.com/devcontainers/universal:2"}
the image does not contain the php ext-exif.
I have tried to enable the extension from php.ini. it says exif.so not found in extension directories.
Related
My macbook with MacOS Ventura (13.2) just upgraded to PHP 8.2.2 trough Brew but now i'm having problems because php ext-oauth is not active.
When I run composer install in my (Symfony) project I get this message:
Problem 1
- Root composer.json requires PHP extension ext-oauth * but it is missing from your system. Install or enable PHP's oauth extension.
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/8.2/php.ini
- /usr/local/etc/php/8.2/conf.d/ext-opcache.ini
You can also run php --ini` in a terminal to see which files are used by PHP in CLI mode.
I've googled and tried:
adding it to the current php.ini file
sudo pecl install oauth
(returns the message "pecl/oauth is already installed and is the same
as the released version 2.0.7")
I've even copied the previous oauth.so file to the current php directory.
php -m doesn't return the oauth extension in the list
Any ideas, how to fix this?
I've got running again by do these steps:
open terminal
sudo pecl uninstall oauth
sudo pecl install oauth
i'm using php 8.1.4, laravel v9, xampp v3.3.0
in php.ini file i've changed ;extension=gd to extension=gd, but it still show the same error
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.
I understand that it is trying to retrieve the extension fileinfo however I am having 0 luck with getting the extension to load.
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 doesnt work either because my php version doesnt suit any versions of fileinfo.
My PHP version is:
PHP 5.4.37 (cli)
Operating System:
Linux
CentOS 6.5 cPanel 11.46 / Softaculous x64
Ive tried adding
extension = "fileinfo.so"
to the php.ini however to no luck, it does nothing.
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.
Other details:
Server is a VPS with access to WHM and cPanel
Website works. Everything except the Intervention/Image
go to 'Select PHP version ' under Software section in your cPanel. Then check fileinfo checkbox. Then save. That's it.
To fix this issue, you just have to enable your fileinfo from your php configuration.
To do so :
Go to php.ini in your php install folder ( for me since I used bitnami on windows, it is located at C:\Bitnami\wappstack-5.6.31-0\php )
Uncomment the line ;extension=php_fileinfo.dll by removing the semicolon. ( on linux you should have extension=php_fileinfo.so )
Restart php ( use the command line on unix, or on windows through the manager of the soft you use, for instance if you have bitnami it's in C:\Bitnami\wappstack-5.6.31-0 and the exe you have to use is manager-windows.exe then click on php and restart ).
This is it.
I try to install the sandbox but I get the following error from composer:
Loading composer repositories with package information Installing
dependencies from lock file Your requirements could not be resolved to
an installable set of packages.
Problem 1
- Installation request for sonata-project/intl-bundle 2.1.0 -> satisfiable by sonata-project/intl-bundle 2.1.0.`
- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
Problem 2
- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
- sonata-project/news-bundle 2.1.x-dev requires sonata-project/intl-bundle 2.1.* -> satisfiable by sonata-project/intl-bundle 2.1.0.
- Installation request for sonata-project/news-bundle 2.1.
I had the same problem while I was installing new Magento 2.0, after different hit and trials, I manged to solve it by following these steps:
I copied all icu* files from php directory to Appache directory, and it worked.
Php direcotry:
WAMP\bin\php\php5.5.12
Appache Directory:
WAMP\bin\apache\apache2.4.9
Make sure to un-comment following line in php.ini file:
extension=ext/php_intl.dll
Linux user
yum install php-intl
Like #Hugehornet pointed out - you should enable this extension in php.ini by uncommenting this line: extension=ext/php_intl.dll
If you use wamp's interface for this task you are actually updating the php.ini file located in apache's directory.
Example: C:\wamp\bin\apache\Apache2.4.4\bin\php.ini
Composer is using the one located in the php's installation directory.
Example: C:\wamp\bin\php\php5.4.12\php.ini
You should manually edit the latter and restart the wamp server.
You need to enable the intl extension in php just as the error says.
In your php.ini file, uncomment the line extension=ext/php_intl.dll or something like this.
Edit : note that if you are using wamp or something like this, you should be aware of the fact that the php.ini file in the wamp config is not necessarily the one used by composer.
First of all be sure that your server is isung x86 build (intl not working with x64), then:
activate intl extension in php.ini directly
copy all icu*.dll form php directory to apache directory
make sure your console using the same php folder you just configured
source.
In my windows system I have two php.ini files at the flowing paths:
C:\wamp\bin\php\phpx.y.z
C:\wamp\bin\apache\Apachex.y.z\bin
I don't know which one is in your path. Just make sure to add the extension in both of them to eliminate any doubt.
I am on a Mac OS X Yosemite, and I fix this error
the requested PHP extension mcrypt is missing from your system
by running the following commands :
brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
If intl has already been enabled and it doesn't works, add your PHP directory in the Path environment variable, then restart your server.
(for example C:\Program Files\wamp\bin\php\phpX.XXX.XXX for wamp)
It has worked for me!
On Ubuntu, Debian, and related Linux distributions
sudo apt-get install php-intl
to install the extension for the default PHP version.
For other versions a variation like apt-get install php7.3-intl will choose the correct extension if the version provided is correct.
I have a wamp server. I also have mongodb installed. I have installed the php_mongo extension, make changes in php.ini. I downloaded rockmongo, unzipped the file in my www folder. I edited the config file but when I try to open the GUI, it says:
"To make things right, you must install php_mongo module. Here for installation documents on PHP.net."
Need help. thanks
Hi I also had the same problem. I just solved it by following these steps.
Just install the mongodb Driver extension via sudo pecl install mongo
After installation check mongodb Driver is found or not via sudo pecl search mongo
If it is installed successfully following output will come
ubuntu#ip-***-3*-*-**:~$ sudo pecl search mongo
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo 1.4.2 (stable) 1.4.2 MongoDB database driver
change php.ini located under /etc/php5/apache2
Add this line under Dynamic Extension of php.ini extension=mongo.so save the file
Now restart your server via sudo service apache2 restart
It will work
Quite old post, but for those who still find for a solution like me.
It's solved by:
- php_mongo-1.4.5-5.3-vc9.dll
- WampServer 2.2
- PHP 5.3.18
Windows 7, 64 bit.
PHP_Mongo here (https://s3.amazonaws.com/drivers.mongodb.org/php/php_mongo-1.4.5.zip)