Skip to main content


Problem beim Update auf die aktuelle 2022.10


Hallo zusammen

Auf meiner zweiten Instanz habe ich ein Problem beim Update auf die 2022.10 (von der alten Stable aus).
Im Apache-Log finde ich folgende Zeilen:
[Thu Oct 27 14:27:36.243856 2022] [proxy_fcgi:error] [pid 2771074:tid 139919720097536] [client 62.204.xx.xx:60503] AH01071: Got error 'PHP message: PHP Warning: include(www/friendica/vendor/composer/../smarty/smarty/libs/Smarty.class.php): Failed to open stream: No such file or directory in www/friendica/vendor/composer/ClassLoader.php on line 444PHP message: PHP Warning: include(): Failed opening 'www/friendica/vendor/composer/../smarty/smarty/libs/Smarty.class.php' for inclusion (include_path='.::www/friendica/include:www/friendica/library:www/friendica') in www/friendica/vendor/composer/ClassLoader.php on line 444', referer: https://f.freinetz.ch/network

Beim Update bei git und composer lief alles fehlerfrei durch. Jetzt habe ich nur noch einen Whitescreen.
Standardmässig nutzt ich php 7.4, habe das Ganze noch kurz mit 8.0 getestet - ohne erfolg.

Mögliche Ursachen?

Danke für eure Unterstützung im Voraus!

!Friendica Support
in reply to Michi

Please run bin/composer.phar install --no-dev at the root of your Friendica install.
in reply to Hypolite Petovan

Habe ich gemacht, keine Fehler. Nun wiederholt:
You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating optimized autoload files
18 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
in reply to Michi

This is the expected output, what user did you run Composer with? It would affect the permissions of the files in the vendor folder and wether the web server can open them.
in reply to Hypolite Petovan

I run composer with the web-user. The permissions are correct.
in reply to Michi

Thank you, can you please confirm that the file www/friendica/vendor/smarty/smarty/libs/Smarty.class.php exists?
in reply to Hypolite Petovan

yes I can confirm, that the file exists.
There are other errors to other php-files:
[Thu Oct 27 15:29:37.063420 2022] [proxy_fcgi:error] [pid 2947120:tid 139931403544320] [client 2604xx0:37252] AH01071: Got error 'PHP message: PHP Warning:  require(/home/users/freinetz/www/friendica/vendor/composer/../paragonie/sodium_compat/autoload.php): failed to open stream: No such file or directory in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69PHP message: PHP Fatal error:  require(): Failed opening required '/home/users/freinetz/www/friendica/vendor/composer/../paragonie/sodium_compat/autoload.php' (include_path='.:') in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69'
[Thu Oct 27 15:29:37.248912 2022] [proxy_fcgi:error] [pid 2947120:tid 139930621695744] [client 2a00:xx1:39664] AH01071: Got error 'PHP message: PHP Warning:  require(/home/users/freinetz/www/friendica/vendor/composer/../phpseclib/phpseclib/phpseclib/bootstrap.php): failed to open stream: No such file or directory in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69PHP message: PHP Fatal error:  require(): Failed opening required '/home/users/freinetz/www/friendica/vendor/composer/../phpseclib/phpseclib/phpseclib/bootstrap.php' (include_path='.:') in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69'
in reply to Michi

Thank you, visibly it’s all the files in the vendor folder that your web user can’t open. It sounds more and more like a permission issue specific to your system.
in reply to Hypolite Petovan

I have checked the permission and run a chown -R user:www-data
in reply to Michi

@Michi That's a bit odd name for a web-user. Do you have php-fpm or how does your web server (Apache/Nginx?) run PHP scripts?

E.g. for this sub-domain I had to specify it in the pool's configuration file:
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = vuXXXX
group = www-data

(while xxxx is a four-digit number).
in reply to Roland Häder

Yes I use php-fpm. Where can I find the pool configuration file?
in reply to Michi

@Michi Mine are located here: /etc/php/7.4/fpm/pool.d/
in reply to Michi

I'm sorry, I'm stumped, it really is a quirk of your own system, not sure what else to ask you.
in reply to Hypolite Petovan

No problem, thank you for your help. Now I want to restore the backup, but I have a problem with the db import.
in reply to Tuxi :Friendica: 🐧 ✅

Da habe ich nicht viel. Da sind nur Warnungen wie diese:
[27-Oct-2022 18:29:39 UTC] PHP Warning:  Trying to access array offset on value of type bool in /home/users/freinetz/www/friendica/src/Module/Notifications/Ping.php on line 193
in reply to Michi

Versuche nun das Backup einzuspielen. Beim Datenbank Import habe ich nun auch ein Problem:
ERROR 1005 (HY000) at line 1785: Can't create table `freinetz_db1`.`contact` (errno: 121 "Duplicate key on write or update")

Leider finde ich nicht heraus, was das Problem ist und wie ich es lösen könnte.
in reply to Michi

Was bedeutet Duplicate key on write or update in diesem Abschnitt? Was soll hie doppelt vorhanden sein und zu einem Fehler führen?
in reply to Michi

Ich kriege das nicht hin. Ich habe nun versucht von dieser Instanz die contact-table zu exportieren und habe sie zu verglichen. Die sieht ganz anders aus - vielleicht durch das Update.

Weiter komme ich selber nun wirklich nicht und bitte um Unterstützung von #datenbank #Profis ;-) Wer kennst sich mit der friendica-db aus?
in reply to Michi

Darf ich dich @Michael Vogel fragen? Ich glaube du bist im Bereich der DB ein Fachmann, oder?
in reply to Michi

Das erste zunächst: Sind Deine Composer-Probleme beseitigt?
in reply to Michael Vogel

@Michael Vogel @Friendica Support
Also ich möchte erstmals zurück zur letzten funktionierenden Version, sprich des Backup einspielen. Die Dateien waren kein Problem, bei der DB klemmt es. Ich denke composer sollte da ja auch keine Probleme mehr machen.
in reply to Michi

@Michael Vogel @Friendica Support Als Hinweis, diese Instanz, von welcher ich hier schreibe läuft auf dem gleichen Server.
in reply to Michi

Wenn Du zurück zur Version vor dem Update-Versuch möchtest, spielst Du am besten das Backup ein, dass Du hoffentlich vor dem Update durchgeführt hast. Von Version zu Version verändern wir die Datenbank, deswegen ist es problematisch, eine alte Version auf einer neuen Datenbank einzuspielen.

Wenn Du keine Sicherung hast, ist es das beste, das Update durchzuziehen.
in reply to Michi

Und Du hast jetzt Probleme beim Einspielen des Backups? Am besten erstellst Du eine neue Datenbank, löscht aber nicht die alte Datenbank (man weiß ja nie). Dann sollte das Einspielen auch klappen.
in reply to Michael Vogel

@Michael Vogel @Friendica Support
Siehe den Post oben, ich bekomme diese Fehlermeldung: ERROR 1005 (HY000) at line 1785: Can't create table freinetz_db1.contact (errno: 121 "Duplicate key on write or update")

In eine neue DB einspielen habe ich noch nicht versucht. Das probiere ich mal, danke.
in reply to Michael Vogel

Vielen Dank für deinen Hinweis mit der neuen Datenbank. Ich habe immer versucht, die alte Datenbank mit dem Backup zu überschreiben und das ging nicht. Jetzt hat es funktioniert! Merci!

Ich werde bei Gelegenheit das Update auf die neue Stable nochmals versuchen. Ich hoffe, es funktioniert!
in reply to Michi

Im Zweifel teste es auf einer Datenbankkopie.