NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
php command line


Joined: 04 Nov 2009
Posts: 37
Reply with quote
how can I write commands in command line window

want to use the php that nushpere uses

c:/programfiles/domcuments/nusphere/phped54/php.exe
View user's profileFind all posts by jerseyguy0Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
The Immediate panel allows you to enter any PHP statement whilst you are debugging. If you are not debugging, you cannot use Immediate.

When PhpED evaluates a statement, it works just like PHP and the final result is the value of the statement. So if you enter a function, then PhpED will display the result.

Watch out for using statements that return arrays and large objects; it can take a while for PhpED to format the result and display it. With *very* large objects it can even take minutes, but for most results it is instant or a few seconds.
View user's profileFind all posts by plugnplaySend private message
how-to-run-immediate-window-command


Joined: 04 Nov 2009
Posts: 37
Reply with quote
how-to-run-immediate-window-command


I can not upload screenshot because error with postimage.org

I see a immediate textarea window but there is no run button.
View user's profileFind all posts by jerseyguy0Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
The Immediate panel allows a single line statement to be entered, then you press Return to run it.

It will only work whilst debugging and whilst the PHP script is at a breakpoint; Immediate works by sending the statement through the debugger.
View user's profileFind all posts by plugnplaySend private message


Joined: 04 Nov 2009
Posts: 37
Reply with quote
Quote:
It will only work whilst debugging and whilst the PHP script is at a breakpoint; Immediate works by sending the statement through the debugger.


I want to type
pear install html_quickform2
in command window
View user's profileFind all posts by jerseyguy0Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Sounds like you want a Windows command window, not PhpED.

From Linux shell your command would use the pear binary. I'm not that familiar with PEAR on Windows so can't assist with the specifics.
View user's profileFind all posts by plugnplaySend private message


Joined: 04 Nov 2009
Posts: 37
Reply with quote
Quote:
Sounds like you want a Windows command window, not PhpED.


I tried both

nusphere/phped54/php.exe

and
cmd.exe

cd nusphere/phped54/
php.exe


but commands are not recognized.

For example I type
php -v
and do not get a response.

Same with nusphere immediate window. I can type, but I do not get a response.
View user's profileFind all posts by jerseyguy0Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
If you are on a 64-bit system then use Program Files (x86) on 32-bit just Program Files:

Code:
C:\Program Files (x86)\NuSphere\PhpED\php54>php -v
PHP 5.4.23 (cli) (built: Dec 11 2013 00:56:37)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with DBG v6.2.1, (C) 2000,2014, by Dmitri Dmitrienko


I've already said that the Immediate panel only works whilst debugging. It will not work whilst not debugging and it only accepts PHP statements, which are executed through the debugger, within the context of the PHP that you are debugging. So you can do things like test statements that utilise script variables.

You cannot run scripts (eg enter file names) through the Immediate panel, you can only enter single line PHP statements.

If you want tun run php.exe directly then you cannot use Immediate, you must use Windows command prompt.
View user's profileFind all posts by plugnplaySend private message


Joined: 04 Nov 2009
Posts: 37
Reply with quote
thanks for showing me php on cmd.exe

C:\Program Files (x86)\NuSphere\PhpED>dir
Volume in drive C is ACER
Volume Serial Number is A4DC-28C4

Directory of C:\Program Files (x86)\NuSphere\PhpED

03/17/2014 11:02 PM <DIR> .
03/17/2014 11:02 PM <DIR> ..
03/17/2014 11:02 PM <DIR> php
03/17/2014 11:02 PM <DIR> php5
03/17/2014 11:02 PM <DIR> php54
0 File(s) 0 bytes
5 Dir(s) 8,306,847,744 bytes free

C:\Program Files (x86)\NuSphere\PhpED>cd php54

C:\Program Files (x86)\NuSphere\PhpED\php54>dir
Volume in drive C is ACER
Volume Serial Number is A4DC-28C4

Directory of C:\Program Files (x86)\NuSphere\PhpED\php54

