PHP Fatal error: Unable to start pcre module in Unknown on line 0

Hi,

I ran into a strange issue today: my PHP installation doesn’t work anymore.

When I try to run even php --version, i get the following error message:
PHP Fatal error: Unable to start pcre module in Unknown on line 0

I tried looking this up online and found posts like this where the answer was to remove libpcre files from /usr/local/lib, but that folder is empty for me.

I’ve tried reinstalling the php8 package, but that didn’t solve the issue.

I’ve also checked that I have the pcre packages installed. Here is the output of zypper se pcre:

S  | Name                                | Summary                                                                                | Type
---+-------------------------------------+----------------------------------------------------------------------------------------+-----------
i+ | jpcre2-devel                        | C++ wrapper for the PCRE2 library (header only)                                        | package
i+ | libpcre1                            | A library for Perl-compatible regular expressions                                      | package
i  | libpcre1-32bit                      | A library for Perl-compatible regular expressions                                      | package
   | libpcre1-debuginfo                  | Debug information for package libpcre1                                                 | package
i  | libpcre2-8-0                        | A library for Perl-compatible regular expressions                                      | package
i+ | libpcre2-8-0-32bit                  | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-8-0-32bit-debuginfo        | Debug information for package libpcre2-8-0                                             | package
   | libpcre2-8-0-debuginfo              | Debug information for package libpcre2-8-0                                             | package
i  | libpcre2-8-0-x86-64-v3              | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-8-0-x86-64-v3-debuginfo    | Debug information for package libpcre2-8-0                                             | package
i  | libpcre2-16-0                       | A library for Perl-compatible regular expressions                                      | package
i+ | libpcre2-16-0-32bit                 | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-16-0-32bit-debuginfo       | Debug information for package libpcre2-16-0                                            | package
   | libpcre2-16-0-debuginfo             | Debug information for package libpcre2-16-0                                            | package
i  | libpcre2-16-0-x86-64-v3             | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-16-0-x86-64-v3-debuginfo   | Debug information for package libpcre2-16-0                                            | package
i  | libpcre2-32-0                       | A library for Perl-compatible regular expressions                                      | package
i+ | libpcre2-32-0-32bit                 | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-32-0-32bit-debuginfo       | Debug information for package libpcre2-32-0                                            | package
   | libpcre2-32-0-debuginfo             | Debug information for package libpcre2-32-0                                            | package
i  | libpcre2-32-0-x86-64-v3             | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-32-0-x86-64-v3-debuginfo   | Debug information for package libpcre2-32-0                                            | package
i  | libpcre2-posix3                     | A library for Perl-compatible regular expressions                                      | package
i+ | libpcre2-posix3-32bit               | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-posix3-32bit-debuginfo     | Debug information for package libpcre2-posix3                                          | package
   | libpcre2-posix3-debuginfo           | Debug information for package libpcre2-posix3                                          | package
i  | libpcre2-posix3-x86-64-v3           | A library for Perl-compatible regular expressions                                      | package
   | libpcre2-posix3-x86-64-v3-debuginfo | Debug information for package libpcre2-posix3                                          | package
i  | libpcre16-0                         | A library for Perl-compatible regular expressions                                      | package
i+ | libpcre16-0-32bit                   | A library for Perl-compatible regular expressions                                      | package
   | libpcre16-0-debuginfo               | Debug information for package libpcre16-0                                              | package
i  | libpcre32-0                         | PERL 5 regular expression pattern matching                                             | package
   | libpcre32-0-debuginfo               | Debug information for package libpcre32-0                                              | package
i  | libpcrecpp0                         | A library for Perl-compatible regular expressions                                      | package
i+ | libpcrecpp0-32bit                   | A library for Perl-compatible regular expressions                                      | package
   | libpcrecpp0-debuginfo               | Debug information for package libpcrecpp0                                              | package
i  | libpcreposix0                       | A library for Perl-compatible regular expressions                                      | package
i+ | libpcreposix0-32bit                 | A library for Perl-compatible regular expressions                                      | package
   | libpcreposix0-debuginfo             | Debug information for package libpcreposix0                                            | package
   | ocaml-pcre                          | Perl compatibility regular expressions (PCRE) for OCaml                                | package
   | ocaml-pcre-devel                    | Development files for ocaml-pcre                                                       | package
   | pcre                                | PERL 5 regular expression pattern matching                                             | srcpackage
   | pcre                                | PERL 5 regular expression pattern matching                                             | package
   | pcre-debuginfo                      | Debug information for package pcre                                                     | package
   | pcre-debugsource                    | Debug sources for package pcre                                                         | package
i+ | pcre-devel                          | A library for Perl-compatible regular expressions                                      | package
   | pcre-devel-static                   | A library for Perl-compatible regular expressions                                      | package
