Bug #81663 [Com]: PHP calls shell_exec. The process it starts ends but php does not continue from
| From: | arian_a at hotmail dot se | Date: | Mon, 13 Dec 2021 23:15:13 +0000 |
| Subject: | Bug #81663 [Com]: PHP calls shell_exec. The process it starts ends but php does not continue from | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-238386@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81663&edit=1
ID: 81663
Comment by: arian_a at hotmail dot se
Reported by: arian_a at hotmail dot se
Summary: PHP calls shell_exec. The process it starts ends but
php does not continue from
Status: Not a bug
Type: Bug
Package: Program Execution
Operating System: win 10
PHP Version: 8.0.13
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I wrote wrong at the beginning of my last comment. This is how it should be instead:
test1, test2 and test3.html, they all make a request onload to monitor.php (NOT to insert.php)
Previous Comments:
------------------------------------------------------------------------
[2021-12-13 23:10:56] arian_a at hotmail dot se
"The problem is your code, since
you first modify the file(s), and then execute pathmonitor.exe
which waits possibly indefinitely for modifications"
This is not true.
test1, test2 and test3.html, they all make a request onload to insert.php which starts
pathmonitor.exe. At this point pathmonitor.exe is waiting for something to happen.
Then after that use "write-buttons.html" to write in the folders.
This is what the program should do, no matter which buttons you press, two folders gets a write (One
folder is one of the options in "write-buttons.html", the other folder is folder1). When
the write happens the ajax request is returned and new request is sent back to start a new wait.
It works in the beginning, but then after some "button pressing", one of the two ajax
requests that should return doesn't return.
So I still belive it's a bugg, don't you think?
------------------------------------------------------------------------
[2021-11-29 12:18:24] cmb@php.net
I don't see a bug in PHP here. The problem is your code, since
you first modify the file(s), and then execute pathmonitor.exe
which waits possibly indefinitely for modifications.
Additionally, you should not pass the name of a file to
pathmonitor.exe, but rather its directory:
shell_exec("pathmonitor.exe " . dirname($_GET['path']));
------------------------------------------------------------------------
[2021-11-26 23:34:46] arian_a at hotmail dot se
Description:
------------
This problem is difficult to explain with text only. So therefore I have combined text and images to
be able to explain it better.
The explanations can be found in the links below. (The links show you how to reproduce the bugg.)
The links should be read in the same order as they appear.
1.
https://i.ibb.co/dj10yqP/1eng.png
2.
https://i.ibb.co/1zwLwQ6/2eng.png
3.
https://i.ibb.co/pxY5GN9/3eng.png
4.
https://i.ibb.co/ggpZXKk/4-eng.png
Here is all the files used in the project. Nothing is excluded
https://github.com/somedudeokey/monitor/archive/refs/heads/main.zip
Pathmonitor.exe was created with pathmonitor.cpp.
If you do not trust the .exe file, you can create the same .exe by using the .cpp file
(pathmonitor.cpp)
Take care
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81663&edit=1