Skip to content

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

Open
@TimWolla

Description

@TimWolla

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions