Skip to content

Instantly share code, notes, and snippets.

@landbryo
Created August 21, 2020 16:56
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save landbryo/d009f7a5e3e066a98950453fec16c10b to your computer and use it in GitHub Desktop.
Save landbryo/d009f7a5e3e066a98950453fec16c10b to your computer and use it in GitHub Desktop.
Laragon Cmder in PHPStorm

Navigate to PHPStorm's Settings > Tools > Terminal and set...

Shell path "cmd" /k "C:\laragon\bin\cmder\vendor\init.bat"

@Mutahhar
Copy link

Hi @landbryo

I tried but it is giving me following error

Generating clink initial settings in "D:\config\settings"
Additional *.lua files in "D:\config" are loaded on startup.
The system cannot find the path specified.
Creating initial user-aliases store in "D:\config\user-aliases.cmd"...
The system cannot find the path specified.
'"D:\config\user-aliases.cmd"' is not recognized as an internal or external command,
operable program or batch file.
Creating user startup file: "D:\usr\user.cmd"
The system cannot find the path specified.

NOTE: my laragon root path is D:\laragon\ so I have entered this "cmd" /k "D:\laragon\bin\cmder\vendor\init.bat" as shell path.

Any suggestion, please?

@Mutahhar
Copy link

Mutahhar commented Aug 31, 2022

I resolved this issue by

  1. Creating a CMDER_ROOT environment variable with my cmder root folder path D:\laragon\bin\cmder
  2. Setting Shell Path value in PHP Storm to cmd /k "%CMDER_ROOT%\vendor\init.bat"

NOTE: my laragon root path is D:\laragon\

@gajosadrian
Copy link

gajosadrian commented Sep 5, 2022

The path has to be C:\laragon\bin\cmder\cmder.bat -> PHPStorm's Settings > Tools > Terminal
It works perfectly and looks like it has some Linux commands (maybe all)

@Mutahhar
Copy link

The path has to be C:\laragon\bin\cmder\cmder.bat -> PHPStorm's Settings > Tools > Terminal It works perfectly and looks like it has some Linux commands (maybe all)

@gajosadrian
Your technique also worked, but both mine and yours had the issue that when I change the PHP version from laragon and close and reopen the PHPStorm terminal, the php -v Command does not reflect the change in the PHP version in CLI. Despite the fact that this strategy works with Laragon Terminal.

@guillaumedufour
Copy link

The path has to be C:\laragon\bin\cmder\cmder.bat -> PHPStorm's Settings > Tools > Terminal It works perfectly and looks like it has some Linux commands (maybe all)

@gajosadrian Your technique also worked, but both mine and yours had the issue that when I change the PHP version from laragon and close and reopen the PHPStorm terminal, the php -v Command does not reflect the change in the PHP version in CLI. Despite the fact that this strategy works with Laragon Terminal.

any new on this php cli version issue ?

@Mutahhar
Copy link

Mutahhar commented Sep 12, 2023

any new on this php cli version issue ?

@guillaumedufour unfortunately, I am not able to find any solution for this. I keep using the largon terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment