Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pratikprakashpatil's avatar

Laravel installation on Windows not working || laravel/pail require ext-pcntl

Till last week I was able to create new Laravel app using laravel new example I am using Windows, PHP 8.2.18. Today I tried to do the same but received error as


  Problem 1
    - laravel/pail[v1.1.0, ..., v1.1.4] require ext-pcntl * -> it is missing from your system. Install or enable PHP's pcntl extension.
    - Root composer.json requires laravel/pail ^1.1 -> satisfiable by laravel/pail[v1.1.0, ..., v1.1.4].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\wamp64\bin\php\php8.2.18\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-pcntl` to temporarily ignore these required extensions.

Turns out now to install laravel/pail package, now php extension ext-pcntl is required, but it is not available for windows. Check here https://github.com/laravel/pail/issues/43

I cd into example directory and executed composer install --ignore-platform-req=ext-pcntl to install required laravel/pail ignoring the ext-pcntl

Executed php artisan serve

App started but it gave the 500 Server Error

Any solutions?

1 like
3 replies
LaryAI's avatar
Level 58

The issue you're encountering is due to the ext-pcntl extension, which is not available on Windows. This extension is required by the laravel/pail package, and while you can bypass the requirement using --ignore-platform-req=ext-pcntl, it might lead to runtime issues, as you've experienced with the 500 Server Error.

Here are a few steps you can take to resolve this issue:

  1. Check for Alternative Packages: If laravel/pail is not essential for your project, consider removing it or finding an alternative package that does not require ext-pcntl.

  2. Use a Virtual Environment: Since ext-pcntl is available on Unix-based systems, consider using a virtual environment like Homestead or Docker, which can simulate a Linux environment on your Windows machine. This way, you can run your Laravel application in an environment where ext-pcntl is available.

  3. Modify Composer Requirements: If laravel/pail is not critical, you can remove it from your composer.json file and run composer update to remove it from your project dependencies.

  4. Debug the 500 Server Error: If you must use --ignore-platform-req=ext-pcntl, you should check the Laravel logs to understand the cause of the 500 error. The logs are typically located in storage/logs/laravel.log. Look for any specific error messages that might indicate what is going wrong.

  5. Check for Updates: Keep an eye on the laravel/pail GitHub repository or any related issues for updates or workarounds that might be provided by the maintainers.

Here's a quick example of how you might modify your composer.json to remove laravel/pail:

{
    "require": {
        // other dependencies
        // "laravel/pail": "^1.1" // Remove or comment out this line
    }
}

After making changes to composer.json, run:

composer update

This will update your dependencies and remove laravel/pail if it's not needed.

By following these steps, you should be able to either work around the ext-pcntl requirement or find a suitable environment to run your Laravel application.

pratikprakashpatil's avatar

I was able to install the Laravel using composer install --ignore-platform-req=ext-pcntl In the storage/logs/laravel.log found error as No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified.

I had only .env.example file duplicated it with name as .env Executed php artisan key:generate and php artisan config:cache

Just in case somebody might need to update permissions also so .env file is writable. This can be done by going 1 level up to the project folder. mine is example, and executing chmod 777 -R example This might not be proper for live environment but for local environment it is okay.

After this faced another error as database does not exists. This was solved by executing migrations as php artisan migrate

Please or to participate in this conversation.