Maybe pruning?

Topics that can go away
zompist
Site Admin
Posts: 2663
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Maybe pruning?

Post by zompist »

I've taken Brad up on his kind offer... the board may be down at some point soon for updating.
Zju
Posts: 797
Joined: Fri Aug 03, 2018 4:05 pm

Re: Maybe pruning?

Post by Zju »

zompist wrote: Fri Jan 05, 2024 5:43 pm
bradrn wrote: Fri Jan 05, 2024 8:22 am As an aside: I wonder if upgrading phpBB to the latest version might be worth a try?
Might be worth a try, though it's tedious.

FWIW I ftp'd into the server and checked the error_log file. It has an innumerable set of errors like this:
Stack trace:
#0 /home3/verduria/public_html/cache/production/url_generator.php(49): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'phpbb_feed_foru...', 1, Array, Array)
#1 /home3/verduria/public_html/phpbb/routing/router.php(168): phpbb_url_generator->generate('phpbb_feed_foru...', Array, 1)
#2 /home3/verduria/public_html/phpbb/routing/helper.php(148): phpbb\routing\router->generate('phpbb_feed_foru...', Array, 1)
#3 /home3/verduria/public_html/phpbb/template/twig/extension/routing.php(36): phpbb\routing\helper->route('phpbb_feed_foru...', Array, true, false, 1)
#4 /home3/verduria/public_html/cache/production/twig/cd/cd6dc777362816e4f1730d62edab105dab4b9a7c8305a07ef7290a6eb2ce1b78.php(145): p in /home3/verduria/public_html/vendor/twig/twig/src/Template.php on line 419
[08-Apr-2023 03:38:08 America/Boise] PHP Fatal error: Uncaught Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "forum_id" for route "phpbb_feed_forum" must match "\d+" ("-1165" given) to generate a corresponding URL. in /home3/verduria/public_html/vendor/symfony/routing/Generator/UrlGenerator.php:148
I have no idea what that means, and there's no timestamp. I deleted the file to see if more of the same occurs.

