Pixelfed won’t let me change any admin settings, but tells me this:
Add 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.
tierce
August 6, 2021, 2:58pm
2
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
?
1 Like
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.
Thanks anyway.
tierce
August 7, 2021, 8:10am
5
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 .
1 Like
Thanks.
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.
Thanks @tierce
1 Like
For the record: that .env file is in /var/www/pixelfed/.env
.
That’s not normal. As root you should be able to edit it, for example with /var/www/pixelfed/.env
.
Any idea @yalh76 ?
PaulaToThePeople:
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."
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.
I ran php artisan config:cache
as 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
1 Like
system
Closed
September 9, 2021, 11:34am
13
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.