You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2022. It is now read-only.
This is a common issue to all Laravel projects. The following error occur when running site.example/setup in the browser with "APP_ENV=production" [2022-04-22 15:34:42] production.ERROR: Undefined constant "STDIN" {"exception":"[object] (Error(code: 0): Undefined constant \"STDIN\" at /home/*/*/vendor/symfony/console/Helper/QuestionHelper.php:113)
This is because, when running Laravel migration in production, the following question will be asked in the terminal.
php artisan migrate:fresh --seed
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]:
Obviously, "STDIN" would not exists when following the instruction by going through site.example/setup in the browser.
I'm not sure how to overcome this. My only suggestion is to add additional step like I did. I ran setup with APP_ENV=local, then change this value to APP_ENV=production afterward.
Suggestion: Write code to check APP_ENV value and output an error in browser telling the user to do this step if setup has not been ran?
The text was updated successfully, but these errors were encountered:
noogen
changed the title
Running setup/migration in production
Issue running setup from the browser in production
Apr 22, 2022
noogen
changed the title
Issue running setup from the browser in production
Issue running setup in production, from the browser
Apr 22, 2022
Did a search on past history, this could also be related to: #6 and #7 - I have similar issue result. Installation failed but you have to view storage/log/laravel.log error to see the details like I did.
entirely possible.
I am leaning toward just adding a note in the installation docs NOT to change from local to production until after installed, for those who are knowledgeable enough to have changed this in the .env
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a common issue to all Laravel projects. The following error occur when running
site.example/setup
in the browser with "APP_ENV=production"[2022-04-22 15:34:42] production.ERROR: Undefined constant "STDIN" {"exception":"[object] (Error(code: 0): Undefined constant \"STDIN\" at /home/*/*/vendor/symfony/console/Helper/QuestionHelper.php:113)
This is because, when running Laravel migration in production, the following question will be asked in the terminal.
Obviously, "STDIN" would not exists when following the instruction by going through
site.example/setup
in the browser.Additional context
Ref: https://stackoverflow.com/questions/24223286/artisancallmigrate-not-working-after-upgrading-laravel-to-4-2
I'm not sure how to overcome this. My only suggestion is to add additional step like I did. I ran setup with
APP_ENV=local
, then change this value toAPP_ENV=production
afterward.Suggestion: Write code to check
APP_ENV
value and output an error in browser telling the user to do this step if setup has not been ran?The text was updated successfully, but these errors were encountered: