Bug#1004330: makes the package useless with PHP 8
Hi Francesco, Francesco Potortì wrote: > >> The necessary change was > >> > >> -$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the > >> files > >> +$conf['savedir'] = './data'; //where to store all the files > > > >Do you remember why this was necessary, i.e. what didn't work without it? > > Dokuwiki cannot find the .data directory and says so in the web > browser. I suppose that an alternative is creating a data link to > /var/lib/dokuwiki/data. Maybe such link existed and I removed it in > the past and an upgrade does not restore it? Hrm, this is something which might be related to running multiple instances of DokuWiki on the same host. The non-default data directory should be created by the dokuwiki-addsite. That's also why that "./data" is relative and not absolute. Maybe this should go into a separate bug report. > >> I know nothing about how php is managed on Debian. However, I had to add > >> these links: > >> > >> /usr/share/dokuwiki/vendor/paragonie/random_compat/lib -> > >> /usr/share/php/random_compat > >> /usr/share/dokuwiki/vendor/phpseclib/phpseclib/phpseclib -> > >> /usr/share/php/phpseclib > > > >Good catch! This indeed could be something that I oversaw. > > By the way, those files are in the php-phpseclib and > php-random-compat packages. Dependencies for those libraries are already there, yes. Worked fine for me without these links. Maybe because I didn't use any function which needs them. Or because I just haven't noticed the corresponding glitches. Added them. Shouldn't cause any harm. > >> # /usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/ > >> > >> I replaced all {0} with [0] > > > >That's one of the common changes I had to do. I though thought I had a > >patch for that already in the package on Salsa: > > > >https://salsa.debian.org/abe/dokuwiki/-/blob/master/debian/patches/cherrypick_6b6d27d9.patch > > I had just downloaded your package, so apparently you missed that one... Can't reproduce that anymore. Maybe your testing and my fix above overlapped. > >> Additionally, I get this in the Apache log: > >> > >> PHP Warning: Undefined array key "fperm" in > >> /usr/share/dokuwiki/inc/Search/Indexer.php on line 1070, referer: > >> http://wiki.potorti.it/egc2018/bilancio > > > >Yes. These are IIRC fixed upstream in git, but not in a release yet. I > >might add them to avoid the warning, but for now I just want to do the > >minimal thing to get it working again. Should probably tracked in a separate bug report as well and being tagged as fixed-upstream. > >> And unfortunately email sending still does not work: emails are sent > >> with an empty From: field, so they fail at the sendmail level. > > > >Funnily for me it's opposite: I get more mails than before, and also > >for changes I don't see via web interface. Still unclear why. Found the cause. Those changes are indeed seen in the webinterface. It were crawlers triggering restoration of old pages whose ACL was set to world-writable (on purpose back then, now only for authenticated users). > I get one email per edit, as expected, but they bounce (and I see > the bounce) because the To: header is empty. This has happened with > php8. After I had patched all the places generating an error in the > Apache log, I had this behaviour, which undortunately does not > generate an error, so I could not catch it... Hrm, leaving that out for now. Maybe file a bug report for this, too, after I've uploaded the new version. Regards, Axel -- ,''`. | Axel Beckert , https://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
Bug#1004330: makes the package useless with PHP 8
> >Hi Francesco, > >Francesco Potortì wrote: >> I had to revert some changes: >[…] >> The necessary change was >> >> -$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the >> files >> +$conf['savedir'] = './data'; //where to store all the files > >Do you remember why this was necessary, i.e. what didn't work without it? Dokuwiki cannot find the .data directory and says so in the web browser. I suppose that an alternative is creating a data link to /var/lib/dokuwiki/data. Maybe such link existed and I removed it in the past and an upgrade does not restore it? >> I know nothing about how php is managed on Debian. However, I had to add >> these links: >> >> /usr/share/dokuwiki/vendor/paragonie/random_compat/lib -> >> /usr/share/php/random_compat >> /usr/share/dokuwiki/vendor/phpseclib/phpseclib/phpseclib -> >> /usr/share/php/phpseclib > >Good catch! This indeed could be something that I oversaw. By the way, those files are in the php-phpseclib and php-random-compat packages. >> # /usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/ >> >> I replaced all {0} with [0] > >That's one of the common changes I had to do. I though thought I had a >patch for that already in the package on Salsa: > >https://salsa.debian.org/abe/dokuwiki/-/blob/master/debian/patches/cherrypick_6b6d27d9.patch I had just downloaded your package, so apparently you missed that one... >Anyway, will look through all the things you found and will update the >package in git where it seems necessary. > >> Additionally, I get this in the Apache log: >> >> PHP Warning: Undefined array key "fperm" in >> /usr/share/dokuwiki/inc/Search/Indexer.php on line 1070, referer: >> http://wiki.potorti.it/egc2018/bilancio > >Yes. These are IIRC fixed upstream in git, but not in a release yet. I >might add them to avoid the warning, but for now I just want to do the >minimal thing to get it working again. > >> And unfortunately email sending still does not work: emails are sent >> with an empty From: field, so they fail at the sendmail level. > >Funnily for me it's opposite: I get more mails than before, and also >for changes I don't see via web interface. Still unclear why. I get one email per edit, as expected, but they bounce (and I see the bounce) because the To: header is empty. This has happened with php8. After I had patched all the places generating an error in the Apache log, I had this behaviour, which undortunately does not generate an error, so I could not catch it...
Bug#1004330: makes the package useless with PHP 8
Hi Francesco, Francesco Potortì wrote: > I had to revert some changes: […] > The necessary change was > > -$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the > files > +$conf['savedir'] = './data'; //where to store all the files Do you remember why this was necessary, i.e. what didn't work without it? > I know nothing about how php is managed on Debian. However, I had to add > these links: > > /usr/share/dokuwiki/vendor/paragonie/random_compat/lib -> > /usr/share/php/random_compat > /usr/share/dokuwiki/vendor/phpseclib/phpseclib/phpseclib -> > /usr/share/php/phpseclib Good catch! This indeed could be something that I oversaw. > # /usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/ > > I replaced all {0} with [0] That's one of the common changes I had to do. I though thought I had a patch for that already in the package on Salsa: https://salsa.debian.org/abe/dokuwiki/-/blob/master/debian/patches/cherrypick_6b6d27d9.patch Anyway, will look through all the things you found and will update the package in git where it seems necessary. > Additionally, I get this in the Apache log: > > PHP Warning: Undefined array key "fperm" in > /usr/share/dokuwiki/inc/Search/Indexer.php on line 1070, referer: > http://wiki.potorti.it/egc2018/bilancio Yes. These are IIRC fixed upstream in git, but not in a release yet. I might add them to avoid the warning, but for now I just want to do the minimal thing to get it working again. > And unfortunately email sending still does not work: emails are sent > with an empty From: field, so they fail at the sendmail level. Funnily for me it's opposite: I get more mails than before, and also for changes I don't see via web interface. Still unclear why. Regards, Axel -- ,''`. | Axel Beckert , https://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
Bug#1004330: makes the package useless with PHP 8
I built and installed your package, thanks. These are the problems I encountered. # /etc/dokuwiki.php I had to revert some changes: diff -pu /etc/dokuwiki/dokuwiki.php /etc/dokuwiki/dokuwiki.php.dist --- /etc/dokuwiki/dokuwiki.php 2022-02-07 13:59:46.209521897 +0100 +++ /etc/dokuwiki/dokuwiki.php.dist 2022-01-25 04:12:00.0 +0100 @@ -13,14 +13,14 @@ /* Basic Settings */ -$conf['title'] = 'Debian DokuWiki'; //what to show in the title +$conf['title'] = 'DokuWiki';//what to show in the title $conf['start'] = 'start'; //name of start page $conf['lang']= 'en'; //your language $conf['template']= 'dokuwiki'; //see lib/tpl directory $conf['tagline'] = '';//tagline in header (if template supports it) $conf['sidebar'] = 'sidebar'; //name of sidebar in root namespace (if template supports it) $conf['license'] = 'cc-by-nc-sa'; //see conf/license.php -$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the files +$conf['savedir'] = './data'; //where to store all the files $conf['basedir'] = '';//absolute dir from serveroot - blank for autodetection $conf['baseurl'] = '';//URL to server including protocol - blank for autodetect $conf['cookiedir'] = '';//path to use in cookies - blank for basedir @@ -139,7 +139,7 @@ $conf['rss_show_summary'] = 1; $conf['rss_show_deleted'] = 1; //Show deleted items 0|1 /* Advanced Settings */ -$conf['updatecheck'] = 0;//automatically check for new releases? +$conf['updatecheck'] = 1;//automatically check for new releases? $conf['userewrite'] = 0;//this makes nice URLs: 0: off 1: .htaccess 2: internal $conf['useslash']= 0;//use slash instead of colon? only when rewrite is on $conf['sepchar'] = '_'; //word separator character in page names; may be a @@ -176,12 +176,3 @@ $conf['proxy']['user']= ''; $conf['proxy']['pass']= ''; $conf['proxy']['ssl'] = 0; $conf['proxy']['except'] = ''; -// Safemode Hack - read http://www.dokuwiki.org/config:safemodehack ! -$conf['safemodehack'] = 0; -$conf['ftp']['host'] = 'localhost'; -$conf['ftp']['port'] = '21'; -$conf['ftp']['user'] = 'user'; -$conf['ftp']['pass'] = 'password'; -$conf['ftp']['root'] = '/home/user/htdocs'; - - Note that I re-added the safemode hack even if I don't know what it is. The necessary change was -$conf['savedir'] = '/var/lib/dokuwiki/data'; //where to store all the files +$conf['savedir'] = './data'; //where to store all the files # php compatibility I know nothing about how php is managed on Debian. However, I had to add these links: /usr/share/dokuwiki/vendor/paragonie/random_compat/lib -> /usr/share/php/random_compat /usr/share/dokuwiki/vendor/phpseclib/phpseclib/phpseclib -> /usr/share/php/phpseclib # /usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/ I replaced all {0} with [0] # Result Now it apparently works as it did after the patches I had done to the old package. Additionally, I get this in the Apache log: PHP Warning: Undefined array key "fperm" in /usr/share/dokuwiki/inc/Search/Indexer.php on line 1070, referer: http://wiki.potorti.it/egc2018/bilancio And unfortunately email sending still does not work: emails are sent with an empty From: field, so they fail at the sendmail level.
Bug#1004330: makes the package useless with PHP 8
The most urgent thing now is to mark the current dokuwiki package and php8 as incompatible, so people don't keep falling here until a solution is out.
Bug#1004330: makes the package useless with PHP 8
>I have a more or less working package of the most recent upstream >release plus one or two patches at >https://salsa.debian.org/abe/dokuwiki > >It runs in production on https://swissmk.ch/ I'd be happy to try it. However after tweaking with the code I managed to have it almost working. The only thing that I found not working is generation and sending of email: the recipient is empty and the email bounces. Snce this problem does not cause an error or warning for me to read in the logs, I have not found the culprit. So I have enough incentives to try out a new version. I am writing to you in private. -- Francesco Potortì (ricercatore)Voice: +39.050.621.3058 ISTI - Area della ricerca CNR Mobile: +39.348.8283.107 via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti (gate 20, 1st floor, room C71) Web:http://fly.isti.cnr.it
Bug#1004330: makes the package useless with PHP 8
Hi Francesco, Francesco Potortì wrote: > I hope the package gets upgraded soon, because dokuwiki simply > stopped working with PHP 8 I have a more or less working package of the most recent upstream release plus one or two patches at https://salsa.debian.org/abe/dokuwiki It runs in production on https://swissmk.ch/ Actually I'd be happy if someone else could try it out as well as Dokuwiki is a rather huge chunk of code and I'm not sure if I got everything right. I intend to do an NMU (due to no reaction of the maintainer on either RC bug for over a week), but for that the package still needs a bit more fine-tuning (like handling the other RC bug which actually no more is one after the recent TC decision on that topic). I also still have some strange behaviour with regards to mail notifications (notifications for changes which either never happaned or which happened years ago — at least they're not visible in the web interface at the time the mails were sent) where I'm not sure what part of the upgrade caused them. Regards, Axel -- ,''`. | Axel Beckert , https://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
Bug#1004330: makes the package useless with PHP 8
I hope the package gets upgraded soon, because dokuwiki simply stopped working with PHP 8 I used a stopgap, by looking at the Apache errors end modifying the php source files generating the error, but that's long and tedious. And I cannot be sure that everything works... -- Francesco Potortì (ricercatore)Voice: +39.050.621.3058 ISTI - Area della ricerca CNR Mobile: +39.348.8283.107 via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti (gate 20, 1st floor, room C71) Web:http://fly.isti.cnr.it