rss and multi-byte strings
Posted: 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:
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
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
reloading the phpinfo page now shows that multibyte support is "provided by mbstring", and rss and atom feeds now work as expected
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
to enable multibyte support, i had to install the mbstring extension, php-mbstring
Code: Select all
sudo apt install php-mbstringCode: Select all
sudo /etc/init.d/apache2 reload