Skip to content

Cannot run program "php": CreateProcess error=2, The system cannot find the file specified #74

@dev-idkwhoami

Description

@dev-idkwhoami

Laravel Package Version

1.0.4

Laravel Version

12.23.1

PHP Version

8.4.11

Database Driver & Version

No response

Description

After freshly installing the laravel/boost package and running the boost:install command which finished successfull. I tried activating the MCP Server in PHPStorm's MCP Settings. But i got an error saying Cannot run program "php": CreateProcess error=2, The system cannot find the file specified.

I want to clarify they work as intended, within PHPStorm as well as in a normal console.

Important

I relatively quickly figured out that for CreateProcess doesn't like the "shortened" php so i changed the program to php.bat and then it could start the server successfully.

For completion, this is what my .junie/mcp/mcp.json file looks like

{
    "mcpServers": {
        "laravel-boost": {
            "command": "php.bat",
            "args": [
                "B:\\zenni\\artisan",
                "boost:mcp"
            ]
        }
    }
}

I don't know whether that is something Jetbrains needs to fix or maybe the boost:install command can "work around" ?

I don't even know if everybody using herd with standalone php has that issue.

Anyway i decided to post this here so that others having the same issue might be able to solve it.

Steps To Reproduce

Prerequisites:

Laravel Herd installed and PHP installed through Herd (PHP standalone). Might be important im on Windows 11.

Steps:

  1. Install laravel/boost composer package:
composer require laravel/boost --dev
  1. Run boost:install command
php artisan boost:install
  1. Navigate to PHPStorm Settings > Tools > Junie > MCP Settings and activate the laravel-boost server (click Apply)
  2. The "Status" column will show red circle with exclamation mark. By clicking into the cell it will display the error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions