php-windows Digest 30 Dec 2009 10:57:06 -0000 Issue 3742

Topics (messages 29784 through 29792):

Re: PHP console (php.exe -a)
        29784 by: Carsten Wiedmann
        29785 by: Ferenc Kovacs
        29786 by: Pierre Joye
        29787 by: Ferenc Kovacs
        29788 by: Louis Solomon
        29789 by: Libor Jelinek
        29790 by: Carsten Wiedmann
        29791 by: Sascha Meyer
        29792 by: Richard Quadling

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Am 27.12.2009 23:44, schrieb Sascha Meyer:
>> | echo $a.PHP_EOL;
>> |
>> Nothing happens on Windows at this point. The cursor is in the next line
>> waiting for input. But, if I now enter "^C", I can see the result:
>> | 6
>> |
>> | #
>> So on Windows the whole code/input is executed at once and not step by
>> step.
>> And because PHP is also terminated with "^C", I can't enter additional
>> code.
> 
> just tried with PHP 5.3 on XP and Windows 7 and both directly output code 
> when the echo command is called, not when the script is terminated. 
> Which PHP version did you use that shows the buggy behaviour?

All PHP 5.3.x versions. With PHP 5.2.x it's correct and the same behavior
like on *nix.

Just curious, if I test this more then one time, sometimes I can see the
output with "^C", and sometimes not?

BTW: It's always a VC6-TS build and XP SP3 32bit.

Regards,
Carsten



--- End Message ---
--- Begin Message ---
On Mon, Dec 28, 2009 at 12:00 PM, Carsten Wiedmann <carsten_st...@gmx.de> wrote:
> Am 27.12.2009 23:44, schrieb Sascha Meyer:
>>> | echo $a.PHP_EOL;
>>> |
>>> Nothing happens on Windows at this point. The cursor is in the next line
>>> waiting for input. But, if I now enter "^C", I can see the result:
>>> | 6
>>> |
>>> | #
>>> So on Windows the whole code/input is executed at once and not step by
>>> step.
>>> And because PHP is also terminated with "^C", I can't enter additional
>>> code.
>>
>> just tried with PHP 5.3 on XP and Windows 7 and both directly output code 
>> when the echo command is called, not when the script is terminated.
>> Which PHP version did you use that shows the buggy behaviour?
>
> All PHP 5.3.x versions. With PHP 5.2.x it's correct and the same behavior
> like on *nix.
>
> Just curious, if I test this more then one time, sometimes I can see the
> output with "^C", and sometimes not?
>
> BTW: It's always a VC6-TS build and XP SP3 32bit.
>
php-5.3.1-Win32-VC9-x86 for me, and Im seeing the same behaviour.

Tyrael
> Regards,
> Carsten
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
2009/12/27 Libor <ljeli...@virtage.com>:
> Hi all,
> I don't know if I am stupid or what but I can't find out how to send typed
> code to execute.
>
>> php.exe -a
> Interactive mode enabled
>
> Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!
>
> (I am running PHP 5.3.0 on Win XP.)
>

As far as I remember the interactive mode never got ported to windows.

PS: interactive mode means that you can enter php line of code and
they will be executed everytime you press enter.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
nice :D

Tyrael

On Mon, Dec 28, 2009 at 1:47 PM, Pierre Joye <pierre....@gmail.com> wrote:
> 2009/12/27 Libor <ljeli...@virtage.com>:
>> Hi all,
>> I don't know if I am stupid or what but I can't find out how to send typed
>> code to execute.
>>
>>> php.exe -a
>> Interactive mode enabled
>>
>> Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!
>>
>> (I am running PHP 5.3.0 on Win XP.)
>>
>
> As far as I remember the interactive mode never got ported to windows.
>
> PS: interactive mode means that you can enter php line of code and
> they will be executed everytime you press enter.
>
> Cheers,
> --
> Pierre
>
> http://blog.thepimp.net | http://www.libgd.org
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
> ... But, if I now enter "^C" ...
 
although maybe not a solution to php being a strange beast, IIFC Ctrl-Z is the 
normal way to terminate input via stdin.
 
Louis Solomon
www.SteelBytes.com <http://www.steelbytes.com/> 
 

________________________________

From: news on behalf of Carsten Wiedmann
Sent: Mon 2009/12/28 10:00 PM
To: php-wind...@lists.php.net
Subject: [PHP-WIN] Re: PHP console (php.exe -a)



