Bug 2124604

Summary: PHP: preg_match() always fail with PREG_INTERNAL_ERROR
Product: Red Hat Enterprise Linux 9 Reporter: yoshida.ryuichi
Component: phpAssignee: Remi Collet <rcollet>
Status: CLOSED MIGRATED QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer
Target Milestone: rcKeywords: MigratedToJIRA
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 20:24:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yoshida.ryuichi 2022-09-06 15:17:35 UTC
Description of problem:

PHP function preg_match() always fail with PREG_INTERNAL_ERROR status

Version-Release number of selected component (if applicable):

php-8.0.20-3.el9.x86_64
on CentOS Stream 9

How reproducible:

php.ini = install default, no custom setting.
any normal,simple call of preg_match() seems to reproduce this behavior.

```
$a = preg_match('/any pattern/', 'any string');  # with any delimiter

if ($a === false) { print "reproduced"; }
```

Steps to Reproduce:
1.
2.
3.

Actual results:
false (PREG_INTERNAL_ERROR)

Expected results:

preg_match() should return 0 or 1, depending on regex pattern and match string.

Additional info:

This behavior not observed with PHP on CentOS 6, 7, CentOS Stream 8, RHEL 9.0(PHP 8.0.13)

Comment 1 yoshida.ryuichi 2022-09-12 08:57:07 UTC
# dnf install php81
on CentOS Stream 9 solved this problem with PHP 8.0.20.

Comment 2 RHEL Program Management 2023-09-21 20:16:48 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 3 RHEL Program Management 2023-09-21 20:24:59 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.