command line help command line mode
Posted by: faustjr (---.snloca.dsl-w.verizon.net)
Date: April 18, 2008 05:54PM

Help

I want to run some scripts I downloaded. It says to run from command line. but I cant seem to be able to find where or how to start the php command line.

I have
Wampserver 2.0

Apache 2.2.8
PHP 5.2.5
Mysql 5.0.51a

How do I runj a script named: import_data



Edited 1 time(s). Last edit at 04/18/2008 06:07PM by faustjr.

Options: ReplyQuote
Re: command line help command line mode
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 18, 2008 05:58PM

C:\wamp\bin\php\php5.2.5 its loacatled here...


php.exe in this folder maybe ul see PHP CLI COMMAND LINE INTERFACE

Options: ReplyQuote
Re: command line help command line mode
Posted by: faustjr (---.snloca.dsl-w.verizon.net)
Date: April 18, 2008 06:01PM

I see php.exe but no cli

thankyou for fast reply

Options: ReplyQuote
Re: command line help command line mode
Posted by: faustjr (---.snloca.dsl-w.verizon.net)
Date: April 18, 2008 06:06PM

I also see
php-win.exe

in the php manual is says

As of PHP 5, a new php-win.exe file is distributed. This is equal to the CLI version, except that php-win doesn't output anything and thus provides no console (no "dos box" appears on the screen). This behavior is similar to php-gtk. You should configure with --enable-cli-win32

but just like it says in the manual nothing happens when i click on it

what is
--enable-cli-win32

Options: ReplyQuote
Re: command line help command line mode
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 18, 2008 06:07PM

either way thats the one.. php.exe


just open it

a black box opens . and type ur stuff in ther..

Options: ReplyQuote
Re: command line help command line mode
Posted by: faustjr (---.snloca.dsl-w.verizon.net)
Date: April 18, 2008 06:13PM

the black box opens but nothing i type seem to do anything. I type the script name and nothing.

import_data

I try to get help by typing type....

help
?
-h

and there is nothing in the black box but what i type

I even pasted the whole text in the script import_data and still nothing is executed just what i type or past in shows up.



Edited 2 time(s). Last edit at 04/18/2008 06:21PM by faustjr.

Options: ReplyQuote
Re: command line help command line mode
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 18, 2008 06:23PM

no lol . u wanna just run a file?

goto start ...run and type in cmd

type
cd.. and press enter

keep doing until
u get back to


c:/

then go to where u php file is by typing the path in

c:\ c:/wamp\myfile.php

and that will run it

Options: ReplyQuote
Re: command line help command line mode
Posted by: faustjr (---.snloca.dsl-w.verizon.net)
Date: April 18, 2008 06:27PM

just for your info.

I am running Wamp on windoiws server 2003 operating system. Wamp has allwas worked great on this computer and I have been testing 2 shopping carts Oscommerce and Megento with no problems

I just cant figure out how to get these command line scripts to work.

Options: ReplyQuote
Re: command line help command line mode
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 18, 2008 06:30PM

u dont need to run them in cli i dont think


just run the file in broswer like normal

ul probably just get a blank page but it will make all the changes it has to


so

'http://localhost/urfolder/import.php'

or watevr it is

Options: ReplyQuote
Re: command line help command line mode
Posted by: toivo (---.nsw.bigpond.net.au)
Date: April 18, 2008 11:43PM

Hi,

When you run a CLI script interactively, you normally go to the DOS box, aka Command Prompt window, and type in for example:

cd \my_script_folder
php name_of_my_script.php

This assumes that you have added C:\wamp\bin\php\php5.2.5 to the PATH. It is best to add it to the System path in Control Panel - System - Advanced - Environment Variables - System Variables.

You can also run CLI scripts through the Scheduler. You need to create a user with enough rights who is in the Administrators group, and create a small .cmd script to run the above commands.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote


Sorry, only registered users may post in this forum.