Am 27.12.2009 23:44, schrieb Sascha Meyer:
>> | echo $a.PHP_EOL;
>> |
>> Nothing happens on Windows at this point. The cursor is in the next line
>> waiting for input. But, if I now enter "^C", I can see the result:
>> | 6
>> |
>> | #
>> So on Windows the whole code/input is executed at once and not step by
>> step.
>> And because PHP is also terminated with "^C", I can't enter additional
>> code.
>
> just tried with PHP 5.3 on XP and Windows 7 and both directly output code 
> when the echo command is called, not when the script is terminated.
> Which PHP version did you use that shows the buggy behaviour?

All PHP 5.3.x versions. With PHP 5.2.x it's correct and the same behavior
like on *nix.

Just curious, if I test this more then one time, sometimes I can see the
output with "^C", and sometimes not?

BTW: It's always a VC6-TS build and XP SP3 32bit.

Regards,
Carsten



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
It's not good message for me but thank you for definitive answer.
Libor


2009/12/28 Pierre Joye <pierre....@gmail.com>:
> 2009/12/27 Libor <ljeli...@virtage.com>:
>> Hi all,
>> I don't know if I am stupid or what but I can't find out how to send typed
>> code to execute.
>>
>>> php.exe -a
>> Interactive mode enabled
>>
>> Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!
>>
>> (I am running PHP 5.3.0 on Win XP.)
>>
>
> As far as I remember the interactive mode never got ported to windows.
>
> PS: interactive mode means that you can enter php line of code and
> they will be executed everytime you press enter.
>
> Cheers,
> --
> Pierre
>
> http://blog.thepimp.net | http://www.libgd.org
>

--- End Message ---
--- Begin Message ---
Am 28.12.2009 13:47, schrieb Pierre Joye:
> 2009/12/27 Libor <ljeli...@virtage.com>:
>> Hi all,
>> I don't know if I am stupid or what but I can't find out how to send typed
>> code to execute.
> 
> As far as I remember the interactive mode never got ported to windows.

OK, but as you can read in my other Mail, it's working with PHP 5.2.x on
Windows exactly like on *nix. Only PHP 5.3.x is not working correctly on
Windows.

Maybe a silly question:
If it's not ported to Windows, why is "php -a" working, the "-a" parameter
is exepted?

Regards,
Carsten


--- End Message ---
--- Begin Message ---
Hi all,

had to check my php installation today and just realized that php.exe called 
from command line was not the same as used by my Apache2 webserver (because of 
different locations set in PATH and PHPRC environment variables).

Means that my test from yesterday was not performed with PHP 5.3.x, but with 
5.2.9. The 5.2.x branch seems to work correctly whereas 5.3.x is definitely 
broken.

Pierre wrote:
> As far as I remember the interactive mode never got ported to windows.

you are talking about the newer PHP 5.3 branch, right? Otherwise 5.2.x versions 
would behave as the 5.3 branch. Do you know why it was not ported?

Regards,

Sascha

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

--- End Message ---
--- Begin Message ---
2009/12/27 Libor <ljeli...@virtage.com>:
> Hi all,
> I don't know if I am stupid or what but I can't find out how to send typed
> code to execute.
>
>> php.exe -a
> Interactive mode enabled
>
> Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!
>
> (I am running PHP 5.3.0 on Win XP.)
>
> Thanks
> Libor
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

As mentioned, CTRL+Z is the END-OF-TEXT character needed to terminate
input from STDIN.

[2009/12/30 10:56:09] [C:\] [] >php -v
PHP 5.3.2-dev (cli) (built: Dec 18 2009 13:57:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

[2009/12/30 10:56:11] [C:\] [] >php -a
Interactive mode enabled

Plain text.
$a = "This is still plain text and not assigning anything to $a.";
The next line is switching to PHP processing.
<?php
// This is a comment.
$b = "The first variable PHP is seeing is this one.";
echo $a;
echo $b;
// Switch out of PHP again.
?>
This is some more plain text.
To make this all go, press CTRL+Z or F6 and then ENTER (at least for Windows).
^Z
Plain text.
$a = "This is still plain text and not assigning anything to $a.";
The next line is switching to PHP processing.

Notice: Undefined variable: a in - on line 7
The first variable PHP is seeing is this one.This is some more plain text.
To make this all go, press CTRL+Z or F6 and then ENTER (at least for Windows).




Can someone confirm that CTRL+Z/F6 is the same exit mechanism for non
windows please? If so, I'll update the manual with something relevant.

Regards,

Richard Quadling.

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--- End Message ---

Reply via email to