You are not logged in.
Hello,
I am trying to install laravel with composer (archlinux package), I use apache, php, and php.ini is well configured in /etc/php/php.ini for composer and laravel (zip extension is enabled),
but when I want to install laravel I get an error, composer claims that zip extension is not installed, but it's not true, because zip is already installed and enabled (I checked with phpinfo() )
composer global require "laravel/installer"Using version ^2.0 for laravel/installer
./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
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/php.ini
- /etc/php/conf.d/apcu.ini
- /etc/php/conf.d/imagick.ini
- /etc/php/conf.d/xdebug.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.do you have an explanation ?
a bug in archlinux composer package ?
thanks
Last edited by Potomac (2018-11-27 20:15:55)
Offline
The zip extension is enabled by the default php.ini, and I can run your exact stated composer command in a clean chroot after freshly installing php and composer.
I'm inclined to think you're wrong and it's not enabled.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
no it is really enabled,
in fact the culprit is the extension xdebug, when this extension is enabled then a bug is triggered in composer,
because If I disable xdebug extension then all is ok, composer finally finds the zip php extension,
I found the solution by reading this page (see the comment of mnabialek on 28 Jan 2017) :
https://github.com/composer/composer/issues/5749
composer should disable automatically xdebug extension, but it's not the case as I see, I had to do manually in order to have a functionnal composer
Last edited by Potomac (2018-11-26 23:49:46)
Offline
upstream bug report :
https://github.com/composer/composer/issues/7807
Offline
I found the explanation : the problem was the setting "open_basedir" in /etc/php.ini, the directory "/etc/php" was not present in the list of the allowed directories, if I add "/etc/php" for this setting then all is ok
Offline