469,338 Members | 8,242 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,338 developers. It's quick & easy.

How to run a php script in command line

190 100+
Hi all,

I want to install the horde mail server and am using xampp.

See this

http://www.hmailserver.com/forum/vie...p?f=12&t=13860

In this installation instruction tells to run the php script in command line, i do not know how to any one can reply?.

To run in command line.

"C:\xampp\php\php.exe C:\xampp\htdocs\horde\scripts\setup.php"
Mar 6 '09 #1
6 17492
Markus
6,050 Expert 4TB
Open your command line by going to Run -> then type 'cmd' and hit enter. It'll bring up the terminal.
Mar 6 '09 #2
maheswaran
190 100+
HI ,

Could explain little bit, because am tried with that one but not get succeed,untitled.jpg

only shows its not a external or internal command.

also tried with some php commanda, pls explain how to run...
Mar 7 '09 #3
numberwhun
3,503 Expert Mod 2GB
@maheswaran
First, that image is WAY too small for even me with my great eye-sight, to read. Second, if you are getting that error, I would say that the php.exe program is not installed. You need to check that it exists.

Also, next time, please post the actual error(s) and the command line that you used.

Regards,

Jeff
Mar 7 '09 #4
maheswaran
190 100+
Hi ,

Yes i have php.exe in my xampp/php folder.

I have the xampp in D:/Program Files/Xampp

and i run the command as below

c:/

c: / D:/Program files/xampp/php/exe D:/Program files/xampp/horde/scripts/setup.php
also tried with back slashes

c: / D:\Program files\xampp\php\exe D:\Program files\xampp\horde\scripts\setup.php

but only i got 'D:\Program' is not recognized as an internal or external command,operable program or batch file

and do not know why my attachment looking so small even i have modifed width into 1024 px

See here

Mar 7 '09 #5
maheswaran
190 100+
Hi Guys,

Finally i got, what am missing is "", i must run likw

c:/ "D:/program files/xampp/php/php.exe" "D:/program files/xampp/htdocs/scripts/setup.php"

Thanks for supprting...

May above one is will use some one like me
Mar 7 '09 #6
numberwhun
3,503 Expert Mod 2GB
@maheswaran
If you are running windowsXP, then it does support tab-complete on the command line. This is where you would type: d:\Prog and then hit the tab key. You would then see that "Program Files" is enclosed in double quotes. This is the way you have to execute a program that has directories in its path that have spaces in them. If you put the php.exe program in say c:\test\php.exe you wouldn't have needed the double quotes.

Ok, Windows command line lesson done.

Regards,

Jeff
Mar 7 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by deko | last post: by
10 posts views Thread by Ohmster | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.