Updated Laragon with PhP 7.4 but Terminal still using 7.3.


  • | 2407 points

    Re: Change the php version in laragon terminal

    I am having this problem. Installed php 7.4 and the laragon title reflects this. When I open the Terminal and type php --version it is still using 7.3.

    I have tried clicking stop and start. No change.

    I have quite Laragon and restarted. No change.

    ???


  • | 2407 points

    I was using Cmder for the terminal on a Windows machine. There is a config file for Cmder at laragon > bin > cmder > config > user_profile. It contains a path and the reference to PhP should point to the version of PhP in the laragon > bin > php directory which you want to use.


  • | 9898 points

    @drdan see laragon > docs > isolated

    Just click Menu > Tools > PATH environment variable > Add Laragon to Path

    You then need to Log off and back on for the path to be added to all terminals (CMD/ Shell / Terminal etc.)

    One point to note: if you change PHP version, you need to run Remove Laragon from Path, log off and back on. Then Add Laragon to Path log off and back on!

    The new PHP version will then be available in all terminals.


  • | 744 points

    Provided you have put the newer php folder in C:\laragon\bin\php, I think there's a simpler way by Open Laragon > Right click > PHP > Version[your-version-number]> and choose your preferred version. Make sure to restart Laragon.

    AFAIK Laragon is made to function independent of your PC's dependencies so that you can move the projects to different machines easily. I don't mess with Windows PHP version, and exclusively using Laragon's cmder for all commands.

    In case you want to use the default Windows CMD/Terminal/Powershell, then you can Add Laragon to Path but there might be idiosyncrasies like mentioned above by @Pen-y-Fan


  • | 2407 points

    @wanahmadfiras I am sure you are correct about not messing with Windows PHP version. Just doing the selecting of PhP Version as you described is what I did first but it didn't work. On the Laragon app it showed it correct but the terminal didn't change. Maybe I have something else messed up on my system. Thanks for the reply.


  • | 4257 points

    Try installing Rapid Environment Editor to see if your PHP version is already on user/system path.
    And install Composer for Windows to check if it can detect your PHP version.
    Exit and reopen Laragon.
    php


  • | 2407 points

    @Pen-y-Fan thanks for this. I think this will solve the problem going forward.


  • | 2407 points

    @rescenic thanks for the reply and utility references. My path did have some errors in it which I was able to correct. They weren't related to this issue but nice to have them out of there. I haven't installed Composer yet but will have a look.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.