Pixelfed won’t let me change any admin settings, but tells me this:
ENABLE_CONFIG_CACHE=true in your .env file
and run php artisan config:cache
Where is the .env file located or better yet, what is the exact command to add that to the .env file?
PS: Okay I found the .env file, but I can’t edit it, because it’s read-only. Even as root and with sudo I can’t edit it.
Even if you become root
sudo su - and try to edit the file ?
If it does not allow you to edit as root, what is the result of
ls -la /path/to/.env-file ?
With sudo su - I can mess with the .env file, but that’s it… mess with it, not edit it.
I guess the Hetzner console just sucks.
I need to try to connect via SSH, but I haven’t managed that so far.
Ok … the .env permissions are set to read only (-r-----).
As root, you can change it’s permissions this way :
chmod u+w /var/www/pixelfed/.env
It will allow writing in the file ( -rw------ ).
Then you can edit the file and once you are satisfied, you can remove the write access this way:
chmod u-w /var/www/pixelfed/.env
For more details, have a look at some explanation about unix permissions and on Yunohost documentation about ssh.
Okay I did that. Then
edit .env while being in the right folder and now I can edit the file, but how can I save and quit editing the file?
Okay, now I managed to edit the file. I used vim because edit was shit.
Now I can see the admin settings in Pixelfed, but when I try to change something and save I get:
" Something went wrong
We cannot process your request at this time, please try again later. Go back to Pixelfed."
PS: Okay, but at least now I know how to change the admin settings from the terminal.
For the record: that .env file is in
That’s not normal. As root you should be able to edit it, for example with
Any idea @yalh76 ?
What did you change ? Did you run all the php/artisan commands recommended at the end of the .env file ?
sudo su - alone didn’t do the trick. I had to
chmod u+w /var/www/pixelfed/.env to make the file writeable.
php artisan config:cacheas was suggested to me by Pixelfed in the original error message, after I made the file read-only again.
Should I run another command?
That’s why I think there is a problem somewhere… But don’t know what.
As far as I know you need to run :
php artisan cache:clear
php artisan optimize:clear
php artisan optimize
In order to take the changes into account.
Sometimes I also restart php service :
service php7.3-fm restart.
Note: you might specify php version, with
php7.3 for instance (that’s the current version used).
That didn’t change anything, but because of another issue I ran:
php artisan passport:keys
php artisan config:cache
php artisan route:cache
php artisan passport:client --personal
And now it works.
Ok, I don’t know what happened (I know nothing about this php artisan stuff), but great to know it is solved
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.