473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

real simple: I need a leg up to use CLI only under Win32

Yes, the online documentation is EXcellent! So I will be using the php.exe
in command line mode VERY SOON! I will readily pick up on ALL of the
wonderful ways to parse an input file and send output to the DOS console or
to a file.

This is a special but *utterly* rudimentary desired configuring of PHP
package. I downloaded the 7MB PHP package for Windows, unzipped it into a
directory, and now I want only to do ONE simple thing: use the command line
mode in order to check and see what HTML output will be produced by some
simple php scripts I am devising for someone very far away. My system is
Windows ME, and I'm not using ANY server, just the PHP.exe alone in command
line interpretation.

I tried to make it work by renaming the "php.ini-recommended" that ships
with the package, to the simple "php.ini". But so far no success. I can also
run this via the system's "Run" command line, but no go. I type "php -v",
hoping to see the version information. But the DOS execution window comes
and goes in an instant and I see nothing. So instead, I just double-click
the app "php.exe" and I get a DOS window. Now, the online documentation
claims that the command:
$ php -r 'var_dump($argv);' -h
should cause PHP to output its Help summary to my console, but I paste that
precise text into my blank window and hit Return, and I get nothing.

I need a teensy leg up, presumably. YES, I KNOW this can be achieved without
having ANY server on my PC! Don't tell me it can't be done cuz I know
better.

Please advise me how to get PHP CLI up and running, so that the command line
cited above, when entered, followed by Return, will print the Help summary,
and I'll happily take it from there, learning all the correct command
syntaxes from the comprehensive online documentation.

Thanks in advance! :)
I
Oct 4 '05 #1
7 1517
Ben Bean wrote:
I downloaded the 7MB PHP package for Windows, unzipped it into a
directory, and now I want only to do ONE simple thing: use the command line


1. Open a command window ("DOS Prompt").
2. Go to the drive and directory where you unzipped PHP. If that is
D:\PHP, that means typing the commands "d:" and "cd \php".
3. Type "php -v".

--
E. Dronkert
Oct 4 '05 #2
"Ewoud Dronkert" <fi*******@lastname.net.invalid> wrote in message
news:7s********************************@4ax.com...
Ben Bean wrote:
I downloaded the 7MB PHP package for Windows, unzipped it into a
directory, and now I want only to do ONE simple thing: use the command
line
1. Open a command window ("DOS Prompt").
2. Go to the drive and directory where you unzipped PHP. If that is
D:\PHP, that means typing the commands "d:" and "cd \php".
3. Type "php -v".


I really appreciate that leg up! Many thanks! But WME is one of those weird
exceptions.. it doesn't offer a DOS prompt, I'm pretty dang sure. Instead,
it offers a Start Menu>>Run command line that appears to work correctly for
the current frontmost opened Explorer Window being the start-in directory.
It's weird alright. When I typed "php -v" I saw the DOS-like window open,
and I think I saw it was entitled "php", and I saw some info appear real
fast before it all disappeared, and the php folder WAS my current frontmost
open Explorer window. Yea, I'm utterly lost. If I can't operate php.exe from
its own DOS-like window that appears when you plainly launch it, then I
don't know how I'll ever. Typing "cd", followed by anything, at System "Run"
command prompt, doesn't change directories... instead it simply looks for an
executable named "cd.exe" in the current implied directory. Arghh! Any more
advice please? ..it may help to be familiar with the idiosyncracies of WME.


Oct 4 '05 #3
Wow! almost there, I need just a teensy (weensy) leg up now! Please: indulge
me.

OK, I've discovered that if I simply type "php samplscrpt.php" at the System
"Run" command, while my php folder is topmost in Explorer, then php.exe DOES
dutifully interpret the input script and echo the desired HTML code to the
little DOS-like window. Arghh, but then the window immediately closes!

ALL I need now is a way to keep that window alive while I perform a Copy to
Clipboard of the output text, and that is ALL that I need of my humble free
php parser! OKAY? How do I do it??

Thank you.
Oct 4 '05 #4
Ben Bean wrote:
WME is one of those weird exceptions.. it doesn't offer a DOS prompt


Yes it does. Type "command" in the run box.

--
E. Dronkert
Oct 4 '05 #5
"Ewoud Dronkert" <fi*******@lastname.net.invalid> wrote in message
news:bf********************************@4ax.com...
Ben Bean wrote:
WME is one of those weird exceptions.. it doesn't offer a DOS prompt

