Bug #74849 [Csd]: Process is started as interactive shell in PhpStorm
| From: | ab@php.net | Date: | Mon, 24 Jul 2017 09:40:14 +0000 |
| Subject: | Bug #74849 [Csd]: Process is started as interactive shell in PhpStorm | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210260@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74849&edit=1
ID: 74849
Updated by: ab@php.net
Reported by: svetlana dot zemlyanskaya at jetbrains dot com
Summary: Process is started as interactive shell in PhpStorm
Status: Closed
Type: Bug
Package: CGI/CLI related
Operating System: Windows 10
PHP Version: 7.2.0alpha2
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
@piven dot m at gmail dot com thanks for the message.
I don't reproduce this, see below. From the description also, it doesn't seem like same
issue. If you still think it's related to php, please gather more info and file a separate
ticket.
[test]
$ type bugs\bug74849\x.bat
@echo off
x64\Release_TS\php.exe -n -f "bugs\bug74849\x.php"
pause
$ type bugs\bug74849\x.php
<?php
echo "hello\n";
$ bugs\bug74849\x.bat
hello
Press any key to continue . . .
[/test]
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-07-24 09:26:09] piven dot m at gmail dot com
OS: Win7 (x64)
PHP: 7.2.0 beta 1
This is not PhpStorm bug - i reproduce it in simple windows batch file with this content:
@echo off
d:\web\php7.2.0b1\php.exe -f "d:\php\test.php"
pause
If i delete first line (@echo off) or execute second line (d:\web\php7.2.0b1\php.exe -f
"d:\php\test.php") from windows shell - all is ok, i'we got "Hello World!"
from script output.
After several tests, I realized that the problem in the line (@echo off).
------------------------------------------------------------------------
[2017-07-04 12:23:01] ab@php.net
Many thanks for checking. The fix is included with the upcoming alpha3 this week.
Thanks.
------------------------------------------------------------------------
[2017-07-04 12:08:33] svetlana dot zemlyanskaya at jetbrains dot com
Great, thank you! Build from master (Revision: r10dbc0b (July 04 2017, 13:03:13)) works perfectly.
------------------------------------------------------------------------
[2017-07-04 11:30:31] ab@php.net
@danack, oh, good to know, thanks :)
Thanks for the further info, svetlana dot zemlyanskaya at jetbrains dot com. I've found a
better way to achieve automatic interactive console activation and pushed a fix yesterday. Could you
please check the latest master snapshots ? http://windows.php.net/snapshots/
About the programmatic process creation - nope, seems PhpStorm is doing something a bit different.
Fe all our test suite uses proc_open to invoke a test. And also there was no fails with other use
cases. A child process always will have its own console, and that console gets destroyed at the
process end.
Thanks.
------------------------------------------------------------------------
[2017-07-04 09:26:57] svetlana dot zemlyanskaya at jetbrains dot com
You don't need a license to reproduce, trial version would work fine.
In PhpStorm process is created by
ProcessBuilder
(https://docs.oracle.com/javase/tutorial/essential/concurrency/procthread.html) but I think any
programmatically created process will reproduce the issue. It's important to start a php
process without corresponding console process.
In PhpStorm you can reproduce the issue with these steps:
1) Open a folder with a PHP script in PhpStorm.
2) Open Settings page by "File | Settings" for Windows.
3) Configure PHP Interpreter in "Language & Frameworks | PHP" inside setting.
4) Navigate to a PHP script and invoke the context menu.
5) Select "Run" option and then the one which contains "php" in its icon.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74849
--
Edit this bug report at https://bugs.php.net/bug.php?id=74849&edit=1