Nextcloud 32 - Call to undefined function OC\\Security\\idn_to_utf8()

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (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 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:

(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. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.2.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Archlinux
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.66-1
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • N/A
  • PHP version (e.g, 8.3):
    • 8.3.28-1
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Today when I got the notification for the teams update, I clicked on the notification and got the "Internal Server Error” page.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Nope

Summary of the issue you are facing:

After update to 32.0.2.2, all apps are working fine, but when I got the notification that an update was available for “Team Folders”, clicking the notification icon to reach the app update page results in the “Internal Server Error” page appearing and the logged error “Call to undefined function OC\Security\idn_to_utf8() in file /usr/share/webapps/nextcloud/lib/private/Security/RemoteHostValidator.php line 38”. In fact attempting to access any of the Admin pages from the menu (or from the Personal settings page) results in the error. The update could be related to recent updates of apache (2.4.65-4 → 2.4.66-1) and php (8.2.29-2 → 8.3.28-1).

Could this error be in a namespace collision for OC\Security\idn_to_utf8() or a circumstance where the actual function is overwitten in the namespace? The intl extension is active in php.ini, so the underlying dependency for the idn_to_utf8() is enabled and should not cause problems absent something in the class/namespace handling of its visibility?

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

  1. Start and log in to Nextcloud as normal

  2. Attempt to access the update page through the notification icon, or menu through Administrative Settings or Apps - the error occurs.

  3. (that’s pretty much it…)

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.

{
    "reqId": "nuGGphL3EVhd75uxseR9",
    "level": 3,
    "time": "2025-12-09T03:14:31+00:00",
    "remoteAddr": "192.168.6.224",
    "user": "david",
    "app": "index",
    "method": "GET",
    "url": "/nextcloud/apps/theming/favicon/notes?v=95de7f72",
    "message": "Class \"Imagick\" not found in file '/usr/share/webapps/nextcloud/apps/theming/lib/ImageManager.php' line 96",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0",
    "version": "32.0.2.2",
    "exception": {
        "Exception": "Exception",
        "Message": "Class \"Imagick\" not found in file '/usr/share/webapps/nextcloud/apps/theming/lib/ImageManager.php' line 96",
        "Code": 0,
        "Trace": [
            {
                "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php",
                "line": 153,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->"
            },
            {
                "file": "/usr/share/webapps/nextcloud/lib/private/Route/Router.php",
                "line": 321,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::"
            },
            {
                "file": "/usr/share/webapps/nextcloud/lib/base.php",
                "line": 1061,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->"
            },
            {
                "file": "/usr/share/webapps/nextcloud/index.php",
                "line": 25,
                "function": "handleRequest",
                "class": "OC",
                "type": "::"
            }
        ],
        "File": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "Line": 150,
        "Previous": {
            "Exception": "Error",
            "Message": "Class \"Imagick\" not found",
            "Code": 0,
            "Trace": [
                {
                    "file": "/usr/share/webapps/nextcloud/apps/theming/lib/Controller/IconController.php",
                    "line": 99,
                    "function": "getImage",
                    "class": "OCA\\Theming\\ImageManager",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 204,
                    "function": "getFavicon",
                    "class": "OCA\\Theming\\Controller\\IconController",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 118,
                    "function": "executeController",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php",
                    "line": 153,
                    "function": "dispatch",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/Route/Router.php",
                    "line": 321,
                    "function": "main",
                    "class": "OC\\AppFramework\\App",
                    "type": "::"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/base.php",
                    "line": 1061,
                    "function": "match",
                    "class": "OC\\Route\\Router",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/index.php",
                    "line": 25,
                    "function": "handleRequest",
                    "class": "OC",
                    "type": "::"
                }
            ],
            "File": "/usr/share/webapps/nextcloud/apps/theming/lib/ImageManager.php",
            "Line": 96
        },
        "message": "Class \"Imagick\" not found in file '/usr/share/webapps/nextcloud/apps/theming/lib/ImageManager.php' line 96",
        "exception": {},
        "CustomMessage": "Class \"Imagick\" not found in file '/usr/share/webapps/nextcloud/apps/theming/lib/ImageManager.php' line 96"
    }
}
{
    "reqId": "B1IZICT86LiQik4eQsFQ",
    "level": 3,
    "time": "2025-12-09T03:14:40+00:00",
    "remoteAddr": "192.168.6.224",
    "user": "david",
    "app": "index",
    "method": "GET",
    "url": "/nextcloud/settings/apps",
    "message": "Call to undefined function OC\\Security\\idn_to_utf8() in file '/usr/share/webapps/nextcloud/lib/private/Security/RemoteHostValidator.php' line 38",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0",
    "version": "32.0.2.2",
    "exception": {
        "Exception": "Exception",
        "Message": "Call to undefined function OC\\Security\\idn_to_utf8() in file '/usr/share/webapps/nextcloud/lib/private/Security/RemoteHostValidator.php' line 38",
        "Code": 0,
        "Trace": [
            {
                "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php",
                "line": 153,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->"
            },
            {
                "file": "/usr/share/webapps/nextcloud/lib/private/Route/Router.php",
                "line": 321,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::"
            },
            {
                "file": "/usr/share/webapps/nextcloud/lib/base.php",
                "line": 1061,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->"
            },
            {
                "file": "/usr/share/webapps/nextcloud/index.php",
                "line": 25,
                "function": "handleRequest",
                "class": "OC",
                "type": "::"
            }
        ],
        "File": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "Line": 150,
        "Previous": {
            "Exception": "Error",
            "Message": "Call to undefined function OC\\Security\\idn_to_utf8()",
            "Code": 0,
            "Trace": [
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/Http/Client/Client.php",
                    "line": 170,
                    "function": "isValid",
                    "class": "OC\\Security\\RemoteHostValidator",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/Http/Client/Client.php",
                    "line": 205,
                    "function": "preventLocalAddress",
                    "class": "OC\\Http\\Client\\Client",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php",
                    "line": 92,
                    "function": "get",
                    "class": "OC\\Http\\Client\\Client",
                    "type": "->",
                    "args": [
                        "*** sensitive parameters replaced ***"
                    ]
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php",
                    "line": 56,
                    "function": "fetch",
                    "class": "OC\\App\\AppStore\\Fetcher\\Fetcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php",
                    "line": 170,
                    "function": "fetch",
                    "class": "OC\\App\\AppStore\\Fetcher\\AppFetcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php",
                    "line": 157,
                    "function": "get",
                    "class": "OC\\App\\AppStore\\Fetcher\\Fetcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/Installer.php",
                    "line": 379,
                    "function": "get",
                    "class": "OC\\App\\AppStore\\Fetcher\\AppFetcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/apps/settings/lib/Controller/AppSettingsController.php",
                    "line": 252,
                    "function": "isUpdateAvailable",
                    "class": "OC\\Installer",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/apps/settings/lib/Controller/AppSettingsController.php",
                    "line": 96,
                    "function": "getAppsWithUpdates",
                    "class": "OCA\\Settings\\Controller\\AppSettingsController",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 204,
                    "function": "viewApps",
                    "class": "OCA\\Settings\\Controller\\AppSettingsController",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 118,
                    "function": "executeController",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php",
                    "line": 153,
                    "function": "dispatch",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/private/Route/Router.php",
                    "line": 321,
                    "function": "main",
                    "class": "OC\\AppFramework\\App",
                    "type": "::"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/lib/base.php",
                    "line": 1061,
                    "function": "match",
                    "class": "OC\\Route\\Router",
                    "type": "->"
                },
                {
                    "file": "/usr/share/webapps/nextcloud/index.php",
                    "line": 25,
                    "function": "handleRequest",
                    "class": "OC",
                    "type": "::"
                }
            ],
            "File": "/usr/share/webapps/nextcloud/lib/private/Security/RemoteHostValidator.php",
            "Line": 38
        },
        "message": "Call to undefined function OC\\Security\\idn_to_utf8() in file '/usr/share/webapps/nextcloud/lib/private/Security/RemoteHostValidator.php' line 38",
        "exception": {},
        "CustomMessage": "Call to undefined function OC\\Security\\idn_to_utf8() in file '/usr/share/webapps/nextcloud/lib/private/Security/RemoteHostValidator.php' line 38"
    }
}

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.

Firefox/144.0


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: 192.168.6.224
    Request ID: CSn08HY50RA7WHefc1AL


Web server / Reverse Proxy

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

No errors in httpd.log or php/error.log.

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!):

{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "default_locale": "en_US",
        "default_phone_region": "US",
        "knowledgebaseenabled": true,
        "apps_paths": [
            {
                "path": "\/usr\/share\/webapps\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/lib\/nextcloud\/apps",
                "url": "\/wapps",
                "writable": true
            }
        ],
        "trusted_domains": [
            "localhost",
            "2pi.mydomain.com",
            "192.168.6.111"
        ],
        "overwrite.cli.url": "https:\/\/2pi.mydomain.com\/nextcloud",
        "htaccess.RewriteBase": "\/nextcloud",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "32.0.2.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "maintenance": false,
        "maintenance_window_start": 6,
        "app_install_overwrite": [
            "issuetemplate",
            "holiday_calendars",
            "calendar",
            "contacts",
            "groupfolders",
            "files_rightclick"
        ],
        "theme": "",
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        }
    }
}

Apps

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

Enabled:
  - activity: 5.0.0-dev.0
  - app_api: 32.0.0
  - bookmarks: 16.0.1
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.1
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.1.1
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - groupfolders: 20.1.4
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notes: 4.12.4
  - notifications: 5.0.0-dev.0
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - related_resources: 3.0.0-dev.0
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - tasks: 0.17.1
  - text: 6.0.1
  - theming: 2.7.0
  - theming_customcss: 1.19.0
  - twofactor_backupcodes: 1.21.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - admin_audit: 1.22.0
  - encryption: 2.20.0
  - files_external: 1.24.0
  - files_rightclick: 0.15.1 (installed 0.15.1)
  - issuetemplate: 0.7.0 (installed 0.7.0)
  - recommendations: 5.0.0-dev.0 (installed 1.6.0)
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - user_ldap: 1.23.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.