Php is not recognized as an internal or external command, operable program or batch file laragon

  1. Home
  2. laravel - 'php' is not recognized as an internal or external command on Laragon

601 votes

0 answers

Php is not recognized as an internal or external command, operable program or batch file laragon

Php is not recognized as an internal or external command, operable program or batch file laragon

Php is not recognized as an internal or external command, operable program or batch file laragon

Get the solution ↓↓↓


About the technologies asked in this question

PHP

PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites. The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/


Laravel

Laravel is a free open source PHP framework that came out in 2011. Since then, it has been able to become the framework of choice for web developers. One of the main reasons for this is that Laravel makes it easier, faster, and safer to develop complex web applications than any other framework.
https://laravel.com/



Welcome to programmierfrage.com

Php is not recognized as an internal or external command, operable program or batch file laragon

programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.

Get answers to specific questions

Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.

Help Others Solve Their Issues

Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.

Php is not recognized as an internal or external command, operable program or batch file laragon

Once I was working with a Laravel project which was in my xampp server and now it is in laragon server
In the min time I was going to run that project so I was type and run php artisan serve command on my terminal and it’s show me an error the error look like below

But there is another thing was happening. Thing is that the project isn’t run by artisan command but the same project is working when I type localhost/public/ on my web browser. So that time I was too much queries why this is happening actually. After a long time, I realize the mistake made by me. Actually, it’s a very funny what I done.
I realize that the composer I was install 1st time I was define php location from my xampp server. But now I am trying to run project by using php command which is in my laragon server. Ha ha….… what a funny mistake.
Finally, I think what I should do to avoid this php is not recognized as an internal or external command error. So, I remove my composer and again install fresh composer. Now in the composer installation time I was carefully define my php location which is in my laragon server.
And finally, php artisan server command is working nicely.
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻

Read next

Php is not recognized as an internal or external command, operable program or batch file laragon

Laravel 9 Forgot Password Email

shani singh - Jun 2

Php is not recognized as an internal or external command, operable program or batch file laragon

Rapid application scaffolding with Laravel Blueprint

Alpha Olomi - Jun 2

Php is not recognized as an internal or external command, operable program or batch file laragon

Getting started with Infyom Generator on Laravel 9

Alpha Olomi - Jun 2

Php is not recognized as an internal or external command, operable program or batch file laragon

Web Scraping with Laravel and spatie/crawler

Anlisha Maharjan - May 22

Once unpublished, all posts by osmanforhad will become hidden and only accessible to themselves.

If osmanforhad is not suspended, they can still re-publish their posts from their dashboard.

Once unpublished, this post will become invisible to the public and only accessible to Osman Forhad.

They can still re-publish the post if they are not suspended.

Thanks for keeping DEV Community safe. Here is what you can do to flag osmanforhad:

Make all posts by osmanforhad less visible

osmanforhad consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy.

How do you solve this error PHP is not recognized as an internal or external command operable program or batch file?

Follow these steps:.
Go to System Properties..
Go to Advanced..
Go to Environmental Variables..
Edit the Path environment variable..
Add the installation path of xammp/wamp like in my case the path is E:\xammp\php..
Click on Ok..
Restart command prompt (cmd).
Check the version of PHP by running php --version ..

Is not recognized as an internal or external command operable program or batch file?

You can resolve this issue in three ways: First, use the full path of the executable file to launch the program. Second, add the program path to Windows environment variables. Finally, move the files to the System32 folder.

How do I add my PHP directory to the path on Windows?

How do I add my PHP directory to the PATH on Windows?.
Go to Control Panel and open the System icon (Start → Control Panel).
Go to the Advanced tab..
Click on the 'Environment Variables' button..
Look into the 'System Variables' pane..
Find the Path entry (you may need to scroll to find it).
Double click on the Path entry..