# PHP	Error: preg\_match(): Compilation failed: quantifier does not follow a repeatable item at offset 0

**URL:** <https://help.nextcloud.com/t/php-error-preg-match-compilation-failed-quantifier-does-not-follow-a-repeatable-item-at-offset-0/153082>\
**Category:** ℹ️ Support\
**Tags:** php\
**Created:** [January 5, 2023, 9:36pm UTC](https://help.nextcloud.com/t/php-error-preg-match-compilation-failed-quantifier-does-not-follow-a-repeatable-item-at-offset-0/153082 "2023-01-05T21:36:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![netlab](https://help.nextcloud.com/letter_avatar/netlab/32/5_5575768a8748004e209b776fc1b2916d.png) [@netlab](https://help.nextcloud.com/u/netlab)\
**Post date:** [January 5, 2023, 9:36pm UTC](https://help.nextcloud.com/t/php-error-preg-match-compilation-failed-quantifier-does-not-follow-a-repeatable-item-at-offset-0/153082/1 "2023-01-05T21:36:30Z")

</div>

> **Support intro**
>
> Sorry to hear you’re facing problems 🙁
> 
> _**[help.nextcloud.com](http://help.nextcloud.com) is for home/non-enterprise users. If you’re running a business, paid support can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where we can ensure your business keeps running smoothly.**_
> 
> In order to help you as quickly as possible, before clicking **Create Topic** please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
> 
> ```
> example
> 
> ```
> 
> Or for longer, use three backticks above and below the code snippet:
> 
> ```auto
> longer
> example
> here
> 
> ```
> 
> Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can ❤

Nextcloud version _(eg, 20.0.5)_: `25.0.2`  
Operating system and version _(eg, Ubuntu 20.04)_: `Ubuntu 20.04`  
Apache or nginx version _(eg, Apache 2.4.25)_: `Apache 2.4.41`  
PHP version _(eg, 7.4)_: `8.0.26`

The issue you are facing:  
I tried to search this issue in the forum but couldn’t found any, hoping this community can help me. I do not see any error in overview section however Admin longs continuously generating these logs as mentioned in title. I have updated PHP version last week so not sure it this started after upgrade. Please help me to clear these logs:-

Is this the first time you’ve seen this error? _(Y/N)_:

Steps to replicate it: I see this continuously not sure how to reproduce.

1. 
2. 
3. 

The output of your Nextcloud log in **Admin \> Logging** :

```auto
[PHP] Error: Error: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 0 at /var/www/nextcloud/apps/ransomware_protection/lib/Analyzer.php#257 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/apps/ransomware_protection/lib/Analyzer.php line 257
    preg_match()
 2. /var/www/nextcloud/apps/ransomware_protection/lib/Analyzer.php line 218
    OCA\RansomwareProtection\Analyzer->checkExtension()
 3. /var/www/nextcloud/apps/ransomware_protection/lib/CacheWrapper.php line 57
    OCA\RansomwareProtection\Analyzer->checkPath()
 4. <<closure>>
    OCA\RansomwareProtection\CacheWrapper->formatCacheEntry()
 5. /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 104
    array_map()
 6. /var/www/nextcloud/lib/private/Files/View.php line 1470
    OC\Files\Cache\Wrapper\CacheWrapper->getFolderContentsById()
 7. /var/www/nextcloud/lib/private/Files/Node/Folder.php line 101
    OC\Files\View->getDirectoryContent()
 8. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 260
    OC\Files\Node\Folder->getDirectoryListing()
 9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 200
    OCA\DAV\Connector\Sabre\Directory->getChildren()
10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 900
    Sabre\DAV\Tree->getChildren()
11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 982
    Sabre\DAV\Server->generatePathNodes()
12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1662
    Sabre\DAV\Server->getPropertiesIteratorForPath()
13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1647
    Sabre\DAV\Server->writeMultiStatus()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 346
    Sabre\DAV\Server->generateMultiStatus()
15. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPropFind()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
19. /var/www/nextcloud/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
20. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
21. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

PROPFIND /remote.php/dav/files/user/
from x.x.x.x by user at 2023-01-05T14:51:00-05:00

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
{
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“10.0.0.112” ],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “25.0.2.3”,
“overwrite.cli.url”: “http://10.0.0.112”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“default_locale”: “en_US”,
“default_phone_region”: “US”,
“logtimezone”: “America/New_York”,
“log_rotate_size”: 52428800,
“htaccess.RewriteBase”: “/”,
“twofactor_enforced”: “true”,
“twofactor_enforced_groups”: ,
“twofactor_enforced_excluded_groups”: ,
“memcache.local”: “\OC\Memcache\Redis”,
“memcache.locking”: “\OC\Memcache\Redis”,
“filelocking.enabled”: true,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“port”: 0,
“timeout”: 0
}
}

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
PASTE HERE

```

PASTE HERE

```auto

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

```

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 2:20pm UTC](https://help.nextcloud.com/t/php-error-preg-match-compilation-failed-quantifier-does-not-follow-a-repeatable-item-at-offset-0/153082/2 "2024-12-14T14:20:53Z")

</div>


