PHP calls shell_exec. The process it starts ends but php does not continue from shell_exec

This problem is difficult to explain with text only. So therefore I have combined text and images to be able to explain it better.

I do not hope for another solution, I need to know what is happening right here so that I have a better understanding of the language

Take care

Post the code.

1 Like

Also tell us what happens when you don’t press Folder 2 first and press Folder 3 first. Does that work normally then? Does Folder 2 button then not work?

1 Like

https://github.com/somedudeokey/monitor/archive/refs/heads/main.zip

Here is all the files. Nothing is excluded.

If I press folder2 first then everything works as it should.
If I then press folder3, then there will be problems somewhere.
After I press folder3 and get unexpected results, I can continue to press folder2 with correct results.

If I press folder3 first then everything works as it should.
If I then press folder2, then there will be problems somewhere.
After I press folder2 and get unexpected results, I can continue to press folder3 with correct results.

WARNING: There is an executable .exe in the download.

OP, Why is there an executable .exe in your download?

It’s used in the project. It monitors a folder.
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)

What is the real problem you are trying to solve with this code?

The real problem is the problem which has been clearly explained in my post.

You didn’t understand what I was asking. What is the high level overview of what you have going on?

I still don’t understand you

What is this project about? If you were to describe it to someone so they could build it, what would you tell them about it? And why are you mixing C++ into this?

I really do not understand you. All details can be found in the post. If you are worried about the .exe file and what it does, all the instructions (5 lines of code) are there and can be read in the .cpp file. If you are not familiar with cpp code then I can tell you that all it does is monitor a “file path” in the file system, this “file path” is specified by monitor.php when executing the .exe file. Everything is there for you to see my friend.

Why I mix c++ into this is irrelevant, but my project requires it. I need to monitor folders and get information as soon as something happens in those folders (without repeatedly checking a file for updates)

That is what I was asking for.

Is this only going to run on a Windows machine?

1 Like

Good thing you asked that question. Yes, it’s windows code

Is it required that it be web based? There are numerous utilities already out there that will do what you want but they are not web based.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.