Skip to content

New installation, "" is invalid environment under PHP-FPM #395

@lourdas

Description

@lourdas

I just saw the first stable release of the app package for Yii3 and thought to try it out myself.

I run composer create-project yiisoft/app myproject locally in my Linux box, I corrected the permissions so that the httpd user can write in the folders and when I click on the public directory in my browser, I get this error:

Fatal error: Uncaught RuntimeException: "" is invalid environment. in /home/xxxxx/public_html/myproject/src/Environment.php on line 77
Image

If I run yii serve from the cli, it works, since I pass APP_ENV as a environment variable before the command.

But how the heck do I do this in the web application? I see no reference in the docs about what to do, let's say I'm a newbie user and I want to try the framework out. It fails miserably, and I will look somewhere else.

I've been using Yii 1.1 and 2.0 as my framework of choice for all my PHP projects for the last decade or so, but Yii3 seems like an alien thing to me. Am I too old to deploy it under the classic php-fpm-Apache installation that only other deployment types are now of relevance (like docker)?

I guess the docs could be improved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions