A "Call to Undefined Function" error occurs when your website's code attempts to execute a PHP function that the server cannot find or recognize. This typically happens because a required PHP extension is missing, a specific version of PHP is being used, or a plugin or theme is calling a function that does not exist in the current environment.
Before you begin
You will need:
Access to your website's administrative dashboard (if available) or a file manager.
Access to your website's error logs.
Knowledge of the specific function name mentioned in the error message.
Check for missing PHP extensions
Many common functions are provided by specific PHP extensions. If a required extension is not enabled, the system will report the function as undefined.
Identify the function name from the error message (e.g.,
curl_init,mysqli_connect, orgd_info).Determine which PHP extension provides that function.
Check your current PHP configuration to see if that extension is enabled.
If the extension is missing, enable it through your hosting control panel or by contacting Hostek support to verify your specific plan's capabilities.
Check for PHP version compatibility
If you recently upgraded your PHP version, some older functions may have been deprecated or removed.
Identify the PHP version currently running on your website.
Compare your current version against the requirements of your website's software (such as WordPress, Joomla, or a specific plugin).
If the error appeared immediately after a PHP version change, roll back to the previous version to confirm if the version is the cause.
If the version is correct but the error persists, the software may require a patch or a different configuration.
Identify faulty plugins or themes
If the error is caused by a specific piece of software, it may only trigger when that specific plugin or theme is active.
If you can access your admin dashboard, deactivate all plugins.
Refresh your site. If the error disappears, reactivate your plugins one by one until the error returns.
Once the error reappears, you have identified the specific plugin causing the issue.
If you cannot access your dashboard, use a File Manager or FTP client to rename the folder of the suspected plugin (e.g., rename
plugin-nametoplugin-name_old).Refresh the site to see if the error is resolved.
Check for typos in custom code
If you have added custom code to your site, a simple typo in the function name will cause this error.
Locate the file where the error is occurring (the error message usually provides a file path and line number).
Open the file and locate the specific line of code.
Verify that the function name is spelled correctly and matches the standard PHP library.
Confirm the result
The "Call to Undefined Function" error no longer appears on the front end or back end of your website.
The website loads the intended content or page successfully.
If the error persists after these steps
If you have verified that the extension is enabled, the PHP version is correct, and no specific plugin is causing the issue, the problem may be related to a specific configuration of your environment.
Collect the following information and contact Hostek support:
The full, original error message including the specific function name.
The file path and line number provided in the error.
Your current PHP version.
A list of the plugins and themes currently active on your site.
