rss and multi-byte strings

Find help with FlatPress plugins, report a plugin bug, request or present new plugins.
Post Reply
User avatar
lainalien
Posts: 1
Joined: Tue Jun 24, 2025 12:56 am

rss and multi-byte strings

Post by lainalien » Sat Jan 17, 2026 7:39 am

Hi all

I just went on a journey of discovery trying to get the rss and atom feeds on my blog working on my VPS. the long and short of it is that the default configuration for PHP is for the multibyte string extension to be disabled, but is used in core.language.php
idk how best to format this for the wiki, or whether it would be best to put it in the installation section, or in the rss plugin section with a link in installation, but figured the information should be somewhere.

on a fresh install of flatpress 1.4 to my lamp server (ubuntu 24.04, php 8.3), the rss and atom feeds would return a 500 error. watching the php error logs and reloading the error page gave this stack trace:

Code: Select all

2026-01-16T22:44:30.944253-05:00 wired-navi php: PHP Fatal error:  Uncaught Error: Call to undefined function mb_check_encoding() in /var/www/html/lainalien.space/public_html/blog/fp-includes/core/core.language.php:446
2026-01-16T22:44:30.944500-05:00 wired-navi php: Stack trace:
2026-01-16T22:44:30.944535-05:00 wired-navi php: #0 /var/www/html/lainalien.space/public_html/blog/fp-content/compile/e93fccb09cf8b04111b9595da102f3f4^9516bb53639f944ce0fd43441f1cc2a695da276c_0.file.rss.tpl.php(99): fix_encoding_issues()
2026-01-16T22:44:30.944574-05:00 wired-navi php: #1 /var/www/html/lainalien.space/public_html/blog/fp-includes/smarty-4.5.5/libs/sysplugins/smarty_template_resource_base.php(123): content_69225e65273ad5_34326260()
2026-01-16T22:44:30.944610-05:00 wired-navi php: #2 /var/www/html/lainalien.space/public_html/blog/fp-includes/smarty-4.5.5/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
2026-01-16T22:44:30.944641-05:00 wired-navi php: #3 /var/www/html/lainalien.space/public_html/blog/fp-includes/smarty-4.5.5/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()
2026-01-16T22:44:30.944676-05:00 wired-navi php: #4 /var/www/html/lainalien.space/public_html/blog/fp-includes/smarty-4.5.5/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render()
2026-01-16T22:44:30.944708-05:00 wired-navi php: #5 /var/www/html/lainalien.space/public_html/blog/fp-includes/smarty-4.5.5/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute()
2026-01-16T22:44:30.944732-05:00 wired-navi php: #6 /var/www/html/lainalien.space/public_html/blog/index.php(223): Smarty_Internal_TemplateBase->display()
2026-01-16T22:44:30.944760-05:00 wired-navi php: #7 /var/www/html/lainalien.space/public_html/blog/index.php(231): index_display()
2026-01-16T22:44:30.944787-05:00 wired-navi php: #8 {main}
2026-01-16T22:44:30.945009-05:00 wired-navi php:   thrown in /var/www/html/lainalien.space/public_html/blog/fp-includes/core/core.language.php on line 446
mb_check_encoding() is provided by a multibyte string extension which, according to the php documentation, is not enabled by default. to check if it was i looked at my phpinfo(); page and saw in my case that "Zend Multibyte Support" was disabled (troubleshooting pages i found around didnt mention zend but had similar lines).

to enable multibyte support, i had to install the mbstring extension, php-mbstring

Code: Select all

sudo apt install php-mbstring
and then enable it in php.ini. my configuration is largely the default provided by my vps, which matches my own local config's layout according to line numbers. Zend Multibyte Support can be enabled by setting zend.multibyte to True (commented out on line 376) and enabling extension=multistring (cummented out on line 948). then just reload apache with

Code: Select all

sudo /etc/init.d/apache2 reload
reloading the phpinfo page now shows that multibyte support is "provided by mbstring", and rss and atom feeds now work as expected
Image

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: rss and multi-byte strings

Post by fraenkiman » Sat Jan 17, 2026 11:07 pm

Hello lainalien,

Welcome to the support forum. Thank you for your feedback regarding the dependency on the multibyte string extension in FlatPress 1.4 -> core.language.php -> function fix_encoding_issues(). Since the feed plugin is part of Ditrobotion, I think
a note here is appropriate.

I have also created an issue.

Thank you very much and best regards,
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: rss and multi-byte strings

Post by fraenkiman » Sun Jan 18, 2026 12:23 am

Hello lainalien,

I have included a fix for this issue in the current master branch. Could you please run a test? I have sent you the details via private message.

Many thanks.
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: rss and multi-byte strings

Post by fraenkiman » Sun Jan 18, 2026 4:10 am

Thank you for the test.
Merged for RC2.

Good night.
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests