#272 avatar disappeared and can't re-upload

Closed
opened 2 years ago by dchmelik · 7 comments

I joined in early-to-mid 2010s as https://status.davidchmelik.com/ and had to reinstall once or a few/couple times in the past, and reinstalled recently after I got my webserver working again.
    Even though I saved not just my MySQL database (which some people incorrectly said is all you need) and /var/www/gnusocial (which you do need also) and copied the directories mentioned in the missing/renamed UPGRADE file, when I upgraded from v1.2 (git) to v2 I no longer have an avatar.
    When I figured out what directory I needed to create (which migration should've been documented in UPGRADE) and tried to upload my JPG avatar (my photo) it shows a black square with small icon at top left indicating broken image... then I saw a WEBP in the avatar directory but apparently it wasn't converted/saved at all.
    Avatars of accounts I follow (FSF) are also broken (though I still see their posts and images in those.)
    If you can help me fix my node, I'll restart a node I let a few scientific/mathematical people use.

I joined in early-to-mid 2010s as [https://status.davidchmelik.com/](https://status.davidchmelik.com/) and had to reinstall once or a few/couple times in the past, and reinstalled recently after I got my webserver working again.<br> &nbsp;&nbsp;&nbsp; Even though I saved not just my MySQL database (which some people incorrectly said is all you need) and /var/www/gnusocial (which you do need also) and copied the directories mentioned in the missing/renamed UPGRADE file, when I upgraded from v1.2 (git) to v2 I no longer have an avatar.<br> &nbsp;&nbsp;&nbsp; When I figured out what directory I needed to create (which migration should've been documented in UPGRADE) and tried to upload my JPG avatar (my photo) it shows a black square with small icon at top left indicating broken image... then I saw a WEBP in the avatar directory but apparently it wasn't converted/saved at all.<br> &nbsp;&nbsp;&nbsp; Avatars of accounts I follow (FSF) are also broken (though I still see their posts and images in those.)<br> &nbsp;&nbsp;&nbsp; If you can help me fix my node, I'll restart a node I let a few scientific/mathematical people use.
aab commented 2 years ago

Maybe some php modules missing? Php-exif and php-gd, for instance. I'd go through https://notabug.org/diogo/gnu-social/src/master/INSTALL.md and make sure the prerequisites are installed.

Another possibility, given that you have a backup of the avatars directory, is that it is not in the correct location. It should be in /var/www/gnusocial/file/avatar.

Maybe you've already done all this; I can't think right now in any other reason for the failure to show avatars.

Maybe some php modules missing? Php-exif and php-gd, for instance. I'd go through https://notabug.org/diogo/gnu-social/src/master/INSTALL.md and make sure the prerequisites are installed. Another possibility, given that you have a backup of the avatars directory, is that it is not in the correct location. It should be in /var/www/gnusocial/file/avatar. Maybe you've already done all this; I can't think right now in any other reason for the failure to show avatars.
David Chmelik commented 2 years ago
Poster

My server OS typically comes with all that PHP stuff but I don't see the option, such as when I originally installed, to show what I may have missing.

root@darwinheim:/var/www/gnusocial# php -m|grep -E "openssl|curl|exif|gd|intl|json|mbstring|mysql|gmp|bcmath|opcache|readline|xml"
bcmath
curl
exif
gd
gmp
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pdo_mysql
readline
xml
xmlreader
xmlrpc
xmlwriter

    I have /var/www/gnusocial/avatar but the settings say it's /var/www/gnusocial/file/avatar/, which didn't exist; do I copy everything to that?

My server OS typically comes with all that PHP stuff but I don't see the option, such as when I originally installed, to show what I may have missing.<br> ``` root@darwinheim:/var/www/gnusocial# php -m|grep -E "openssl|curl|exif|gd|intl|json|mbstring|mysql|gmp|bcmath|opcache|readline|xml" bcmath curl exif gd gmp intl json libxml mbstring mysqli mysqlnd openssl pdo_mysql readline xml xmlreader xmlrpc xmlwriter ``` &nbsp;&nbsp;&nbsp; I have /var/www/gnusocial/avatar but the settings say it's /var/www/gnusocial/file/avatar/, which didn't exist; do I copy everything to that?
aab commented 2 years ago

Don't know about how Slackware manages it (it is the OS you are using, right?). In Debian, that is what I use, the note applies:

NOTE: Some distros require manual enabling in the relevant php.ini for some modules.

About avatar directory: create /var/www/gnusocial/file (uploads will be stored there) and move avatar into file directory. That should do it.

Don't know about how Slackware manages it (it is the OS you are using, right?). In Debian, that is what I use, the note applies: NOTE: Some distros require manual enabling in the relevant php.ini for some modules. About avatar directory: create /var/www/gnusocial/file (uploads will be stored there) and move avatar into file directory. That should do it.
David Chmelik commented 2 years ago
Poster

They're all there and didn't require manually editing in the past.

;php.ini
extension=bcmath
extension=curl
extension=exif
extension=gd
extension=gmp
extension=intl
extension=mbstring
extension=mysqli
extension=openssl
extension=pdo_mysql
extension=xmlreader
extension=xmlrpc

I didn't see readline or other xml (except in 'php -m,' previous post.)     I copied the avatars to the new directory, but they didn't appear yet. What should be the new directory's permissions, 755?

They're all there and didn't require manually editing in the past. ``` ;php.ini extension=bcmath extension=curl extension=exif extension=gd extension=gmp extension=intl extension=mbstring extension=mysqli extension=openssl extension=pdo_mysql extension=xmlreader extension=xmlrpc ``` I didn't see readline or other xml (except in 'php -m,' previous post.) &nbsp;&nbsp;&nbsp; I copied the avatars to the new directory, but they didn't appear yet. What should be the new directory's permissions, 755?
aab commented 2 years ago

Check in GS admin/paths panel if everything is correct. Maybe also reload/restart php and apache.

Check in GS admin/paths panel if everything is correct. Maybe also reload/restart php and apache.
David Chmelik commented 2 years ago
Poster

I added a missing one of those, restarted webserver (PHP is always running--doesn't stop/restart--I'm not using one of the weird new undocumented alterations of using PHP that don't work) and restarted GNU Social (scripts/stopdaemons.sh, startdaemons.sh) but they still didn't appear.

I added a missing one of those, restarted webserver (PHP is always running--doesn't stop/restart--I'm not using one of the weird new undocumented alterations of using PHP that don't work) and restarted GNU Social (scripts/stopdaemons.sh, startdaemons.sh) but they still didn't appear.
David Chmelik commented 2 years ago
Poster

Restarting a few times, updating permissions/ownership (and fixing PHP error loggin) and it finally worked.

Restarting a few times, updating permissions/ownership (and fixing PHP error loggin) and it finally worked.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.