它的启用eventhough作曲PHPSpreadsheet给出错误gd扩展

问题描述 投票:0回答:2

PHP版本25年6月5日延长启用PHP_Gd2

下载PHPSpreadsheet-开发从GitHub zip文件。提取该文件到项目文件夹C:\ WAMP \项目。

虽然从项目文件夹下面运行命令:

composer require phpoffice/phpspreadsheet

获得以下错误:有人能帮我与下面的错误?

Using version ^1.2 for phpoffice/phpspreadsheet
./composer.json has been created
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
- phpoffice/phpspreadsheet 1.2.1 requires ext-gd * -> the requested PHP 
extension gd is missing from your system.
- phpoffice/phpspreadsheet 1.2.0 requires ext-gd * -> the requested PHP 
extension gd is missing from your system.
- Installation request for phpoffice/phpspreadsheet ^1.2 -> satisfiable by 
phpoffice/phpspreadsheet[1.2.0, 1.2.1].

To enable extensions, verify that they are enabled in your .ini files:
- C:\php\php.ini
You can also run php --ini inside terminal to see which files are used by 
PHP in CLI mode.

Installation failed, deleting ./composer.json.

我已经验证进行如下的PHP GD2扩展启用:

  • 验证GD2扩展是否已启用我手动检查php.ini文件窗口扩展部分,它表明GD2扩展功能。 “扩展名=文件php_gd2.dll”。
  • 使用phpinfo()函数它表明GD2扩展启用检查

最令人惊奇的是1台个人电脑上相同的作曲家命令在何处运行PHP的版本是35年5月6日,并给予错误如上在另一台PC,其中PHP的版本是25年6月5日。是否有做什么版本?按PHPSpreadsheet的要求,它应该工作的PHP版本5.6或更高版本。

php composer-php phpspreadsheet
2个回答
0
投票

我抄在我的项目文件夹中创建运行作曲家成功,其中的PHP版本是35年6月5日到其他机器上的项目文件夹,PHP的版本是25年5月6日,并能够使用phpSpreadsheet的“供应商”文件夹中。


0
投票

我不得不用我的Windows机器上WAMP本地网络服务器同样的问题。从/bin/php/php5.6.24/phpForApache.ini我的web服务器负载PHP配置(GD2分机装),但作曲家检查未使用的官方/bin/php/php5.6.24/php.ini和当时只有加载了一些默认的扩展。

我知道这是WAMP的依赖局面,但也可能是它 - 服务器和作曲家阅读不同的php.ini的。

© www.soinside.com 2019 - 2024. All rights reserved.