Bug #61378 [Com]: php -H doesn't work
Edit report at https://bugs.php.net/bug.php?id=61378&edit=1 ID: 61378 Comment by: rk at srsbiz dot pl Reported by:vr...@php.net Summary:php -H doesn't work Status: Open Type: Bug Package:CGI/CLI related Operating System: Irrelevant PHP Version:5.4.0 Block user comment: N Private report: N New Comment: This switch works, but does not hide arguments from running script (that would be rather pointless to pass arguments and switch to make them inaccessible) but from other users using same server (using 'ps aux' for example). Try for yourself: test.php: php test.php --mypass=adminadmin on second terminal: ps aux | grep adminadmin expected output: root 9627 0.0 0.0 3256 740 pts/2S+ 21:09 0:00 php test.php --mypass=adminadmin now try running with -H: php -H test.php --mypass=adminadmin and on second trerminal you should have no match, while greping only for php, you may find it, without any arguments: ps aux | grep php root 10012 0.8 0.8 44524 9156 pts/1S+ 21:10 0:00 php Previous Comments: [2012-03-13 19:45:21] vr...@php.net The following patch has been added/updated: Patch Name: hide-args.patch Revision: 1331667921 URL: https://bugs.php.net/patch-display.php?bug=61378&patch=hide-args.patch&revision=1331667921 [2012-03-13 19:44:54] vr...@php.net Description: `php -H` or `php --hide-args` should hide passed arguments from the running script but it does nothing. I've tried it on Windows and Linux. I think that this feature can be safely removed because it doesn't work for ages (at least since PHP 5.2.10 but probably longer) and I see only a little value in it. It is also the only undocumented option at http://php.net/features.commandline.options Test script: --- php -H argv.php a b argv.php: Expected result: Array ( ) Actual result: -- Array ( [0] => argv.php [1] => a [2] => b ) -- Edit this bug report at https://bugs.php.net/bug.php?id=61378&edit=1
Bug #61044 [Com]: invalid PHP_BINDIR
Edit report at https://bugs.php.net/bug.php?id=61044&edit=1 ID: 61044 Comment by: rk at srsbiz dot pl Reported by:bugzilla33 at gmail dot com Summary:invalid PHP_BINDIR Status: Assigned Type: Bug Package:Unknown/Other Function Operating System: win 7 PHP Version:5.4.0RC7 Assigned To:pajoye Block user comment: N Private report: N New Comment: It is not only Windows problem: root@core /# /root/src/php5.4-201202102030/sapi/cli/php -r 'echo PHP_BINDIR . PHP_EOL;'; /usr/local/php54/bin root@core /# It always point to directory provided in --prefix at compile time. Previous Comments: [2012-02-10 22:19:06] johan...@php.net This is defined while compiling PHP (prefix-option from compile.js), the way to fix this would be to do some run-time detection, not sure whether there's a proper way. [2012-02-10 18:05:38] anon at anon dot anon He's right. This seems to be totally broken on Windows: C:\>server\php\php.exe --version PHP 5.3.2 (cli) (built: Mar 3 2010 19:40:13) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans C:\>server\php\php.exe -r "echo PHP_BINDIR"; C:\php5 [2012-02-10 13:42:02] bugzilla33 at gmail dot com Description: Install php in folder c:\Php5 As module apache Test script: --- Expected result: c:\Php5 Actual result: -- c:\Php -- Edit this bug report at https://bugs.php.net/bug.php?id=61044&edit=1
Bug #60683 [Com]: Interactive Mode doesn't reach prompt
Edit report at https://bugs.php.net/bug.php?id=60683&edit=1 ID: 60683 Comment by: rk at srsbiz dot pl Reported by:da...@php.net Summary:Interactive Mode doesn't reach prompt Status: Open Type: Bug Package:CGI/CLI related Operating System: OSX 10.7.2 & Ubuntu 11.04 PHP Version:5.4.0RC5 Block user comment: N Private report: N New Comment: @dragoonis readline is only required to make this mode truly interactive (with command history, function completion etc), but it also works without it. You can type/paste your code and it will be executed as soon as EOF (^D) is reached, so it's rather documentation problem. Previous Comments: [2012-01-15 01:58:33] dragoo...@php.net @rk, If there's support required for another library then it shouldn't let you enter interactive mode, and back out, giving you a useful error message to tell you there are missing dependencies.. -------- [2012-01-13 21:45:44] rk at srsbiz dot pl IMHO it's not a bug, to have interactive shell you have to configure with readline support, not just clean './configure' [2012-01-08 05:37:10] dragoo...@php.net I confirmed this case with davey on Mac OSX Lion Darwin Paul-Dragooniss-MacBook-Pro.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64 05:10 macosx lion.. My build details are: -- bash-3.2$ ../build/bin/php -v PHP 5.4.0RC6-dev (cli) (built: Jan 8 2012 03:03:04) (DEBUG) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies Thanks. [2012-01-08 05:31:44] da...@php.net Description: * Using OS X Lion 10.7.2 or Ubuntu 11.04 (Natty), and basic "./configure". If you run php -a, you never reach the prompt, and nothing entered will work. All you can do is ^C to kill it. Setting cli.prompt does not help. Test script: --- $ php -a Expected result: $ php -a Interactive mode enabled php > Actual result: -- $ php -a Interactive mode enabled (wait. wait. wait.) ^C Backtrace if helpful: #0 0x7fff87f6ad52 in read$NOCANCEL () #1 0x7fff86883c25 in _sread () #2 0x7fff86884166 in __srefill1 () #3 0x7fff86884cb2 in __fread () #4 0x7fff86884b34 in fread () #5 0x00010028744c in zend_stream_getc [inlined] () at /Users/davey/src/php- 5.4.0RC5/Zend/zend_stream.c:148 #6 0x00010028744c in zend_stream_read (file_handle=0x0, buf=0x1009356a0 "? V?", len=4096) at zend_stream.c:168 #7 0x0001002878fb in zend_stream_fixup (file_handle=0x0, buf=0x7fff5fbfecc0, len=0x7fff5fbfecb8) at zend_stream.c:262 #8 0x0001002493be in open_file_for_scanning (file_handle=0x7fff5fbff958) at zend_language_scanner.l:483 #9 0x00010024a190 in compile_file (file_handle=0x7fff5fbff958, type=8) at zend_language_scanner.l:566 #10 0x000100159ba2 in phar_compile_file (file_handle=0x0, type=1606414144) at phar.c:3391 #11 0x000100272b57 in zend_execute_scripts (type=8, retval=0x7fff5fbff0a0, file_count=1606414496) at zend.c:1264 #12 0x0001002170e2 in php_execute_script (primary_file=0x7fff5fbff958) at main.c:2476 #13 0x0001002ff3e5 in do_cli [inlined] () at /Users/davey/src/php- 5.4.0RC5/sapi/cli/php_cli.c:983 #14 0x0001002ff3e5 in main (argc=1606417184, argv=0x0) at php_cli.c:1356 -- Edit this bug report at https://bugs.php.net/bug.php?id=60683&edit=1
Bug #60683 [Com]: Interactive Mode doesn't reach prompt
Edit report at https://bugs.php.net/bug.php?id=60683&edit=1 ID: 60683 Comment by: rk at srsbiz dot pl Reported by:da...@php.net Summary:Interactive Mode doesn't reach prompt Status: Open Type: Bug Package:CGI/CLI related Operating System: OSX 10.7.2 & Ubuntu 11.04 PHP Version:5.4.0RC5 Block user comment: N Private report: N New Comment: IMHO it's not a bug, to have interactive shell you have to configure with readline support, not just clean './configure' Previous Comments: [2012-01-08 05:37:10] dragoo...@php.net I confirmed this case with davey on Mac OSX Lion Darwin Paul-Dragooniss-MacBook-Pro.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64 05:10 macosx lion.. My build details are: -- bash-3.2$ ../build/bin/php -v PHP 5.4.0RC6-dev (cli) (built: Jan 8 2012 03:03:04) (DEBUG) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies Thanks. [2012-01-08 05:31:44] da...@php.net Description: * Using OS X Lion 10.7.2 or Ubuntu 11.04 (Natty), and basic "./configure". If you run php -a, you never reach the prompt, and nothing entered will work. All you can do is ^C to kill it. Setting cli.prompt does not help. Test script: --- $ php -a Expected result: $ php -a Interactive mode enabled php > Actual result: -- $ php -a Interactive mode enabled (wait. wait. wait.) ^C Backtrace if helpful: #0 0x7fff87f6ad52 in read$NOCANCEL () #1 0x7fff86883c25 in _sread () #2 0x7fff86884166 in __srefill1 () #3 0x7fff86884cb2 in __fread () #4 0x7fff86884b34 in fread () #5 0x00010028744c in zend_stream_getc [inlined] () at /Users/davey/src/php- 5.4.0RC5/Zend/zend_stream.c:148 #6 0x00010028744c in zend_stream_read (file_handle=0x0, buf=0x1009356a0 "? V?", len=4096) at zend_stream.c:168 #7 0x0001002878fb in zend_stream_fixup (file_handle=0x0, buf=0x7fff5fbfecc0, len=0x7fff5fbfecb8) at zend_stream.c:262 #8 0x0001002493be in open_file_for_scanning (file_handle=0x7fff5fbff958) at zend_language_scanner.l:483 #9 0x00010024a190 in compile_file (file_handle=0x7fff5fbff958, type=8) at zend_language_scanner.l:566 #10 0x000100159ba2 in phar_compile_file (file_handle=0x0, type=1606414144) at phar.c:3391 #11 0x000100272b57 in zend_execute_scripts (type=8, retval=0x7fff5fbff0a0, file_count=1606414496) at zend.c:1264 #12 0x0001002170e2 in php_execute_script (primary_file=0x7fff5fbff958) at main.c:2476 #13 0x0001002ff3e5 in do_cli [inlined] () at /Users/davey/src/php- 5.4.0RC5/sapi/cli/php_cli.c:983 #14 0x0001002ff3e5 in main (argc=1606417184, argv=0x0) at php_cli.c:1356 -- Edit this bug report at https://bugs.php.net/bug.php?id=60683&edit=1