Call to Undefined Function / Method
Are you getting “Fatal Error”? Give a call to “Undefined Function”, which means you are calling the function that doesn’t exist.
Some common issues occur- files are not uploaded properly, the extensions are not compatible with your existing OpenCart version, or it doesn’t exist. In such case, try the below are classified solutions based on the error message.Error Variant: Related To Opencart Core Files
- Fatal error: Call to undefined function utf8_strlen() in /path/public_html/system/helper/utf8.php on line 39
- Fatal error: Call to undefined method Customer::isLogged() in /path/public_html/catalog/model/catalog/product.php on line 8
require_once(/path/public_html/system/library/customer.php) [function.require-once]: failed to open stream: No such file or directory in /path/public_html/index.php on line 22
- Fatal error: require_once() [function.require]: /Failed opening required/ ‘/path/public_html/system/library/customer.php’ (include_path=’.:/usr/lib/php’) in /path/public_html/index.php on line 22
Solution- Sometimes, you try to upload the file, but it is not uploaded or it gets corrupted during upload process.
Re-upload the files to your server in ASCII mode, not binary.
-In some case, this problem occurs because server path is not configured properly at config.php. So re-check your server path in config.php and admin/cofig.php
-“Warning/ Fatal error: require_once” mean the file is not available. You need to re-upload the file mentioned in the error message or fix the server path at config.php as mentioned above.Related to vQmod files
- Fatal error: Call to undefined method
catalog_controller_checkout_confirm.php on line 38
Solution- vQmod fails to generate a new cache from the extensions vQmod files. Check vqmod/cache folder permission, make sure it’s writable and clear all cache files.
-Enabled / disabled one by one vQmod files you have. Once you get the actual cause, get in touch with the developer.
-The extensions are not compatible with your OpenCart version or it have a bug. Contact the developer.' Related to PHP built-in functions
- Fatal error: Call to undefined function imagecreatefromjpeg() in /path/public_html/system/library/image.php on line 34
- Fatal error: Call to undefined function mysql_connect() in /path/public_html/system/database/mysql.php on line 6
Solution- PHP have lots of built-in functions, you can check it here. Errors related to PHP built-in function are server issues. Contact your host to fix this issue.