Programming, tutorials, mechatronics, operating systems, and other tech stuff

How to set up XAMPP-bundled php path in windows 7

Most student, teacher, or even web developer used bundled webserver applications for their projects such as xampp or uniserv.

When using native php installation, we may use 'php' command directly from command prompt / terminal to use php cli. But if we are using xampp, because the php executable path is not defined in the system environment by default, we need to call php executable bin by complete path such as 'C:\xampp\php\php.exe' everytime to run php cli which is very annoying.

To avoid doing so, we can manually define php executable path in windows system environment You can do that by following these steps.

First, find out where your php executable is located. In XAMPP, it's in C:\xampp\php by default. You may copy the path from address bar to avoid typo.
Next, open your Environment variables by going through : Left click My Computer, Properties, Advanced system settings, and then click Environment Variables.

Choose PATH from System Variables, Edit...

Then at the end of Variable Value, Add (DO NOT REPLACE ANYTHING, just append at the end) a semicolon, followed by your php executable path so it will looks like:
Every entries are separated by semicolon

Hit OK three times to close all windows.

Open your command prompt, and try command:
php -v

your current php version should be displayed. which means from now on you can directly call 'php' from your command prompt to use php cli.

That concludes this tutorial. You can watch the video below to understand this tutorial better.


  1. Hi my friend..Very interesting discussion glad that I came across such informative post.Keep up the good work friend.

    1. IEEE Project Domain management in software engineering is distinct from traditional project deveopment in that software projects have a unique lifecycle process that requires multiple rounds of testing, updating, and faculty feedback. A IEEE Domain project Final Year Projects for CSE system development life cycle is essentially a phased project model that defines the organizational constraints of a large-scale systems project. The methods used in a IEEE DOmain Project systems development life cycle strategy Project Centers in Chennai For CSE provide clearly defined phases of work to plan, design, test, deploy, and maintain information systems.

      This is enough for me. I want to write software that anyone can use, and virtually everyone who has an internet connected device with a screen can use apps written in JavaScript. JavaScript Training in Chennai JavaScript was used for little more than mouse hover animations and little calculations to make static websites feel more interactive. Let’s assume 90% of all websites using JavaScript use it in a trivial way. That still leaves 150 million substantial JavaScript Training in Chennai JavaScript applications.

  2. Hello there

    I also run a PHP Training Institute in Jaipur, I also want to make a video like you did. Just want to know which software you used.