This topic is locked

PHP Error in Connection.php

5/29/2025 12:49:26 AM
PHPRunner General questions
S
swanside author

Hi
Does anybody have an idea as to why this error has been generated please?

Thanks

PHP Fatal error: Uncaught Error: Class "MySQLiInfo" not found in C:\FTP\Jobsdesk\connections\Connection.php:169

ChatGPT 5/29/2025

The error message you're encountering indicates that the PHP script is trying to use a class named MySQLiInfo, but it cannot find it. This can happen for several reasons. Below are some steps you can take to troubleshoot and resolve the issue:

  1. Check Class Definition:
    Make sure that the MySQLiInfo class is defined in your code. If it's defined in another file, ensure that the file is being included or required properly before the class is instantiated.


  2. Namespace Issues:
    If you are using namespaces, ensure that you are referencing the class with the correct namespace, or use the use statement to import the class.


  3. Autoloading:
    If you are using an autoloader (like Composer), ensure that your autoloader is configured correctly and that the class file is in the expected directory.


  4. File Naming and Case Sensitivity:
    Ensure that the filename and class name are spelled correctly and match the case. On case-sensitive file systems (like Linux), MySQLiInfo.php and mysqliinfo.php would be considered different files.


  5. Database Extension:
    If MySQLiInfo is part of an external library or extension, ensure that the library is installed and available in your environment. You may need to install the appropriate PHP extension if it’s not already installed.


  6. Check Your Connection File:
    Since the error points to Connection.php, check that file for any attempts to instantiate the MySQLiInfo class. Make sure it’s correctly implemented.


  7. Dependency Issues:
    If you've recently modified your project (like updating PHPRunner or changing dependencies), it may have affected the availability of the MySQLiInfo class. Reverting those changes might help.


  8. Error in PHPRunner Settings:
    If this is part of a PHPRunner project, check your settings and make sure that everything is configured correctly regarding database connections.



Example Fix:

If the class is supposed to be included from another file, you might need to add something like this at the top of your Connection.php:

require_once 'path/to/MySQLiInfo.php';

Final Steps:

If you’ve gone through the above suggestions and the issue persists, consider checking the PHPRunner documentation or support forums for specific guidance related to the MySQLiInfo class and its usage in version you are working with.

Sergey Kornilov admin 5/30/2025

Check if mysqli extension is enabled in PHP settings?