03/17/2014 11:02 PM <DIR> .
03/17/2014 11:02 PM <DIR> ..
03/17/2014 11:02 PM <DIR> extensions
03/17/2014 11:02 PM <DIR> extras
12/11/2013 02:22 AM 1,377,280 glib-2.dll
12/11/2013 02:22 AM 16,384 gmodule-2.dll
12/11/2013 02:22 AM 17,956,864 icudt49.dll
12/11/2013 02:22 AM 1,686,528 icuin49.dll
12/11/2013 02:22 AM 47,104 icuio49.dll
12/11/2013 02:22 AM 196,096 icule49.dll
12/11/2013 02:22 AM 44,032 iculx49.dll
12/11/2013 02:22 AM 55,808 icutest49.dll
12/11/2013 02:22 AM 147,456 icutu49.dll
12/11/2013 02:22 AM 1,289,728 icuuc49.dll
12/11/2013 02:22 AM 86,061 install.txt
12/11/2013 02:22 AM 1,020,416 libeay32.dll
12/11/2013 02:22 AM 43,008 libenchant.dll
12/11/2013 02:22 AM 44,544 libenchant_ispell.dll
12/11/2013 02:22 AM 293,888 libenchant_myspell.dll
12/11/2013 02:22 AM 97,792 libpq.dll
12/11/2013 02:22 AM 68,608 libsasl.dll
12/11/2013 02:22 AM 3,286 license.txt
12/11/2013 02:22 AM 421,664 news.txt
12/11/2013 02:22 AM 39 phar.phar.bat
12/11/2013 02:22 AM 53,240 pharcommand.phar
12/11/2013 02:22 AM 49,152 php-cgi.exe
12/11/2013 02:22 AM 26,624 php-win.exe
12/11/2013 02:22 AM 61,440 php.exe
12/11/2013 02:22 AM 2,523 php.gif
03/17/2014 11:02 PM 69,235 php.ini
04/30/2004 03:37 PM 0 php.ini-bak
12/11/2013 02:22 AM 68,786 php.ini-development
12/11/2013 02:22 AM 68,818 php.ini-production
12/11/2013 02:22 AM 26,112 php5apache2_2.dll
12/11/2013 02:22 AM 23,552 php5apache2_2_filter.dll
12/11/2013 02:22 AM 26,624 php5apache2_4.dll
12/11/2013 02:22 AM 19,456 php5nsapi.dll
12/11/2013 02:22 AM 6,123,008 php5ts.dll
12/11/2013 02:22 AM 135 pws-php5cgi.reg
12/11/2013 02:22 AM 139 pws-php5isapi.reg
12/11/2013 02:22 AM 21,360 readme-redist-bins.txt
12/11/2013 02:22 AM 1,170 snapshot.txt
12/11/2013 02:22 AM 214,016 ssleay32.dll
03/17/2014 11:02 PM 19,641 unins000.dat
03/17/2014 11:02 PM 429,360 unins000.exe
03/17/2014 11:02 PM 21,091 unins000.msg
42 File(s) 32,222,068 bytes
4 Dir(s) 8,306,847,744 bytes free

C:\Program Files (x86)\NuSphere\PhpED\php54>php-cli.exe
'php-cli.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\NuSphere\PhpED\php54>php-win.exe

C:\Program Files (x86)\NuSphere\PhpED\php54>php -v
PHP 5.4.23 (cli) (built: Dec 11 2013 00:56:37)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with DBG v6.1.7, (C) 2000,2014, by Dmitri Dmitrienko

C:\Program Files (x86)\NuSphere\PhpED\php54>pear install html_quickform2
'pear' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\NuSphere\PhpED\php54>php pear install html_quickform2
Could not open input file: pear

















but I can not do pear command
View user's profileFind all posts by jerseyguy0Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
There is not a php-cli so that not working is as expected. Have a look at http://www.php.net/manual/en/migration5.cli-cgi.php

On Linux pear is a binary, so you can use it directly from the command prompt.

I don't use PEAR on Windows so I don't know how best to install PEAR stuff, but after your php command you need to specify a path to a PHP script and it looks like PHP cannot find a script called pear.

EDIT: PEAR on Windows appears to have a pear.bat which you can use from the command prompt.
View user's profileFind all posts by plugnplaySend private message
php command line
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic