Unable to create Laravel project after downloading composer and xampp
Stefan Bogdanescu
Founder & Senior Architect · 2026-06-29
## Resolving Composer Download Failures: Fixing Missing PHP Extensions and System Dependencies
The error messages you are encounteringâspecifically "The zip extension and unzip/7z commands are both missing, skipping"âindicate a fundamental issue that goes beyond just missing PHP modules. This problem stems from Composer's inability to unpack the downloaded package archives, which is a prerequisite for installing dependencies.
As a developer, understanding this requires looking at two distinct layers: **System Dependencies** and **PHP Extensions**.
Here is a thorough breakdown of how to resolve this issue and ensure your PHP environment is correctly set up for Laravel development on PHP 8.2.
---
### 1. Addressing the Immediate Error: System Dependencies (The `zip` Issue)
The error message points to missing system commands (`unzip/7z`) required by Composer to handle file extraction. While this often points to a missing system utility, it can also be related to PHP's ability to interact with file systems.
**Action Required:**
You must ensure that the underlying operating system tools necessary for archive manipulation are installed and accessible by your command-line environment. Since you are using XAMPP (likely Windows), check if the necessary utilities are installed or added to your systemâs PATH variable. Installing a package manager like Git or ensuring standard development tools are present often resolves these dependency issues implicitly.
### 2. Enabling Essential PHP Extensions in `php.ini`
Your suspicion that extensions are missing is correct, especially when dealing with modern frameworks like Laravel, which rely on robust file handling and data manipulation capabilities. A standard XAMPP installation might omit certain modules by default for a minimal setup.
To fix this, you need to manually edit your `php.ini` file located at `C:\xampp\php\php.ini`.
**Recommended Extensions for Laravel 9/10 on PHP 8.2:**
For a modern application requiring database connectivity, string handling, and general utility, the following extensions are crucial:
1. **`mbstring` (Multibyte String Functions):** Essential for correctly handling UTF-8 character sets, which is vital for internationalization and correct text storage in any web application.
2. **`pdo` family (e.g., `pdo_mysql`, `pdo_pgsql`):** Necessary if you plan to use a relational database (MySQL/MariaDB or PostgreSQL), which is standard practice in Laravel development. Ensure the specific driver for your chosen database is enabled.
3. **`xml`:** Required for parsing XML data, often used in configuration files and API interactions.
4. **`gd` (Graphics Draw):** Useful if you plan to handle image manipulation or file operations involving graphics.
**How to Edit `php.ini`:**
1. Open the file: Navigate to `C:\xampp\php\php.ini` and open it using a text editor.
2. Search for lines starting with `;extension=`. These lines are commented out (disabled).
3. Remove the semicolon (`;`) at the beginning of the lines you wish to enable, or uncomment them.
**Example Changes in `php.ini`:**
Find and modify (uncomment) these lines:
```ini
; Enable Multibyte String support
extension=mbstring
; Enable XML support
extension=xml
; Example for MySQL/MariaDB support (adjust based on your setup)
extension=pdo_mysql
```
### Conclusion: Best Practices for Laravel Development
When setting up a fresh environment, always refer to the official documentation and best practices provided by the framework itself. For detailed setup guides and dependency management advice for modern PHP projects, consult resources like the **[Laravel Company documentation](https://laravelcompany.com/)**.
By ensuring your system dependencies are functional *and* explicitly enabling the necessary PHP extensions in `php.ini`, you create a stable environment where Composer can successfully download and install all required packages without interruption. This ensures that your development workflow remains efficient, allowing you to focus on writing application logic rather than troubleshooting environment setup.