I am trying to install Lumen but i am getting the next error:
My OS is Ubuntu 21.10
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/phpunit[9.5.10, ..., 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
- Root composer.json requires phpunit/phpunit ^9.5.10 -> satisfiable by phpunit/phpunit[9.5.10, ..., 9.5.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/8.1/cli/php.ini
- /etc/php/8.1/cli/conf.d/10-opcache.ini
- /etc/php/8.1/cli/conf.d/10-pdo.ini
- /etc/php/8.1/cli/conf.d/20-calendar.ini
- /etc/php/8.1/cli/conf.d/20-ctype.ini
- /etc/php/8.1/cli/conf.d/20-exif.ini
- /etc/php/8.1/cli/conf.d/20-ffi.ini
- /etc/php/8.1/cli/conf.d/20-fileinfo.ini
- /etc/php/8.1/cli/conf.d/20-ftp.ini
- /etc/php/8.1/cli/conf.d/20-gettext.ini
- /etc/php/8.1/cli/conf.d/20-iconv.ini
- /etc/php/8.1/cli/conf.d/20-intl.ini
- /etc/php/8.1/cli/conf.d/20-mbstring.ini
- /etc/php/8.1/cli/conf.d/20-phar.ini
- /etc/php/8.1/cli/conf.d/20-posix.ini
- /etc/php/8.1/cli/conf.d/20-readline.ini
- /etc/php/8.1/cli/conf.d/20-shmop.ini
- /etc/php/8.1/cli/conf.d/20-sockets.ini
- /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/8.1/cli/conf.d/20-sysvsem.ini
- /etc/php/8.1/cli/conf.d/20-sysvshm.ini
- /etc/php/8.1/cli/conf.d/20-tokenizer.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-dom` to temporarily ignore these required extensions.
Already tried to install php-xml but didnt worked
Related
After running my command in the CLI I want to save the results in a file on my machine. I saw a couple of solutions and all of them require this -
composer require maatwebsite/excel
But upon running the command I am given this error...
Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.1.2) does not satisfy that requirement.
- maatwebsite/excel[3.1.26, ..., 3.1.35] require illuminate/support 5.8.*|^6.0|^7.0|^8.0 -> found illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- phpoffice/phpspreadsheet[1.18.0, ..., 1.25.2] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
- maatwebsite/excel[3.1.41, ..., 3.1.x-dev] require psr/simple-cache ^1.0|^2.0 -> found psr/simple-cache[1.0.0, 1.0.1, 2.0.0, 2.x-dev] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- maatwebsite/excel[3.1.36, ..., 3.1.40] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, ..., 1.25.2].
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/8.1/cli/php.ini
- /etc/php/8.1/cli/conf.d/10-mysqlnd.ini
- /etc/php/8.1/cli/conf.d/10-opcache.ini
- /etc/php/8.1/cli/conf.d/10-pdo.ini
- /etc/php/8.1/cli/conf.d/15-xml.ini
- /etc/php/8.1/cli/conf.d/20-calendar.ini
- /etc/php/8.1/cli/conf.d/20-ctype.ini
- /etc/php/8.1/cli/conf.d/20-curl.ini
- /etc/php/8.1/cli/conf.d/20-dom.ini
- /etc/php/8.1/cli/conf.d/20-exif.ini
- /etc/php/8.1/cli/conf.d/20-ffi.ini
- /etc/php/8.1/cli/conf.d/20-fileinfo.ini
- /etc/php/8.1/cli/conf.d/20-ftp.ini
- /etc/php/8.1/cli/conf.d/20-gettext.ini
- /etc/php/8.1/cli/conf.d/20-iconv.ini
- /etc/php/8.1/cli/conf.d/20-mysqli.ini
- /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini
- /etc/php/8.1/cli/conf.d/20-phar.ini
- /etc/php/8.1/cli/conf.d/20-posix.ini
- /etc/php/8.1/cli/conf.d/20-readline.ini
- /etc/php/8.1/cli/conf.d/20-shmop.ini
- /etc/php/8.1/cli/conf.d/20-simplexml.ini
- /etc/php/8.1/cli/conf.d/20-sockets.ini
- /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/8.1/cli/conf.d/20-sysvsem.ini
- /etc/php/8.1/cli/conf.d/20-sysvshm.ini
- /etc/php/8.1/cli/conf.d/20-tokenizer.ini
- /etc/php/8.1/cli/conf.d/20-xmlreader.ini
- /etc/php/8.1/cli/conf.d/20-xmlwriter.ini
- /etc/php/8.1/cli/conf.d/20-xsl.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-gd` to temporarily ignore these required extensions.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require maatwebsite/excel:*" to figure out if any version is installable, or "composer require maatwebsite/excel:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Any other suggestions on how to export the files?
php artisan select:values --year=2020 --month=02 that's how I am running my command
Running this solved my problem
composer require psr/simple-cache:^1.0 maatwebsite/excel:3.1.44 --ignore-platform-req=ext-gd --ignore-platform-req=ext-zip
phpoffice/phpspreadsheet[1.18.0, ..., 1.25.2] require ext-gd *
By looking at the commandline error you need to enable this extention in your xampp or apache server configurations.
In case of Windows
just enable it in php.ini file like this
Now find extention:gd2
and remove the semi colon from start like this.
now simply restart the server and you are good to go.
I am trying to install the Phalcon4 with php7.4-fpm and I see that the ini file for phalcon is loaded in my phpinfo() here
But I am still getting the below error
Problem 1
- phalcon/incubator-logger[v1.0.0-beta.1, ..., v1.0.1] require ext-phalcon ^4.0 -> it is missing from your system. Install or enable PHP's phalcon extension.
- Root composer.json requires phalcon/incubator-logger ^1.0 -> satisfiable by phalcon/incubator-logger[v1.0.0-beta.1, v1.0.0, v1.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.4/cli/php.ini
- /etc/php/7.4/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.4/cli/conf.d/10-opcache.ini
- /etc/php/7.4/cli/conf.d/10-pdo.ini
- /etc/php/7.4/cli/conf.d/15-xml.ini
- /etc/php/7.4/cli/conf.d/20-calendar.ini
- /etc/php/7.4/cli/conf.d/20-ctype.ini
- /etc/php/7.4/cli/conf.d/20-curl.ini
- /etc/php/7.4/cli/conf.d/20-dom.ini
- /etc/php/7.4/cli/conf.d/20-exif.ini
- /etc/php/7.4/cli/conf.d/20-ffi.ini
- /etc/php/7.4/cli/conf.d/20-fileinfo.ini
- /etc/php/7.4/cli/conf.d/20-ftp.ini
- /etc/php/7.4/cli/conf.d/20-gd.ini
- /etc/php/7.4/cli/conf.d/20-gettext.ini
- /etc/php/7.4/cli/conf.d/20-iconv.ini
- /etc/php/7.4/cli/conf.d/20-json.ini
- /etc/php/7.4/cli/conf.d/20-mbstring.ini
- /etc/php/7.4/cli/conf.d/20-mysqli.ini
- /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.4/cli/conf.d/20-phar.ini
- /etc/php/7.4/cli/conf.d/20-posix.ini
- /etc/php/7.4/cli/conf.d/20-readline.ini
- /etc/php/7.4/cli/conf.d/20-shmop.ini
- /etc/php/7.4/cli/conf.d/20-simplexml.ini
- /etc/php/7.4/cli/conf.d/20-sockets.ini
- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.4/cli/conf.d/20-sysvsem.ini
- /etc/php/7.4/cli/conf.d/20-sysvshm.ini
- /etc/php/7.4/cli/conf.d/20-tokenizer.ini
- /etc/php/7.4/cli/conf.d/20-xmlreader.ini
- /etc/php/7.4/cli/conf.d/20-xmlrpc.ini
- /etc/php/7.4/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.4/cli/conf.d/20-xsl.ini
- /etc/php/7.4/cli/conf.d/50-phalcon.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
How can I get the Phalcon4 working for me? I am running LEMP Stack on Ubuntu 20.04
TIA
The error's indicate that you are trying to load phalcon via the CLI, your phpinfo() output is only showing that phalcon is loaded for FPM.
You need to load the extension in both config ini files:
Documentation:
; Ubuntu/Debian with Php7-fpm: Add a File Called 30-phalcon.ini in /etc/php7/fpm/conf.d/ with This Content:
extension=phalcon.so
; Ubuntu/Debian with Php7-cli: Add a File Called 30-phalcon.ini in /etc/php7/cli/conf.d/ with This Content:
extension=phalcon.so
We need to run phalcon PSR module
Execute this command start the php-fpm server
sudo apt install php7.4-psr
sudo start php7.4-fpm
I encounter a problem during the download of the Pterodactyl Panel: when I launch the Error downloading Pterodactyl command with the command composer compose --no-dev --optimize-autoloader
I have an error which is:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
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 s1lentium/iptools v1.1.1 -> satisfiable by s1lentium/iptools[v1.1.1].
- s1lentium/iptools v1.1.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.4/cli/php.ini
- /etc/php/7.4/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.4/cli/conf.d/10-opcache.ini
- /etc/php/7.4/cli/conf.d/10-pdo.ini
- /etc/php/7.4/cli/conf.d/15-xml.ini
- /etc/php/7.4/cli/conf.d/20-bz2.ini
- /etc/php/7.4/cli/conf.d/20-calendar.ini
- /etc/php/7.4/cli/conf.d/20-ctype.ini
- /etc/php/7.4/cli/conf.d/20-curl.ini
- /etc/php/7.4/cli/conf.d/20-dom.ini
- /etc/php/7.4/cli/conf.d/20-exif.ini
- /etc/php/7.4/cli/conf.d/20-ffi.ini
- /etc/php/7.4/cli/conf.d/20-fileinfo.ini
- /etc/php/7.4/cli/conf.d/20-ftp.ini
- /etc/php/7.4/cli/conf.d/20-gd.ini
- /etc/php/7.4/cli/conf.d/20-gettext.ini
- /etc/php/7.4/cli/conf.d/20-iconv.ini
- /etc/php/7.4/cli/conf.d/20-json.ini
- /etc/php/7.4/cli/conf.d/20-mbstring.ini
- /etc/php/7.4/cli/conf.d/20-mysqli.ini
- /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.4/cli/conf.d/20-phar.ini
- /etc/php/7.4/cli/conf.d/20-posix.ini
- /etc/php/7.4/cli/conf.d/20-readline.ini
- /etc/php/7.4/cli/conf.d/20-shmop.ini
- /etc/php/7.4/cli/conf.d/20-simplexml.ini
- /etc/php/7.4/cli/conf.d/20-sockets.ini
- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.4/cli/conf.d/20-sysvsem.ini
- /etc/php/7.4/cli/conf.d/20-sysvshm.ini
- /etc/php/7.4/cli/conf.d/20-tokenizer.ini
- /etc/php/7.4/cli/conf.d/20-xmlreader.ini
- /etc/php/7.4/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.4/cli/conf.d/20-xsl.ini
- /etc/php/7.4/cli/conf.d/20-zip.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I checked and I have everything when I run php --ini:
Configuration File (php.ini) Path: /etc/php/7.4/cli
Loaded Configuration File: /etc/php/7.4/cli/php.ini
Scan for additional .ini files in: /etc/php/7.4/cli/conf.d
Additional .ini files parsed: /etc/php/7.4/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.4/cli/conf.d/10-opcache.ini,
/etc/php/7.4/cli/conf.d/10-pdo.ini,
/etc/php/7.4/cli/conf.d/15-xml.ini,
/etc/php/7.4/cli/conf.d/20-bz2.ini,
/etc/php/7.4/cli/conf.d/20-calendar.ini,
/etc/php/7.4/cli/conf.d/20-ctype.ini,
/etc/php/7.4/cli/conf.d/20-curl.ini,
/etc/php/7.4/cli/conf.d/20-dom.ini,
/etc/php/7.4/cli/conf.d/20-exif.ini,
/etc/php/7.4/cli/conf.d/20-ffi.ini,
/etc/php/7.4/cli/conf.d/20-fileinfo.ini,
/etc/php/7.4/cli/conf.d/20-ftp.ini,
/etc/php/7.4/cli/conf.d/20-gd.ini,
/etc/php/7.4/cli/conf.d/20-gettext.ini,
/etc/php/7.4/cli/conf.d/20-iconv.ini,
/etc/php/7.4/cli/conf.d/20-json.ini,
/etc/php/7.4/cli/conf.d/20-mbstring.ini,
/etc/php/7.4/cli/conf.d/20-mysqli.ini,
/etc/php/7.4/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.4/cli/conf.d/20-phar.ini,
/etc/php/7.4/cli/conf.d/20-posix.ini,
/etc/php/7.4/cli/conf.d/20-readline.ini,
/etc/php/7.4/cli/conf.d/20-shmop.ini,
/etc/php/7.4/cli/conf.d/20-simplexml.ini,
/etc/php/7.4/cli/conf.d/20-sockets.ini,
/etc/php/7.4/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.4/cli/conf.d/20-sysvsem.ini,
/etc/php/7.4/cli/conf.d/20-sysvshm.ini,
/etc/php/7.4/cli/conf.d/20-tokenizer.ini,
/etc/php/7.4/cli/conf.d/20-xmlreader.ini,
/etc/php/7.4/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.4/cli/conf.d/20-xsl.ini,
/etc/php/7.4/cli/conf.d/20-zip.ini
And I didn't find the installation of s1lentium / iptools v1.1.1.
I have been looking for quite a while but cannot find any thanks for any help.
apt install php7.4-bcmath to the rescue!
I'm building a website with PHP framework "Slim" as my templating framework, and it recommends using composer as the package manager. SO... I'm now using composer for the first time, developing locally on 64 bit Ubuntu 16.04 and composer is not installing anything into my project.
I've followed the installation instructions on the Slim Framework & Composer websites to a tee.
Basically this is the order of what I've done:
Installed composer into /var/www/html directory [1.]
Created Slim project using Slim-Skeleton as a base
php composer.phar create-project slim/slim-skeleton slimLittleTest
Note: the php composer.phar create-project slim/slim-skeleton command automatically creates a composer.json file, I will put the contents of that file down farther in my question.
Change into that directory and run php composer.phar install
Nothing is installed!
If I try to run php -S localhost:8080 -t public public/index.php as you're now supposed to able to (from the Slim framework website homepage tutorial) I get the following error:
[Tue Sep 5 18:55:04 2017] PHP Fatal error: require(): Failed opening required '/var/www/html/slimLittleTest/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/slimLittleTest/public/index.php on line 12
[Tue Sep 5 18:55:05 2017] PHP Warning:
require(/var/www/html/slimLittleTest/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/slimLittleTest/public/index.php on line 12
This error of course makes sense because nothing got installed! There is no vendor/autoload.php because Composer hasn't installed anything. (By default Composer installs dependencies into the vendor folder in the root of your project)
SEPTEMBER 7th QUESTION UPDATE
From some comments down below, I've been alerted to the fact that something must have gone wrong on the command composer create-project, that my solution of just re-requiring all packages shouldn't be necessary. Upon further inspection, I did get some errors upon running command php composer.phar create-project slim/slim-skeleton projectName. Below is exactly what got output from the console after running that command:
php composer.phar create-project slim/slim-skeleton tester
Installing slim/slim-skeleton (3.1.2)
- Installing slim/slim-skeleton (3.1.2): Loading from cache
Created project in tester
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/phpunit 5.7.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 5.7.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 5.7.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
[.......]
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-imagick.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Would either that .ini extensions issue or Problem 1 php unit requires ext-dom issue be the main source of my problem?
I got lucky and stumbled upon an answer that worked in my situation.
I just had to run php composer.phar require [package_name], for each package name, and if it wasn't in composer.json yet that dependency would get installed. So what I needed to do was delete the composer.json file, then go back and require each package from it. Nothing else worked, such as php composer.phar update, or php composer.phar install.
So I ran php composer.phar require slim/php, php composer.phar require php, etc. from the command line and everything installed correctly.
This is potentially a failure of the getting started documentation from SlimFramework.com, It's not necessarily "wrong" because maybe it works in some/most situations, but they should at least address the potential for the problem I ran into, and a solution or way to avoid it.
EVEN BETTER SOLUTION
Turns out that the main error I was getting here is that I was missing ext-dom. Thank you to this badass #Anar Bayramov's answer on another StackOverflow question I know that I can get the missing ext-dom by simply downloading php7.0-xml.
sudo apt-get update
sudo apt-get install php7.0-xml
And BOOM! Now when I run php composer.phar create-project slim/slim-skeleton projectName all vendor packages are installed successfully and it works like a charm. Problem solved.
I have problem with configuration MongoDB Symfony
Program doesnt see class \MongoDbBudle\ to I went to Tools ->
Composer -> add -> "doctrine/mongodb-odm". I tried to install it but I saw error:
C:\wamp64\bin\php\php7.0.10\php.exe C:\Users\Root\PhpstormProjects\untitled2\composer.phar require doctrine/mongodb-odm:1.2.x-dev -n --no-progress
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Removal request for alcaeus/mongo-php-adapter == 1.1.9999999.9999999-dev
- Removal request for alcaeus/mongo-php-adapter == 9999999-dev
- doctrine/mongodb-odm 1.2.x-dev requires doctrine/mongodb ^1.4.0 -> satisfiable by doctrine/mongodb[1.4.0].
- doctrine/mongodb 1.4.0 requires ext-mongo ^1.5 -> satisfiable by alcaeus/mongo-php-adapter[1.1.x-dev, dev-master].
- Installation request for doctrine/mongodb-odm 1.2.x-dev -> satisfiable by doctrine/mongodb-odm[1.2.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php7.0.10\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
php.ini seems to be ok. I added dynamic extension mongo-dll:
http://pastebin.com/bfb34A0s
Please help me how to solve this problem.
Using ODM with PHP 7 is a bit trickier than it should, please check if adding
"provide": {
"ext-mongo": "1.6.14"
}
to your project's composer.json would solve the issue. Otherwise you can see full chapter on how to use ODM with PHP 7 in the official documentation