Problem installing composer

C0pyright

Member
Mar 28, 2022
46
1
Hi guys, i got this error when i try to install composer..
I'm using Object's tutorial.
Can someone help me?
 

Attachments

  • error2.png
    error2.png
    41.1 KB · Views: 17

Leader

github.com/habbo-hotel
Aug 24, 2012
1,030
307
The screenshot you've shared indicates that Composer, the dependency manager for PHP, is encountering problems due to missing PHP extensions, specifically the zip extension. The error messages show that Composer is trying to download and install packages but is unable to do so because it requires the zip extension and unzip command to be present.

To resolve this issue, you'll need to:

  1. Enable the Zip extension for PHP:
    • Locate your php.ini file. According to your screenshot, it is located at C:\Program Files\PHP\php.ini.
    • Open the php.ini file in a text editor with administrative privileges.
    • Search for the line that includes extension=zip. If it's prefixed with a semicolon (;), remove the semicolon to uncomment the line and enable the extension. If this line doesn't exist, you may need to add it manually.
    • Save the php.ini file after making the changes.
  2. Ensure unzip command is available:
    • You may need to install a program that provides the unzip command. On Windows, this is typically available through programs like 7-Zip or WinRAR.
    • After installing the necessary software, ensure that the path to the unzip command (where the executable of the software is located) is included in your system's PATH environment variable.
  3. Restart your web server and PHP:
    • After making these changes, you'll need to restart your web server (like Apache or Nginx) and PHP FastCGI Process Manager (PHP-FPM) if you're using it.
    • This will allow the changes to the php.ini file to take effect.
  4. Retry the Composer command:
    • Once you have made these changes and restarted the services, run the Composer command again.
If you continue to experience issues, make sure that your PHP installation includes the zip extension and that the unzip command is correctly installed and configured in your system's PATH. Additionally, verify that your Composer is up to date by running composer self-update.
 

Users who are viewing this thread

Top