Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1091983 > unrolled thread

Bug#1004330: makes the package useless with PHP 8

Started byFrancesco Potortì <Potorti@isti.cnr.it>
First post2022-02-04 01:10 +0100
Last post2022-02-07 16:50 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.debian.bugs.dist

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#1004330: makes the package useless with PHP 8 Francesco Potortì <Potorti@isti.cnr.it> - 2022-02-04 01:10 +0100
    Bug#1004330: makes the package useless with PHP 8 Francesco Potortì <Potorti@isti.cnr.it> - 2022-02-04 11:50 +0100
    Bug#1004330: makes the package useless with PHP 8 Francesco Potortì <Potorti@isti.cnr.it> - 2022-02-07 14:40 +0100
      Bug#1004330: makes the package useless with PHP 8 Axel Beckert <abe@debian.org> - 2022-02-07 16:40 +0100
        Bug#1004330: makes the package useless with PHP 8 Francesco Potortì <Potorti@isti.cnr.it> - 2022-02-07 16:50 +0100

#1091983 — Bug#1004330: makes the package useless with PHP 8

FromFrancesco Potortì <Potorti@isti.cnr.it>
Date2022-02-04 01:10 +0100
SubjectBug#1004330: makes the package useless with PHP 8
Message-ID<DMUkN-PL-5@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1092010

FromFrancesco Potortì <Potorti@isti.cnr.it>
Date2022-02-04 11:50 +0100
Message-ID<DN4ka-6LI-5@gated-at.bofh.it>
In reply to#1091983
>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

[toc] | [prev] | [next] | [standalone]


#1092328

FromFrancesco Potortì <Potorti@isti.cnr.it>
Date2022-02-07 14:40 +0100
Message-ID<DOcpj-b6C-3@gated-at.bofh.it>
In reply to#1091983
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.000000000 +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.

[toc] | [prev] | [next] | [standalone]


#1092342

FromAxel Beckert <abe@debian.org>
Date2022-02-07 16:40 +0100
Message-ID<DOehr-cf7-1@gated-at.bofh.it>
In reply to#1092328
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 <abe@debian.org>, 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

[toc] | [prev] | [next] | [standalone]


#1092344

FromFrancesco Potortì <Potorti@isti.cnr.it>
Date2022-02-07 16:50 +0100
Message-ID<DOer7-ciC-1@gated-at.bofh.it>
In reply to#1092342
>
>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...

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web