Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8457599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:50:57+00:00 2026-06-10T12:50:57+00:00

The Error: Fatal error: Swiftlet\App::autoload(): Failed opening required ‘Swiftlet/Models/mysqli.php’ (include_path=’.:/usr/local/lib/php-5.3.13/lib/php’) in /hermes/waloraweb009/b1166/htdocs/jim/ss test/Swiftlet/App.php on

  • 0

The Error:

Fatal error: Swiftlet\App::autoload(): Failed opening required ‘Swiftlet/Models/mysqli.php’ (include_path=’.:/usr/local/lib/php-5.3.13/lib/php’) in /hermes/waloraweb009/b1166/htdocs/jim/ss test/Swiftlet/App.php on line 223

I’m new to MVC and trying out Swiftlet. I’m trying to setup a MYSQL database Model.

I’ve nailed down the error to:

class Database extends \Swiftlet\Model {
    public $mysqli;

    public function __construct(App $app) {
        $this->mysqli = new mysqli($this->app->getConfig('dbHost'),
                                   $this->app->getConfig('dbUser'),
                                   $this->app->getConfig('dbPassword'),
                                   $this->app->getConfig('dbName'));
    }
}

But I don’t know why. Why would it try to load mysqli?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:50:58+00:00Added an answer on June 10, 2026 at 12:50 pm

    It seems the problem is that you are likely in \Swiftlet namespace. When trying to instantiate mysqli (an item in global namespace) from within this name space, it is trying to autoload where it would normally look to autoload classes within it’s namespace. The class isn’t there, thus you get the autoload error.

    Try changing your mysqli instantiation like this:

    $this->mysqli = new \mysqli($this->app->getConfig('dbHost'), $this->app->getConfig('dbUser'), $this->app->getConfig('dbPassword'), $this->app->getConfig('dbName'));
    

    Note that myslqi is now prefixed by \ thus referencing the mysql class in the global namespace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting this error: Fatal error: require_once() [function.require]: Failed opening required 'db/db.php' (include_path='/home/domain.ru/testerier/sites/application/../library:/home/domain.ru/testerier/sites/library:.:/usr/local/lib/php;/home/domain.ru/testerier/sites/application/models') in /home/domain.ru/testerier/sites/www/index.php
I get the following error: Fatal error: Call to undefined function getAvnet() in C:\xampp\htdocs\ems\app\controllers\queries_controller.php
I get the following error: Fatal error: Class 'mysqli' not found in my php
I'm having trouble with this PHP script where I get the error Fatal error
I have question. I have some app on facebook and getting this error Fatal
I'm making a new php page and I get the error Fatal error: Call
With vBulletin in PHP, I'm getting this error Fatal error: Call to a member
I am using Dijkstra algorithm in PHP. But I got this error Fatal error:
I got error Fatal error: Class 'CI_Controller' not found in ....\core\CodeIgniter.php on line 233
Error: Fatal error: Call to a member function bind_param() on a non-object in /var/www/web55/web/pdftest/events.php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.