Page 1 of 1

How to execute a PHP file from a Windows XP Command Prompt

PostPosted: 14. March 2011 20:04
by FeralReason
I'm trying to execute a PHP file from the Windows command prompt.

I've been using XAMPP with Windows XP for a couple of years, but never needed to use the Command Prompt before

Tried "php myscript.php" (as suggested elsewhere in the forum). This results in an error: "'php is not recognized as an internal or external command, operable program or batch file". Another item in the forum indicates that there is a "shell" button in the control panel. I have no such button in my control panel. I am running XAMPP version 1.7.1 for Windows.

Does anyone know how to do this ?

Thx, Glenn

Re: How to execute a PHP file from a Windows XP Command Prom

PostPosted: 14. March 2011 22:25
by FeralReason
Wole -- you are absolutely right.

Needed to set the Path command to include "c:\xampp\php". Instructions for how to set this in XT are here (for anyone else needing to know): http://www.computerhope.com/issues/ch000549.htm

Thx.