sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
yawnmoth's Avatar

CLI and Windows


Question posted by: yawnmoth (Guest) on July 17th, 2005 10:19 AM
The portion of the PHP manual entitled "Using PHP from the command
line"
states that "The CGI SAPI supports the CLI SAPI behaviour by means of
the -C switch when run from the command line.":

http://us2.php.net/features.commandline

However, "php -h" says of the -C switch, "Do not chdir to the script's
directory".

Further, running php -Cr "echo 'test';" results in an error saying
that
the -r switch doesn't exist, even though it should if it were acting
like the CLI version.

This, coupled with the fact that the Windows installer doesn't seem to
install a seperate CLI exe means that, unless I'm missing something,
CLI isn't something that can be used on Windows, contrary to what the
docs say.

Am I missing something?
1 Answer Posted
Nik Coughin's Avatar
Guest - n/a Posts
#2: Re: CLI and Windows

yawnmoth wrote:[color=blue]
> The portion of the PHP manual entitled "Using PHP from the command
> line"
> states that "The CGI SAPI supports the CLI SAPI behaviour by means of
> the -C switch when run from the command line.":
>
> http://us2.php.net/features.commandline
>
> However, "php -h" says of the -C switch, "Do not chdir to the script's
> directory".
>
> Further, running php -Cr "echo 'test';" results in an error saying
> that
> the -r switch doesn't exist, even though it should if it were acting
> like the CLI version.
>
> This, coupled with the fact that the Windows installer doesn't seem to
> install a seperate CLI exe means that, unless I'm missing something,
> CLI isn't something that can be used on Windows, contrary to what the
> docs say.
>
> Am I missing something?[/color]

I use the CLI under Windows all the time. In <5 it was under it's own
folder called something like CLI, and with 5 php.exe is the CLI.


 
Not the answer you were looking for? Post your question . . .
197,026 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,026 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors