Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP sub-processes: Source stderr output from php://stderr, not /tmp/stderr #1071

Open
adamziel opened this issue Feb 29, 2024 · 0 comments
Open
Labels
[Aspect] Website [Feature] PHP.wasm [Type] Bug An existing feature does not function as intended

Comments

@adamziel
Copy link
Collaborator

#1069 introduced a sub-process spawning mechanics. Unfortunately, it got something wrong – it mocks a CLI environment by defining STDIN, STDOUT, and STDERR streams, and the STDERR stream points to the /tmp/stderr file which got renamed to /internal/stderr:

define('STDIN', fopen('php://stdin', 'rb'));
define('STDOUT', fopen('php://stdout', 'wb'));
define('STDERR', fopen('/tmp/stderr', 'wb'));

It should either be updated to /internal/stderr or to php://stderr actually. I'm not sure if the latter would work. These defines were originally explored in #161 and, at that time, there was a bug preventing the use of php://stderr.

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Feature] PHP.wasm [Aspect] Website labels Feb 29, 2024
@adamziel adamziel changed the title Sub-processes: Source stderr output from php://stderr, not /tmp/stderr PHP sub-processes: Source stderr output from php://stderr, not /tmp/stderr Feb 29, 2024
@adamziel adamziel added this to the PHP Feature Parity milestone Feb 29, 2024
@bgrgicak bgrgicak assigned bgrgicak and unassigned bgrgicak Mar 26, 2024
@adamziel adamziel moved this to Needs Triage in Playground Board Jun 30, 2024
@adamziel adamziel removed the status in Playground Board Jun 30, 2024
@adamziel adamziel moved this to Needs Triage in Playground Board Jun 30, 2024
@adamziel adamziel removed the status in Playground Board Jun 30, 2024
@adamziel adamziel moved this to Future work in Playground Board Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Website [Feature] PHP.wasm [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

No branches or pull requests

2 participants