Yes it does. Type "command" in the run box.
E. Dronkert


Great, thanks, that's a HUGE help! Now it's doable.

I am also aware how to create shortcuts in the same directory as php.exe,
wherein the app is called with arguments already specified via the
shortcut's Properties Box... but first I wanted to ensure that I was on the
right track.

One thing I notice is that I have to click the DOS window's Properties and
change Mouse usage to "Quick edit" before I am permitted to select an area
for Copying to clipboard. That is only slightly awkward yet I wonder if
there's an alternative, or a way to output directly to a file. I also
disparage ever-so slightly that returns need to be stripped from the Copied
text in order to precisely duplicate the actual output. But this is
definitely workable, and GREAT, Thanks!


Oct 4 '05 #6
"Ben Bean" <ka*************@sysmatrix.net> wrote:

I really appreciate that leg up! Many thanks! But WME is one of those weird
exceptions.. it doesn't offer a DOS prompt, I'm pretty dang sure.


Once again, I am absolutely astounded at the incredible success of the
Microsoft marketing machine in making its customers believe things that are
absolutely untrue.

Windows ME is not significantly different from Windows 95, and at its core
is not significantly different from Windows 3.1 plus the 32-bit extensions.
It still starts up as a straight MS-DOS command, and MS-DOS is still
lurking down there underneath.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Oct 6 '05 #7

"Tim Roberts" <ti**@probo.com> wrote in message
news:75********************************@4ax.com...
"Ben Bean" <ka*************@sysmatrix.net> wrote:

I really appreciate that leg up! Many thanks! But WME is one of those weirdexceptions.. it doesn't offer a DOS prompt, I'm pretty dang sure.
Once again, I am absolutely astounded at the incredible success of the
Microsoft marketing machine in making its customers believe things that

are absolutely untrue.

Windows ME is not significantly different from Windows 95, and at its core
is not significantly different from Windows 3.1 plus the 32-bit extensions. It still starts up as a straight MS-DOS command, and MS-DOS is still
lurking down there underneath.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.


Yeah OK, but I don't have a lot of use for DOS and who would? ..so I got
derailed. I'm very fortunate to have asked at the right forum. And I'm REAL
fortunate to have stumbled onto the ">" construct in the command line which
makes it a breeze to send my PHP parsing output directly to a file and so
not have to mess with that mouse usage parameter or errant returns in my
data. Wow, y'can't argue w/success!
Oct 8 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Grant Edwards | last post by:
I finally figured out why one of my apps sometimes fails under Win32 when it always works fine under Linux: Under Win32, the pickle module only works with a subset of floating point values. In...
18
by: Ken | last post by:
Hi. Can anyone refer me to any articles about the compatibility between c++ polymorphism and real-time programming? I'm currently on a real-time c++ project, and we're having a discussion...
5
by: Ken Varn | last post by:
I have a named mutex object that is accessed by both an asp.net application and a Windows executable .net application. The Windows executable runs under the administrator logon, while the asp.net...
5
by: Rich | last post by:
I have a simple, single threaded program in C++ that runs as Idle priority. The program creates some data which needs dumping to file if the computer is shutdown or logged out. At the moment...
1
by: Mr Roboto | last post by:
Folks: I've already searched the group and have determined there *are* char I/O based input systems, ala NCURSES, that are Python-compatible (ie. PyNCurses, UrWid, etc.) What I *need* is...
28
by: Tim Daneliuk | last post by:
I have a program wherein I want one behavior when a file is set as executable and a different behavior if it is not. Is there a simple way to determine whether a given named file is executable...
10
true911m
by: true911m | last post by:
This is a simple walkthrough to get PyInstaller up and running. I decided to give PI a try, because it claims to be more selective about what it bundles into its executable files by default, and...
14
by: Bill Reid | last post by:
OK, let's say that have a function menu structure declaration like this (since I basically do): typedef struct function_item { char *descrip; void(*function)(void); } t_function_item; ...
2
by: W. eWatson | last post by:
I'm going to try another stab at this problem again. I'd like someone with 2.4.4 and matplotlib-0.98.3.win32-py2.4exe to try it (below). It produces a runtime error, and python (IDLE) dies. If I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.