Hello,
The following error message appears when trying to embed a podcast player as a bloc into an article or a web page:
RSS Error: XML or PCRE extensions not loaded!
I could check that both XML and PCRE are enabled in my phpinfo config:
$> php -i
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.12
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 10.39 2021-10-29
PCRE Unicode Version => 14.0.0
PCRE JIT Support => enabled
PCRE JIT Target => x86 64bit (little endian + unaligned)
Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.jit => 1 => 1
pcre.recursion_limit => 100000 => 100000
I tried to add a feed to my self-hosted FreshRSS (i.e. https://www.cnil.fr/fr/rss.xml) but the error The feed cannot be added
shows up. Same with the #force_feed option. I went to the log view from the web interface and I can see the line XML or PCRE extensions not loaded! [https://www.cnil.fr/fr/rss.xml]
. I then went to the «Installation checking» tab, in the «Administration» section and two errors were there: Cannot find curl lib (php-curl package)
and Cannot find a lib for browsing the DOM (php-xml package)
. The problem is that I already have these two packages on my server:
$ apt list --installed | grep curl
php-curl/stable,now 2:7.3+69 all [installed]
php7.3-curl/stable,now 7.3.29-1~deb10u1 armhf [installed]
$ apt list --installed | grep xml
php-xml/stable,now 2:7.3+69 all [installed]
php7.3-xml/stable,now 7.3.29-1~deb10u1 armhf [installed]
Of course I tried to restart the nginx service but it didn’t work. FreshRSS is also up to date.
LAMP webserver on RPI, RSS help using wordpress.
Solved!!!
Hey all, I recently followed a project tutorial on creating a LAMP web server on the RPI website. I followed the instructions and have a local host website built, using wordpress. I’d like to import a RSS feed onto the page, but I’m getting an error «xml or pcre extensions not loaded.» I can not find any settings in wordpress to change this, does anybody have an idea what I may be missing? Thank you.
antvet opened this issue 2 years ago · comments
I tried to add a feed to my self-hosted FreshRSS (i.e. https://www.cnil.fr/fr/rss.xml) but the error The feed cannot be added
shows up. Same with the #force_feed option. I went to the log view from the web interface and I can see the line XML or PCRE extensions not loaded! [https://www.cnil.fr/fr/rss.xml]
. I then went to the «Installation checking» tab, in the «Administration» section and two errors were there: Cannot find curl lib (php-curl package)
and Cannot find a lib for browsing the DOM (php-xml package)
. The problem is that I already have these two packages on my server:
$ apt list --installed | grep curl
php-curl/stable,now 2:7.3+69 all [installed]
php7.3-curl/stable,now 7.3.29-1~deb10u1 armhf [installed]
and
$ apt list --installed | grep xml
php-xml/stable,now 2:7.3+69 all [installed]
php7.3-xml/stable,now 7.3.29-1~deb10u1 armhf [installed]
Of course I tried to restart the nginx service but it didn’t work. FreshRSS is also up to date.
Here are my specs:
- OS : Raspbian GNU/Linux 10
- Webserver : NGINX 1.14.2
- PHP : 7.3.29
- DB : MariaDB 10.3.29
- FreshRSS : 1.19.0-dev
- Browser : Firefox 91
Hello,
That might be due to multiple PHP versions installed and/or misconfiguration.
For the Web
You can try to create a file ./FreshRSS/p/phpinfo.php
with the following content:
and then access it from your browser https://freshrss.example.net/phpinfo.php
For the command line
Alternatively, we are providing a Docker image for Raspberry Pi: freshrss/freshrss:arm
@antvet any news here? Is your issue already solved?
WordPress RSS Feed Widget displays the following broad error message if it has problems to init or display a RSS feeds:
An error has occurred; the feed is probably down. Try again later.
This error message can have multiple reasons (search Google). Those reasons are related to the incorporated SimplePie library. One of the main reasons for the display of the error message however is if the ->init() call for the feed object returns false.
The cause of returning false again can have multiple reasons.
One cause I did not find quite documented is the simple fact that the XML, the PCRE or the XMLREADER extension is not loaded (PHP A-Z extension listing). Normally the XML extension should be loaded nowadays, so probably while checking the server configuration it gets overlooked.
A call to phpinfo(INFO_MODULES); will show which extensions are loaded, here is some other rough script for a quick check:
<?php $extensions = array('xml', 'pcre', 'xmlreader'); function extension_info($name) { $ret = new StdClass(); $ret->name = $ret->name_ = $name; $ret->loaded = (int) extension_loaded($name); $ret->version = null; if ($ret->loaded) { $refl = new ReflectionExtension($name); $ret->name = $refl->getName(); $ret->version = $refl->getVersion(); } return $ret; } foreach($extensions as $ext) { extract((array) extension_info($ext)); echo 'Name: ', $name, '(', $name_,') <br>', "n"; echo 'Version: ', $version, '<br>', "n"; echo 'Loaded: ', $loaded, '<br>', "n"; echo '<hr>'; } // phpinfo(INFO_MODULES);
You can find all SimplePie Requirements in the SimplePie Documentation.
Read On: WordPress Technical Installation Checklist
Image Credits: A quote from the Movie Rebecca (1940) directed by Alfred Hitchcock has been used in the picture.
This entry was posted in PHP Development, Pressed and tagged Configuration, Error, Extension, Feed, PCRE, PHP, RSS, SimplePie, WordPress, XML, XMLREADER. Bookmark the permalink.