# Update to 31.0.2 failed with "internal server error"

**URL:** <https://help.nextcloud.com/t/update-to-31-0-2-failed-with-internal-server-error/220965>\
**Category:** ℹ️ Support\
**Tags:** nc30, cpanel, nc31\
**Created:** [March 24, 2025, 12:43pm UTC](https://help.nextcloud.com/t/update-to-31-0-2-failed-with-internal-server-error/220965 "2025-03-24T12:43:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerlyKing](https://help.nextcloud.com/letter_avatar/perlyking/32/6_22734026db12803ebb3e059622ac3534.png) [@PerlyKing](https://help.nextcloud.com/u/PerlyKing)\
**Post date:** [March 24, 2025, 12:43pm UTC](https://help.nextcloud.com/t/update-to-31-0-2-failed-with-internal-server-error/220965/1 "2025-03-24T12:43:48Z")

</div>

> **Support intro**
>
> ## Sorry to hear you’re facing problems. 🙁
> 
> _The community help forum ([help.nextcloud.com](http://help.nextcloud.com)) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are **volunteering their time to help you.** _
> 
> **If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where Nextcloud engineers can help ensure your business keeps running smoothly.**
> 
> ## Getting help
> 
> In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
> 
> **Before clicking submit** : Please check if your query is already addressed via the following resources:
> 
> - [Official documentation](https://docs.nextcloud.com) (searchable and regularly updated)
> - [How to topics and FAQs](https://help.nextcloud.com/c/how-to-faqs/9)
> - [Forum search](https://help.nextcloud.com/search)
> 
> (Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

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. ❤

## The Basics

- Nextcloud Server version _(e.g., 29.x.x)_:
  - `31.0.2`

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - `Red Hat 8.5.0-18`

- Web server and version _(e.g, Apache 2.4.25)_:
  - `I don't know how to find this`

- Reverse proxy and version \_(e.g. nginx 1.27.2)
  - `replace me`

- PHP version _(e.g, 8.3)_:
  - `8.1`

- Is this the first time you’ve seen this error? (Yes / No):
  - `Yes`

- When did this problem seem to first start?
  - `During update from 30.0.8 to 31.0.2`

- Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - `Web updater`

- Are you using CloudfIare, mod\_security, or similar? _(Yes / No)_
  - `No`

### Summary of the issue you are facing:

When the update appeared to have finished, it went to a page with the following text:

```auto
Internal Server Error
The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details
Remote Address: XXXX
Request ID: m3MNaSfHY2ltbF2me8SE

```

I’m running Nextcloud on a cPanel server to which I have limited direct access; the initial installation was done through Softaculous.

### Steps to replicate it (hint: details matter!):

1. Use the web updater to update from 30.0.8 to 31.0.2
2. 
3. 

### Log entries

#### Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the _Copy raw_ option from _Administration settings-\>Logging_ screen or from your `nextcloud.log` located in your data directory). Feel free to use a pastebin/gist service if necessary.

There are quite a few like this:

```auto
{"reqId":"CYXdK47ZoHskclPpS8TX","level":3,"time":"2025-03-23T10:15:23+00:00","remoteAddr":"XXXX","user":false,"app":"index","method":"GET","url":"/","message":"OC\\User\\Database::countUsers(): Return value must be of type int|false, string returned","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"30.0.8.1","exception":{"Exception":"TypeError","Message":"OC\\User\\Database::countUsers(): Return value must be of type int|false, string returned","Code":0,"Trace":[{"file":"/home/XXXX/XXXX/lib/private/User/Manager.php","line":500,"function":"countUsers","class":"OC\\User\\Database","type":"->"},{"file":"/home/XXXX/XXXX/lib/base.php","line":287,"function":"countUsersTotal","class":"OC\\User\\Manager","type":"->"},{"file":"/home/XXXX/XXXX/lib/base.php","line":990,"function":"printUpgradePage","class":"OC","type":"::"},{"file":"/home/XXXX/XXXX/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/XXXX/XXXX/lib/private/User/Database.php","Line":475,"message":"OC\\User\\Database::countUsers(): Return value must be of type int|false, string returned","exception":{},"CustomMessage":"OC\\User\\Database::countUsers(): Return value must be of type int|false, string returned"}}

```

#### Web Browser

If the problem is related to the Web interface, open your browser inspector _Console_ and _Network_ tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

```auto
GET https://XXXX/index.php/ 500 (Internal Server Error)

```

#### Web server / Reverse Proxy

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

```auto
PASTE HERE

```

### Configuration

#### Nextcloud

The output of `occ config:list system` or similar is best, but, if not possible, the contents of your `config.php` file from `/path/to/nextcloud` is fine (make sure to remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'instanceid' => 'XXXX',
  'passwordsalt' => 'XXXX',
  'secret' => 'XXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXX',
  ),
  'datadirectory' => '/home/XXXX/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '30.0.8.1',
  'overwrite.cli.url' => 'https://XXXX',
  'dbname' => 'XXXX',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'XXXX',
  'dbpassword' => 'XXXX',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'XXXX',
  'mail_domain' => 'XXXX',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'XXXX',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'XXXX',
  'mail_smtppassword' => 'XXXX',
  'mysql.utf8mb4' => true,
  'maintenance_window_start' => 1,
  'default_phone_region' => 44,
  'updater.secret' => 'XXXX',
);

```

#### Apps

The output of `occ app:list` (if possible).

```auto
Enabled:
  - activity: 3.0.0
  - app_api: 4.0.6
  - calendar: 5.2.0
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 7.0.4
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - maps: 1.5.0
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - profile: true
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.6.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - admin_audit: 1.21.0
  - bruteforcesettings: 4.0.0 (installed 2.2.0)
  - encryption: 2.19.0
  - files_external: 1.23.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0

```

### Tips for increasing the likelihood of a response

- Use the `preformatted text` formatting option in the editor for all log entries and configuration output.
- If screenshots are useful, feel free to include them.
  - If possible, also include key error output in text form so it can be searched for.

- Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

---

<div class="post-metadata">

**Author:** ![j-ed](https://help.nextcloud.com/user_avatar/help.nextcloud.com/j-ed/32/7281_2.png) [@j-ed](https://help.nextcloud.com/u/j-ed)\
**Post date:** [March 24, 2025, 2:04pm UTC](https://help.nextcloud.com/t/update-to-31-0-2-failed-with-internal-server-error/220965/2 "2025-03-24T14:04:41Z")

</div>

You know that this forum can be searched by using the search function in the upper right corner?

> [@Fresh install of server 31 & OC\\User\\Database::countUsers() error](https://help.nextcloud.com/t/fresh-install-of-server-31-oc-user-database-countusers-error/218958):
>
> The Basics Nextcloud Server version: 31 Operating system and version: Cloudlinux Web server and version: Litespeed PHP version: 8.2 Is this the first time you’ve seen this error? (Yes / No): Yes When did this problem seem to first start? immediately after fresh install Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.) webinstaller Are you using CloudfIare, mod\_security, or similar? (Yes / No) No Summary of the issue you are facing: After installation with we…

> <https://github.com/nextcloud/server/issues/51486>
>
> \### ⚠️ This issue respects the following points: ⚠️
> 
> \- \[x\] This is a \*\*bug\*\*, no…t a question or a configuration/webserver/proxy issue.
> \- \[x\] This issue is \*\*not\*\* already reported on \[Github\](https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3Abug) OR \[Nextcloud Community Forum\](https://help.nextcloud.com/) \_(I've searched it)\_.
> \- \[x\] Nextcloud Server \*\*is\*\* up to date. See \[Maintenance and Release Schedule\](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) for supported versions.
> \- \[x\] I agree to follow Nextcloud's \[Code of Conduct\](https://nextcloud.com/contribute/code-of-conduct/).
> 
> \### Bug description
> 
> I upgraded from Nextcloud 30 to 31 using occ and updater.phar method.
> 
> I cannot access the /settings/admin/overview and /settings/users pages anymore: both generate systematic server errors (see below). The culprit seems to be the type returned by the countUsers function in /lib/private/User/Database.php on line 475:
> \`return $result-\>fetchOne();\`
> 
> Changing this line to 
> \`return ($result-\>fetchOne() !== false) ? (int) $result-\>fetchOne() : false;\`
> allowed me to retreive access to these pages (this is why the integrity check fails below)
> 
> Others are affected, see https://help.nextcloud.com/t/fresh-install-of-server-31-oc-user-database-countusers-error/218958/4
> 
> Both 31.0.0 and 31.0.1 are affected.
> 
> \### Steps to reproduce
> 
> 1.Upgrade from Nextcloud 30 to 31
> 2.Log in as admin
> 3.Try accessing /settings/admin/overview and /settings/users
> 
> 
> \### Expected behavior
> 
> These pages should not generate server errors
> 
> \### Nextcloud Server version
> 
> 31
> 
> \### Operating system
> 
> Debian/Ubuntu
> 
> \### PHP engine version
> 
> PHP 8.2
> 
> \### Web server
> 
> Apache (supported)
> 
> \### Database engine version
> 
> MySQL
> 
> \### Is this bug present after an update or on a fresh install?
> 
> Upgraded to a MAJOR version (ex. 31 to 32)
> 
> \### Are you using the Nextcloud Server Encryption module?
> 
> Encryption is Disabled
> 
> \### What user-backends are you using?
> 
> \- \[x\] Default user-backend \_(database)\_
> \- \[\] LDAP/ Active Directory
> \- \[\] SSO - SAML
> \- \[\] Other
> 
> \### Configuration report
> 
> \`\`\`json
> {
> "system": {
> "instanceid": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "passwordsalt": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "secret": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "trusted\_domains": \[
> "\*\*\*REMOVED SENSITIVE VALUE\*\*\*"
> \],
> "datadirectory": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "dbtype": "mysql",
> "version": "31.0.1.2",
> "overwrite.cli.url": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*o",
> "dbname": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "dbhost": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "dbport": "",
> "dbtableprefix": "oc\_",
> "dbuser": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "dbpassword": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "installed": true,
> "debug": false,
> "maintenance": false,
> "maintenance\_window\_start": 1,
> "enable\_certificate\_management": false,
> "mail\_from\_address": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "mail\_smtpmode": "smtp",
> "mail\_domain": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "theme": "",
> "trashbin\_retention\_obligation": "30, 31",
> "loglevel": 0,
> "updater.release.channel": "stable",
> "versions\_retention\_obligation": "auto",
> "mail\_smtphost": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "mail\_smtpport": "465",
> "mail\_smtpauth": 1,
> "mail\_smtpname": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "mail\_smtppassword": "\*\*\*REMOVED SENSITIVE VALUE\*\*\*",
> "mail\_smtpsecure": "ssl",
> "overwriteprotocol": "https",
> "mysql.utf8mb4": true,
> "default\_phone\_region": "CH",
> "app\_install\_overwrite": \[
> "spreed"
> \]
> }
> }
> \`\`\`
> 
> \### List of activated Apps
> 
> \`\`\`shell
> \- activity: 4.0.0
> - app\_api: 5.0.2
> - bruteforcesettings: 4.0.0
> - circles: 31.0.0
> - cloud\_federation\_api: 1.14.0
> - comments: 1.21.0
> - contactsinteraction: 1.12.0
> - dav: 1.33.0
> - federatedfilesharing: 1.21.0
> - federation: 1.21.0
> - files: 2.3.1
> - files\_downloadlimit: 4.0.0
> - files\_external: 1.23.0
> - files\_pdfviewer: 4.0.0
> - files\_reminders: 1.4.0
> - files\_sharing: 1.23.1
> - files\_trashbin: 1.21.0
> - files\_versions: 1.24.0
> - logreader: 4.0.0
> - lookup\_server\_connector: 1.19.0
> - mail: 4.2.6
> - nextcloud\_announcements: 3.0.0
> - notifications: 4.0.0
> - oauth2: 1.19.1
> - password\_policy: 3.0.0
> - photos: 4.0.0-dev.1
> - privacy: 3.0.0
> - profile: 1.0.0
> - provisioning\_api: 1.21.0
> - recommendations: 4.0.0
> - related\_resources: 2.0.0
> - serverinfo: 3.0.0
> - settings: 1.14.0
> - sharebymail: 1.21.0
> - spreed: 21.0.1
> - support: 3.0.0
> - survey\_client: 3.0.0
> - systemtags: 1.21.1
> - text: 5.0.0
> - theming: 2.6.1
> - twofactor\_backupcodes: 1.20.0
> - twofactor\_totp: 13.0.0-dev.0
> - updatenotification: 1.21.0
> - user\_status: 1.11.0
> - viewer: 4.0.0
> - weather\_status: 1.11.0
> - webhook\_listeners: 1.2.0
> - workflowengine: 2.13.0
> Disabled:
> - admin\_audit: 1.21.0
> - dashboard: 7.11.0 (installed 6.0.0)
> - encryption: 2.19.0
> - firstrunwizard: 4.0.0 (installed 2.4.0)
> - suspicious\_login: 9.0.1 (installed 1.0.0)
> - twofactor\_nextcloud\_notification: 5.0.0
> - user\_ldap: 1.22.0
> \`\`\`
> 
> \### Nextcloud Signing status
> 
> \`\`\`shell
> Technical information
> =====================
> The following list covers which files have failed the integrity check. Please read
> the previous linked documentation to learn more about the errors and how to fix
> them.
> 
> Results
> =======
> \- core
> - INVALID\_HASH
> - lib/private/User/Database.php
> 
> Raw output
> ==========
> Array
> (
> \[core\] =\> Array
> (
> \[INVALID\_HASH\] =\> Array
> (
> \[lib/private/User/Database.php\] =\> Array
> (
> \[expected\] =\> abbafb9122557ac838c53e3d6efd871d4f95cebb14284232e2aa2b41b25c72dd72053ec1ef1683839e1ffa3620921759f6af4af5ee5170ad8dbd42bfdc7e9b8e
> \[current\] =\> dd3cb7f808973a9acdc96c2d93beebb5ff6dbc973f34a619f9fadea0bba0990049432c5f6b822a75d67461b38ce01fa8d19d273900157fe893bcbe23626e6d33
> )
> 
> )
> 
> )
> 
> )
> \`\`\`
> 
> \### Nextcloud Logs
> 
> \`\`\`json
> {
> "reqId": "Z9QAHECZeDCfmi2dzm\_-kQABjhk",
> "level": 3,
> "time": "2025-03-14T10:08:39+00:00",
> "remoteAddr": "185.22.110.40",
> "user": "MYADMINUSER",
> "app": "index",
> "method": "GET",
> "url": "/index.php/settings/admin/overview",
> "message": "OC\\\\User\\\\Database::countUsers(): Return value must be of type int|false, string returned in file '/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/User/Database.php' line 475",
> "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
> "version": "31.0.1.2",
> "exception": {
> "Exception": "Exception",
> "Message": "OC\\\\User\\\\Database::countUsers(): Return value must be of type int|false, string returned in file '/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/User/Database.php' line 475",
> "Code": 0,
> "Trace": \[
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/AppFramework/App.php",
> "line": 161,
> "function": "dispatch",
> "class": "OC\\\\AppFramework\\\\Http\\\\Dispatcher",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/Route/Router.php",
> "line": 307,
> "function": "main",
> "class": "OC\\\\AppFramework\\\\App",
> "type": "::"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/base.php",
> "line": 1022,
> "function": "match",
> "class": "OC\\\\Route\\\\Router",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/index.php",
> "line": 24,
> "function": "handleRequest",
> "class": "OC",
> "type": "::"
> }
> \],
> "File": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/AppFramework/Http/Dispatcher.php",
> "Line": 146,
> "Previous": {
> "Exception": "TypeError",
> "Message": "OC\\\\User\\\\Database::countUsers(): Return value must be of type int|false, string returned",
> "Code": 0,
> "Trace": \[
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/User/Manager.php",
> "line": 500,
> "function": "countUsers",
> "class": "OC\\\\User\\\\Database",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/apps/updatenotification/lib/Settings/Admin.php",
> "line": 142,
> "function": "countUsersTotal",
> "class": "OC\\\\User\\\\Manager",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/apps/updatenotification/lib/Settings/Admin.php",
> "line": 79,
> "function": "isWebUpdaterRecommended",
> "class": "OCA\\\\UpdateNotification\\\\Settings\\\\Admin",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/apps/settings/lib/Controller/CommonSettingsTrait.php",
> "line": 128,
> "function": "getForm",
> "class": "OCA\\\\UpdateNotification\\\\Settings\\\\Admin",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/apps/settings/lib/Controller/CommonSettingsTrait.php",
> "line": 170,
> "function": "formatSettings",
> "class": "OCA\\\\Settings\\\\Controller\\\\AdminSettingsController",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/apps/settings/lib/Controller/AdminSettingsController.php",
> "line": 55,
> "function": "getIndexResponse",
> "class": "OCA\\\\Settings\\\\Controller\\\\AdminSettingsController",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/AppFramework/Http/Dispatcher.php",
> "line": 200,
> "function": "index",
> "class": "OCA\\\\Settings\\\\Controller\\\\AdminSettingsController",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/AppFramework/Http/Dispatcher.php",
> "line": 114,
> "function": "executeController",
> "class": "OC\\\\AppFramework\\\\Http\\\\Dispatcher",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/AppFramework/App.php",
> "line": 161,
> "function": "dispatch",
> "class": "OC\\\\AppFramework\\\\Http\\\\Dispatcher",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/Route/Router.php",
> "line": 307,
> "function": "main",
> "class": "OC\\\\AppFramework\\\\App",
> "type": "::"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/base.php",
> "line": 1022,
> "function": "match",
> "class": "OC\\\\Route\\\\Router",
> "type": "-\>"
> },
> {
> "file": "/home/secondes/public\_html/MYDOMAIN.TLD/index.php",
> "line": 24,
> "function": "handleRequest",
> "class": "OC",
> "type": "::"
> }
> \],
> "File": "/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/User/Database.php",
> "Line": 475
> },
> "message": "OC\\\\User\\\\Database::countUsers(): Return value must be of type int|false, string returned in file '/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/User/Database.php' line 475",
> "exception": \[\],
> "CustomMessage": "OC\\\\User\\\\Database::countUsers(): Return value must be of type int|false, string returned in file '/home/secondes/public\_html/MYDOMAIN.TLD/lib/private/User/Database.php' line 475"
> },
> "id": "67d4057f20a4e"
> }
> \`\`\`
> 
> \### Additional info
> 
> Thanks for your help and for your understanding, this is my first bug report!

> <https://github.com/nextcloud/server/commit/e23a75dcbb0e5047e347e5637788fea6555c5120>
>
> Fix https://github.com/nextcloud/server/issues/51486
> 
> Signed-off-by: Louis Chemi…neau \<louis@chmn.me\>

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [June 22, 2025, 2:05pm UTC](https://help.nextcloud.com/t/update-to-31-0-2-failed-with-internal-server-error/220965/3 "2025-06-22T14:05:29Z")

</div>

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