PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 1, 2022

[FIXED] How can I install the phpspreadsheet in codeignter version 4

 January 01, 2022     codeigniter, codeigniter-4     No comments   

Issue

I have tried to install the package of phpspreadsheet for both way for github and through composer also but I am unable to install In composer i am trying these command :- composer require phpoffice/phpspreadsheet but its not working It's basically show these type of error:- [InvalidArgumentException] Package phpoffice/phpspreadsheet has requirements incompatible with your PHP version, PHP extensions and Composer v ersion: - phpoffice/phpspreadsheet 1.19.0 requires ext-gd * but it is not present. And when i am trying directly for github code its files is not in proper way as the requriement git hub link:- https://github.com/PHPOffice/PhpSpreadsheet


Solution

phpoffice/phpspreadsheet v1.19.0 requires php: ^7.3 || ^8.0

  1. Check your installed PHP version by running this command php -v. Make sure it's greater or equal to 7.3.

  2. Secondly, make sure that the PHP version declaration in the composer.json file is also greater or equal to 7.3. I.e:

        "php": "^7.3 || ^8.0",
  • If in case your application has dependencies that aren't compatible with PHP version >= 7.3, you may want to install a lower version of phpspreadsheet i.e composer require phpoffice/phpspreadsheet "^1.8.0" (requires php: "^5.6|^7.0") instead of adjusting the PHP version in the file composer.json.
  1. In addition, if you're using xampp, make sure these extensions are enabled in the file C:\xampp\php\php.ini before attempting to install the library.
    extension=mbstring
    extension=fileinfo
    extension=gd

Installation

composer require phpoffice/phpspreadsheet "^1.19.0"



Answered By - steven7mwesigwa
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing