php-windows Digest 5 Jan 2010 17:54:26 -0000 Issue 3743
Topics (messages 29793 through 29797):
Re: PHP console (php.exe -a)
29793 by: Richard Quadling
29794 by: Richard Quadling
29795 by: Carsten Wiedmann
29796 by: Carsten Wiedmann
read an xml string from a form field
29797 by: Harpreet
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 ---
2009/12/30 Richard Quadling <rquadl...@googlemail.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.)
>>
>> 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
>
On the surface, for Windows, the interactive mode offers nothing extra
and in fact offers less than non-interactive mode.
Specifically, autoload functions, though registered (either by having
__autoload() or by using spl_autoload_register()), are not invoked for
missing classes.
So, for windows, what's the point of the interactive mode?
--
-----
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 ---
--- Begin Message ---
2009/12/30 Richard Quadling <rquadl...@googlemail.com>:
> 2009/12/30 Richard Quadling <rquadl...@googlemail.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.)
>>>
>>> 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
>>
>
> On the surface, for Windows, the interactive mode offers nothing extra
> and in fact offers less than non-interactive mode.
>
> Specifically, autoload functions, though registered (either by having
> __autoload() or by using spl_autoload_register()), are not invoked for
> missing classes.
>
> So, for windows, what's the point of the interactive mode?
>
>
> --
> -----
> 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
>
[2009/12/30 11:08:44] [C:\] [] >php -a
Interactive mode enabled
<?php
print_r(spl_autoload_functions());
echo static_Krypt::EnKryptB64('Hello');
^Z
Array
(
[0] => AutoLoadRAQ
)
Fatal error: Class 'static_Krypt' not found in - on line 3
[2009/12/30 11:09:42] [C:\] [] >php
<?php
print_r(spl_autoload_functions());
echo static_Krypt::EnKryptB64('Hello');
^Z
Array
(
[0] => AutoLoadRAQ
)
QJeZiALdGhA=
[2009/12/30 11:12:12] [C:\] [] >
--
-----
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 ---
--- Begin Message ---
Am 30.12.2009 11:56, schrieb Richard Quadling:
> As mentioned, CTRL+Z is the END-OF-TEXT character needed to terminate
> input from STDIN.
ctrl-z signals end-of-file. On *nix that's ctrl-d (ctrl-z on *nix is for job
control).
> [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).
An end-of-file signal also exiting PHP. So you can't type additional PHP code.
And you also don't see the main problem/difference:
With PHP5.2/*nix or PHP5.2/Win I can see the output from an echo() after a
<return>. With PHP5.3/Win (don't have PHP5.3/*nix) I must exit from PHP
(ctrl-z / ctrl-c) to see the output from an echo().
PHP5.2:
| D:\PHP\php-5.2.12-win32>php -n -a
| Interactive mode enabled
|
| <?php
| echo 'test';
| test^Z
|
| D:\PHP\php-5.2.12-win32>
PHP5.3:
| D:\PHP\php-5.3.1-win32>php -n -a
| Interactive mode enabled
|
| <?php
| echo 'test';
| ^Z
| test
| D:\PHP\php-5.3.1-win32>
So for now it looks like PHP5.3/Win is buffering the output (and the whole
buffer is flushed while PHP is exiting). PHP 5.2 is not buffering the output
and you can see the output immediately.
Regards,
Carsten
--- End Message ---
--- Begin Message ---
Am 30.12.2009 12:12, schrieb Richard Quadling:
>> Specifically, autoload functions, though registered (either by having
>> __autoload() or by using spl_autoload_register()), are not invoked for
>> missing classes.
>>
>> So, for windows, what's the point of the interactive mode?
>
> [2009/12/30 11:08:44] [C:\] [] >php -a
> Interactive mode enabled
>
> <?php
> print_r(spl_autoload_functions());
> echo static_Krypt::EnKryptB64('Hello');
> ^Z
> Array
> (
> [0] => AutoLoadRAQ
> )
>
> Fatal error: Class 'static_Krypt' not found in - on line 3
That's the same output you get on *nix. So no difference between *nix and
Windows in this point.
Regards,
Carsten
--- End Message ---
--- Begin Message ---
I have a simple form with a textarea to receive an xml string.
My xml string is something like this:
<Filter_1>
<Module_0></Module_0>
</Filter_1>
How can I request the value in my php page $_GET wont work.
--- End Message ---