Ironically, the board is working fine right now. (Not because I deleted the file; it was fine before that. Since the problem comes and goes, I feel like it's bot activity, but I dunno.)
Prolly late for the train, but I've witnessed not too dissimilar error logs before, and it was about the server having permenantly dropped support for older versions of PHP, while the board never having had an update in almost a decade. So the board was trying to execute functions that were no longer supported by the server.
/j/ <j>

Ɂaləɂahina asəkipaɂə ileku omkiroro salka.
Loɂ ɂerleku asəɂulŋusikraɂə seləɂahina əɂətlahɂun əiŋɂiɂŋa.
Hərlaɂ. Hərlaɂ. Hərlaɂ. Hərlaɂ. Hərlaɂ. Hərlaɂ. Hərlaɂ.
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

Zju wrote: Sat Jan 06, 2024 2:01 pm
zompist wrote: Fri Jan 05, 2024 5:43 pm
bradrn wrote: Fri Jan 05, 2024 8:22 am As an aside: I wonder if upgrading phpBB to the latest version might be worth a try?
Might be worth a try, though it's tedious.

FWIW I ftp'd into the server and checked the error_log file. It has an innumerable set of errors like this:
Stack trace:
#0 /home3/verduria/public_html/cache/production/url_generator.php(49): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'phpbb_feed_foru...', 1, Array, Array)
#1 /home3/verduria/public_html/phpbb/routing/router.php(168): phpbb_url_generator->generate('phpbb_feed_foru...', Array, 1)
#2 /home3/verduria/public_html/phpbb/routing/helper.php(148): phpbb\routing\router->generate('phpbb_feed_foru...', Array, 1)
#3 /home3/verduria/public_html/phpbb/template/twig/extension/routing.php(36): phpbb\routing\helper->route('phpbb_feed_foru...', Array, true, false, 1)
#4 /home3/verduria/public_html/cache/production/twig/cd/cd6dc777362816e4f1730d62edab105dab4b9a7c8305a07ef7290a6eb2ce1b78.php(145): p in /home3/verduria/public_html/vendor/twig/twig/src/Template.php on line 419
[08-Apr-2023 03:38:08 America/Boise] PHP Fatal error: Uncaught Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "forum_id" for route "phpbb_feed_forum" must match "\d+" ("-1165" given) to generate a corresponding URL. in /home3/verduria/public_html/vendor/symfony/routing/Generator/UrlGenerator.php:148
I have no idea what that means, and there's no timestamp. I deleted the file to see if more of the same occurs.

Ironically, the board is working fine right now. (Not because I deleted the file; it was fine before that. Since the problem comes and goes, I feel like it's bot activity, but I dunno.)
Prolly late for the train, but I've witnessed not too dissimilar error logs before, and it was about the server having permenantly dropped support for older versions of PHP, while the board never having had an update in almost a decade. So the board was trying to execute functions that were no longer supported by the server.
That was my hunch too (and why I suggested upgrading the board). I know that that’s what happened to incatena.org when it stopped working.

That being said, this stack trace looks slightly different: not a nonexistent function, but a malformed format string.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
zompist
Site Admin
Posts: 2663
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Maybe pruning?

Post by zompist »

FWIW I just checked, and the error_log file is still 0 bytes. But also, I haven't had problems in the last 24 hours or so.

It's conceivable that deleting the 1M error file improved things... but it's probably not that. :)
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

zompist wrote: Sat Jan 06, 2024 1:47 pm I've taken Brad up on his kind offer... the board may be down at some point soon for updating.
Follow-up to this: zompist has given me admin access. Currently, I’m making a backup of the board. Once that’s done I’ll have a go at upgrading it — which I seem to recall being a reasonably quick process last time I tried it. Hopefully that’s enough to fix it… if not, I’ll dig a bit deeper and see if anything else might help.

(Besides, even if it doesn’t fix it, upgrading phpBB is likely to be a good idea anyway: we’re 8 versions behind the latest one!)
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

OK, the board has been updated! Let’s hope this fixes the problem…

(One rather worrying thing: the font got reset to Trebuchet MS, which is the default. Luckily I took a backup, so I’ll see if I can get back the old CSS.)
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
zompist
Site Admin
Posts: 2663
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Maybe pruning?

Post by zompist »

bradrn wrote: Sun Jan 07, 2024 12:20 am OK, the board has been updated! Let’s hope this fixes the problem…
Awesome! Thanks so much, Brad!
(One rather worrying thing: the font got reset to Trebuchet MS, which is the default. Luckily I took a backup, so I’ll see if I can get back the old CSS.)
Ooh yeah. If I'm not mistaken: look for content.css. Then look for .content and .content p and change the font family to sans-serif.
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

zompist wrote: Sun Jan 07, 2024 12:28 am
(One rather worrying thing: the font got reset to Trebuchet MS, which is the default. Luckily I took a backup, so I’ll see if I can get back the old CSS.)
Ooh yeah. If I'm not mistaken: look for content.css. Then look for .content and .content p and change the font family to sans-serif.
Done! It turned out to be a little more than just content.css: I ran a diff to find all the places which needed to be changed.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

Also, at this point I’d suggest re-enabling the board for non-users. Limiting their access didn’t seem to help anyway.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
zompist
Site Admin
Posts: 2663
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Maybe pruning?

Post by zompist »

bradrn wrote: Sun Jan 07, 2024 12:51 am Also, at this point I’d suggest re-enabling the board for non-users. Limiting their access didn’t seem to help anyway.
OK, done. Let's see how it goes!
Darren
Posts: 606
Joined: Mon Nov 18, 2019 2:38 pm

Re: Maybe pruning?

Post by Darren »

It's definitely faster now, and I haven't gotten any error messages yet (touch wood)

edit: Scratch that, for some reason I can't access some old threads – first one I noticed was Ergativity for Novices, then bradrn's scratchpad, and also "Romance-Specific Word Evolution Game", "Transemilia", "Lang e Zafe", "Lexurgy SC (sound change applier)" and presumably others. They're different to the old error messages because reloading doesn't do anything. I just get the message

This page isn’t working
www.verduria.org is currently unable to handle this request.
HTTP ERROR 500

As far as I can tell it's entirely random – I ended up just clicking through pages of the Conlangery forum and got about one dud link per page. You might already know about this but I thought I might as well mention it anyway.
User avatar
Raphael
Posts: 4086
Joined: Sun Jul 22, 2018 6:36 am

Re: Maybe pruning?

Post by Raphael »

Thank you for your work, bradrn!

I might have noticed a similar problem to Darren's: right now, I can't access the "Guide to writing systems"-thread in Languages. I always get a completely empty page when I click that one.
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

Raphael wrote: Sun Jan 07, 2024 6:28 am Thank you for your work, bradrn!

I might have noticed a similar problem to Darren's: right now, I can't access the "Guide to writing systems"-thread in Languages. I always get a completely empty page when I click that one.
Er… oh dear. That really isn’t good. I’d better look into it…

EDIT: Testing a few different pages of that thread, it looks like they all work fine except for 4, 6 and 7. My immediate hunch is that it’s something BBCode-related, but it’s hard to know.

EDIT2: Oh dear, I downloaded error_log and found the dreaded Stack Trace:

Code: Select all

[07-Jan-2024 06:01:33 America/Boise] PHP Fatal error:  Uncaught Error: Call to undefined function str_contains() in /home3/verduria/public_html/cache/production/s9e_renderer_b78c88a79b17f46f0cdcdd0e0bf6b1c393ec05a9.php:29
Stack trace:
#0 /home3/verduria/public_html/vendor/s9e/text-formatter/src/Renderers/PHP.php(244): s9e_renderer_b78c88a79b17f46f0cdcdd0e0bf6b1c393ec05a9->renderQuickTemplate('LIST', '<LIST type="dec...')
#1 [internal function]: s9e\TextFormatter\Renderers\PHP->renderQuickCallback(Array)
#2 /home3/verduria/public_html/vendor/s9e/text-formatter/src/Renderers/PHP.php(202): preg_replace_callback('(<(?:(?!/)((?:A...', Array, '<SIZE size="150...')
#3 /home3/verduria/public_html/vendor/s9e/text-formatter/src/Renderers/PHP.php(292): s9e\TextFormatter\Renderers\PHP->renderQuick('<r><SIZE size="...')
#4 /home3/verduria/public_html/vendor/s9e/text-formatter/src/Renderer.php(66): s9e\TextFormatter\Renderers\PHP->renderRichText('<r><SIZE size="...')
#5 /home3/verduria/public_html/phpbb/textformatter/s9e/renderer.php(250): s9e\TextFormatter\Renderer->render('< in /home3/verduria/public_html/cache/production/s9e_renderer_b78c88a79b17f46f0cdcdd0e0bf6b1c393ec05a9.php on line 29
I suppose this gives me a lead on the problem, at least!

EDIT3: Apparently str_contains was only added in PHP 8. Meanwhile, the board seems to be running PHP 7.4.33.

So do I have to downgrade phpBB, now? I sure hope not…

EDIT4: The installation instructions say it supports ‘PHP 7.2.0+ up to and including PHP 8.1’. Which makes it sound like it should be alright? I’m back to being confused again.

EDIT5: Digging into the PHP file itself (the one listed in the stack trace above), it does seem to be the code which renders BBCode. In particular, I can reliably trigger it by making an ordered list (tag list=1).
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

I think I’ve got it working now. And, indeed, now that I can see them, the malfunctioning pages actually did contain numbered lists!

The underlying problem turned out to be with a particular vendored package, which checked for PHP 8, and switched to a different set of routines if it was detected. Unfortunately, for reasons I don’t wish to fathom, the check was malfunctioning. So I simply commented out that line and hardcoded the check to false, after which purging the cache fixed the problem. (For future reference, the relevant file is vendor/s9e/text-formatter/src/Configurator/RendererGenerators/PHP/XPathConvertor.php.)

Also, somewhere along the line, I ended up breaking the mechanism which redirects https://verduria.org to index.php. A quick edit to the .htaccess file fixed that too. But that makes me worry I might have accidentally broken other things too, so please let me know if you find anything!
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
User avatar
WeepingElf
Posts: 1341
Joined: Sun Jul 15, 2018 12:39 pm
Location: Braunschweig, Germany
Contact:

Re: Maybe pruning?

Post by WeepingElf »

Looks fine now. Thank you and congratulations!
... brought to you by the Weeping Elf
My conlang pages
zompist
Site Admin
Posts: 2663
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Maybe pruning?

Post by zompist »

I think that would have defeated me, so thanks again!

It looks like it's possible to upgrade the PHP version, but I'm not sure what the risks are.
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

zompist wrote: Sun Jan 07, 2024 3:15 pm I think that would have defeated me, so thanks again!
Once I figured out where to look, it wasn’t actually that hard. As I recall, I just searched for str_contains, and it was only used in that file, so then I just had to look for the code which used that file.
zompist wrote: Sun Jan 07, 2024 3:15 pm It looks like it's possible to upgrade the PHP version, but I'm not sure what the risks are.
If you can do that, I’d recommend it. phpBB advertises compatibility with PHP until version 8.1, so presumably if the new version is <=8.1 the risks are low.

(In fact, for a language as generally unsafe as PHP, I’d say that not upgrading is higher-risk than upgrading.)
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
Ares Land
Posts: 2745
Joined: Sun Jul 08, 2018 12:35 pm

Re: Maybe pruning?

Post by Ares Land »

That's really great -- and everything looks fine, so thanks brad!
bradrn
Posts: 5607
Joined: Fri Oct 19, 2018 1:25 am

Re: Maybe pruning?

Post by bradrn »

Ares Land wrote: Mon Jan 08, 2024 1:45 am That's really great -- and everything looks fine, so thanks brad!
You’re welcome!
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices

(Why does phpBB not let me add >5 links here?)
Travis B.
Posts: 6189
Joined: Sun Jul 15, 2018 8:52 pm

Re: Maybe pruning?

Post by Travis B. »

Ares Land wrote: Mon Jan 08, 2024 1:45 am That's really great -- and everything looks fine, so thanks brad!
Seconded!
Yaaludinuya siima d'at yiseka ha wohadetafa gaare.
Ennadinut'a gaare d'ate ha eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Post Reply