i  | pcre-doc                            | A library for Perl-compatible regular expressions                                      | package
   | pcre-testsuite                      | Tests for libpcre                                                                      | package
i+ | pcre-tools                          | A library for Perl-compatible regular expressions                                      | package
   | pcre2                               | A library for Perl-compatible regular expressions                                      | srcpackage
   | pcre2-debugsource                   | Debug sources for package pcre2                                                        | package
i  | pcre2-devel                         | A library for Perl-compatible regular expressions                                      | package
i+ | pcre2-devel-static                  | A library for Perl-compatible regular expressions                                      | package
i  | pcre2-doc                           | A library for Perl-compatible regular expressions                                      | package
i  | pcre2-tools                         | A library for Perl-compatible regular expressions                                      | package
   | pcre2-tools-debuginfo               | Debug information for package pcre2-tools                                              | package
   | R-PCRedux                           | Quantitative Polymerase Chain Reaction (qPCR) Data Mining and Machine Learning Toolkit | srcpackage
   | R-PCRedux                           | Quantitative Polymerase Chain Reaction (qPCR) Data Mining and Machine Learning Toolkit | package

I basically have every pcre-related package installed, except -debuginfo packages.

What am I missing here?

Thanks very much for your help!

I do not know the answer, but in such situations it is important to find out, and explain in your post:

  • anymore since yesterday, longer, …?
  • what was changed between the moment it still functioned and the moment you found it did not “anymore”?

Oh and BTW, instead of typing things like " Here is the output of zypper se pcre:", it is simpler for you and better to read for others when you copy/paste the prompt/command line with the output. Only one more line, easy to do I assume.

Oh and BTW, instead of typing things like " Here is the output of zypper se pcre:", it is simpler for you and better to read for others when you copy/paste the prompt/command line with the output. Only one more line, easy to do I assume.

I’ll keep that in mind for next time, thanks. Can’t edit my post anymore, so I’ll leave what I pasted as-is.

Anyway:

anymore since yesterday, longer, …?

I used PHP about one week ago. Worked fine. Yesterday I noticed it wasn’t working anymore.

what was changed between the moment it still functioned and the moment you found it did not “anymore”?

2 things:

  1. I did daily system upgrades (zypper dup --allow-vendor-change),
  2. I installed Gnome (currently using KDE) and tried it out on a separate user, then I rolled back to the snapshot before installing Gnome.

That’s all of the significant changes I remember doing that might somehow impact PHP. Besides that, all I did was browse and write code.

I experienced the same Issue but I usually update every 1-2weeks

my last update was April 15 with working pcre module
Updated this April 27 now its not working

Rolled back to my April 15 snapshot and its now working again.

So, it might be something from an update.

Now the question is: what could be the culprit?

I’ve got the same problem.

According the update history, the system update installed new versions of libpcre today:

2024-04-27 11:18:28|install|libpcre2-16-0|10.43-2.1|x86_64||download.opensuse.org-oss|ee3240fa28e3c8da0fe64efb509820a9c43fc6df47bf3c4bb02010f8c03d8e14c60523ccd10c90153cad56b2e754685b029ab2abafecac7b3e2613fb265787df|
2024-04-27 11:18:28|install|libpcre2-8-0|10.43-2.1|x86_64||download.opensuse.org-oss|6ecea0ea1895d14e938355bfc76796fb948df41afbb9b91b3cda228e25158efbcf8e65ad7f428f4a16f1f9010a30e6d10f1c9d71c862aeb06dc0de0ac2f74b52|

The versions installed before were libpcre2-16-0|10.43-1.1 and libpcre2-8-0|10.43-1.1.

Unfortunately, the old versions lo longer seem to be available in the tumbleweed repo. Where can I get them from?

Hello everyone,

There was an update last night (# zypper refresh && zypper dup) and this morning when I wanted to run a PHP script, I got the same message as you.

Either there’s going to be a rollback, or there’ll be an update later today :wink:

GaLaGaNN

If it helps, here are the latest changes I’ve made ==> /var/log/zypp/history :

Full => 2024-04-25 20:28:11|command|root@GB4pro|'zypper' 'dup'|2024-04-25 20:28:11|ins - Pastebin.com

As this seems to be a regression intoiduced by a zypper dup , please file a bug report.
https://bugzilla.opensuse.org/index.cgi
Same username/password as here.

Thanks, I’ve opened it => https://bugzilla.opensuse.org/show_bug.cgi?id=1223442

Thanks for the link. Other may now add further information when they think that will help.

I deleted all packages with ‘-v3’ in the name, it solved the problem.

3 Likes

I confirm that removing the following packages and rebooting them solves the problem: libpcre2-16-0-x86-64-v3, libpcre2-32-0-x86-64-v3, libpcre2-8-0-x86-64-v3

2 Likes

YES!
removing all -v3 solved the problem
(restarting apache2)

1 Like

YES! removing all -v3 worked for me too.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.