-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Error - preg_replace_callback(): Compilation failed #3087
Comments
The bug still exists in version 25.2.1. |
also hit that. News app version: 25.2.1 |
I had entered the OS version incorrectly in the bug report. I also use FreeBSD. With a fresh install on Linux with NC 30.0.6 and News 20.5.1 I could not reproduce the bug. Maybe the problem is OS related? |
Hi, I can also reproduce the issue on FreeBSD. The reason is that the Net_URL2 library uses an invalid regex at the mentioned line. The single \x is invalid here. There is an issue here at the library repository about this problem: pear/Net_URL2#17 |
This behavior was changed in the pcre2 project, where this broken regex support was removed. PCRE2Project/pcre2@4d2bb33 It is part of version 10.45. The FreeBSD port was updated on 6 Feb 2025 https://www.freshports.org/devel/pcre2/ . This is why it probably affects our systems now (At least I updated the package to 10.45). |
That works perfectly! Instead of building a new (old) pcre2 version, I simply added the two zeros to line 1201 in /www/nextcloud/www/apps/news/vendor/pear/net_url2/Net/URL2.php (pear/Net_URL2@2639e87):
|
I was losing my marbles because some update caused all feeds output "No parser can handle this stream" @Pantos hotfix did the trick |
This is strange. I applied the hotfix, which made feed updates work in general again, but some of my feeds still don't update with "No parser can handle this stream". I tried those with the feed-io command line tool and they worked just fine. Is the change in line 1201 the only thing you need to do? |
I have the same issue as @dersebi after applying the "hotfix". |
Had the same trouble. Or have? Edit: Okay, the question about the errors can be disregarded. Manual refresh didn't do a thing, but shortly I wrote the post the remaining errors went away. |
Like others, I applied the hotfix of editing the one line in the URL2.php file. I restarted my entire server, and mysteriously after some amount of time (between 10 minutes to an hour, ish) the fix worked. For whatever reason, it takes a bit of time to actually, "fix" things. Seems to be reproducible at least. |
Unfortunately I still see the "No parser can handle this stream" errors with the hotfix. Even after a server reboot. Tried a downgrade of pcre as well which did not help either. I guess something got messed up in my install :( |
I'm also facing this issue, my system info is below. After applying the patch, and a few minutes passed (cron was executed multiple times, so 10-15 minutes), the issue was resolved. Executing cron directly did not immediately fix the issue. News app version: 25.2.1 |
I can confirm that some feeds do not work for me, which could be retrieved before ("No parser can handle this stream"). Deleting and re-adding the affected feeds seems to be the way to go (as suggested by @dersebi #3087 (comment)). Now it works again. |
Re-Adding them worked for me too except for one ( |
IMPORTANT
Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)
Explain the Problem
After upgrading to NC 30.0.6 i get the PHP error:
[PHP] Fehler: preg_replace_callback(): Compilation failed: digits missing after \x or in \x{} or \o{} or \N{U+} at offset 3 at /www/nextcloud/www/apps/news/vendor/pear/net_url2/Net/URL2.php#1200 von ? von -- um 14.02.2025, 22:30:07
Steps to Reproduce
The error occurs every time the cronjob updates the feeds.
System Information
Contents of nextcloud/data/nextcloud.log
The text was updated successfully, but these errors were encountered: