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

phpw_run() doesn't set PG(during_request_startup) = 0 #8

Open
TimWolla opened this issue Dec 11, 2024 · 0 comments
Open

phpw_run() doesn't set PG(during_request_startup) = 0 #8

TimWolla opened this issue Dec 11, 2024 · 0 comments

Comments

@TimWolla
Copy link

Running the example on https://www.php.net/manual/en/function.exec.php results in:

Warning: PHP Request Startup: Unable to fork [whoami] in php-wasm run script on line 6
Returned with status -1 and output:
Array
(
)

It confusingly indicates a “PHP Request Startup” warning, instead of exec(). This is caused by PG(during_request_startup) == 1. php_execute_script() does this automatically:

https://github.com/php/php-src/blob/6e759e079f882fe54afa6da31f9cc86e9f680bf6/main/main.c#L2531

But for phpw_run() which uses zend_eval_string() this likely needs to happen manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant