I started up a new Laravel 5.0 Quick Start at OpenShift. The default laravel home page and auth pages worked just fine. I changed the OpenShift environment variables as follows:
> rhc env set APP_DEBUG=true
> rhc env set APP_ENV=development
Note the change to APP_DEBUG
was inadvertent. I originally only meant to touch APP_ENV
and then if I understand correctly the OpenShift action hooks should have set other environment variables accordingly. Still I suspect my problem described below would arise whether or not I make that mistake.
In any case after executing the two forgoing commands I can no longer restart. Failing like so:
> rhc app restart -a php
Failed to execute action hook 'pre_restart' for {id} application php
Failed to execute action hook 'pre_restart' for {id} application php
From the web interface I get this longer message:
Setting environment variables...
/usr/lib/openshift/cartridge_sdk/bash/sdk: line 154: /var/lib/openshift/{id}//.env/user_vars/APP_ENV: Permission denied
Setting environment variables...
/usr/lib/openshift/cartridge_sdk/bash/sdk: line 154: /var/lib/openshift/{id}//.env/user_vars/APP_ENV: Permission denied
Failed to execute action hook 'pre_restart' for {id} application php
Failed to execute action hook 'pre_restart' for {id} application php
I am early enough in setting this up that I could as a last resort start over from scratch. However I would like to understand the reliable way to change the environment variable from production to development and back. Also, what permissions are at work here and is there a way to manage them so that the action hooks do not encounter "permission denied?"
Thank you for any help. Please let me know if I can clarify anything.