Closed mcint closed 5 months ago
Attempting a workaround by installing the app anew (on another domain). I'll try to restore data into that database.
This also just causes 500s—although different 500s. The original wallabag app, hereafter W1 and new app W2:
In /etc/php/7.4/fpm/pool.d
:
; YunoHost note : this file was automatically moved from /etc/php/7.3/fpm/pool.d
And in /var/log/nginx/[fqdn]-error.log
, I found an error, hundreds, thousands of
`2023/01/29 05:30:03 [error] 25576#25576: 4195 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot redeclare mb_str_split() in /var/www/wallabag2/vendor/wallabag/php-mobi/MOBIClass/RecordFactory.php on line 119" while reading response header from upstream, client: 1.2.3.4, server: [fqdn], request: "GET /wallabag/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-wallabag2.sock:", host: "[fqdn]", referrer: "https://[fqdn]/yunohost/sso/"`
The core error looks related to upstream app.
PHP message: PHP Fatal error: Cannot redeclare mb_str_split() in
Per https://stackoverflow.com/a/64303980/1020467 I've resolved my issue by updating /var/www/wallabag2/vendor/wallabag/php-mobi/MOBIClass/RecordFactory.php
to conditionally define
if (!function_exists('mb_str_split')) {
function mb_str_split($str, $length = 1)
{
// ...
}
}
Deletion would work too. Though not backward compatible.
I don't know how this file and error fits in to the cascade of management layers (and I'm happy not to have to find out). I see sources/patches
but nothing that touches php files. I hope this file is vendored-in as opposed to running the latest composer install or whatever is used.
Should this be resoled with a new patch in sources/patch
or a new snapshot of upstream?
First time I've heard about this issue, this is really strange O_o
No sure about the patch :thinking:
And in
/var/log/nginx/[fqdn]-error.log
, I found an error, hundreds, thousands of `2023/01/29 05:30:03 [error] 25576#25576: 4195 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot redeclare mb_str_split() in /var/www/wallabag2/vendor/wallabag/php-mobi/MOBIClass/RecordFactory.php on line 119" while reading response header from upstream, client: 1.2.3.4, server: [fqdn], request: "GET /wallabag/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-wallabag2.sock:", host: "[fqdn]", referrer: "https://[fqdn]/yunohost/sso/"`
I am getting the same error messages, each time I try to access Wallabag. The app returns error 500. The Web application does not load and returns a blank page.
Just in case, could you restart php7.4-fpm service ?
So in #166 we can "reproduce" this error while upgrading from php7.4 to 8.0. That seems to be a bug occurring when different php versions are used before/after the upgrade.
I restarted php7.4-fpm service but the issue remains.
It appears this mb_str_split
method is removed from php after 7.3. (According to mb_str_split
docs and attached comments, the inverse is true. However, for PHP < 7.4, "symfony/polyfill-mbstring" provided it. Looks like it could've been dropped in an upstream packaging gap.)
I've resolved my issue by updating
/var/www/wallabag2/vendor/wallabag/php-mobi/MOBIClass/RecordFactory.php
to conditionally defineif (!function_exists('mb_str_split')) { function mb_str_split($str, $length = 1) { // ... } }
Clarified from my earlier comment.
@biosaat -- reopen if this doesn't work for you.
Describe the bug
500 errors on wallabag2 endpoint after upgrade to YunoHost 11.0.
Context
LXC container on own server
11.0.11
(base, admin) (moulinette 11.0.9)ssh / pty
no ~
2.3.8~ynh3
(Installed:26 May 2021
)Steps to reproduce
Performed yunohost base upgrade
Expected behavior
A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.
Logs
After noticing an issue, I attempted to create a back up. XD https://paste.yunohost.org/raw/mazuroneji
I've manually exported data
$ mysqldump db_name > backup-file.sql
per mariaDB backup docs.