Skip to content

Unable to resolve the request "--" with chroot #20159

Open
@gozoro

Description

@gozoro

What steps will reproduce the problem?

When php is launched with chroot as:

sudo /usr/sbin/chroot /opt/php55 /usr/bin/php "$@"

and in bash, run the command:

./yii

Method \yii\console\Request::resolve() throws exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "--".'

What is the expected result?

I expected the route to resolve as "help".

What do you get instead?

This happens because $_SERVER['argv'] contains an array:

Array
(
    [0] => /var/www/my_project/yii
    [1] => --
)

and route resolved as NULL.

Additional info

Q A
Yii version 2.0.49
PHP version 5.5
Operating system Ubuntu 18.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions