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

  • Home
  • SEARCH
  • 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 7918063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:22:46+00:00 2026-06-03T15:22:46+00:00

I just had my web-server upgrade to php 5.4 and am getting errors on

  • 0

I just had my web-server upgrade to php 5.4 and am getting errors on my sites that use my database class which extends from the built in mysqli. the error is on the last line of my class and despite the error message everything is working fine….

the error message:

Strict Standards: Declaration of yamiko_mysqli::connect() should be compatible with mysqli::connect($host = NULL, $user = NULL, $password = NULL, $database = NULL, $port = NULL, $socket = NULL) in /home/markwe6/public_html/_php/yamiko_mysqli.php on line 109

and the class is:

class Yamiko_mysqli extends mysqli
{
    public $host='localhost';
    public $user='markwe6_yamiko';
    public $pass='1chrysanthemum!';
    public $db='markwe6_cp';
    public $result=NULL;#stores most recent result

    /*
     * 
     */
    public function __construct($auto=TRUE)
    {
        if($auto)
        {
            return $this->connect();
        }else
        {
            return TRUE;
        }
    }

    /*
     * 
     */
    public function connect($auto=TRUE, $user=NULL, $pass=NULL, $host=NULL, $db=NULL)
    {
        if($auto)
        {
            parent::__construct($this->host, $this->user, $this->pass, $this->db);
            return $this->check_error();
        }else
        {
            parent::__construct($host, $user, $pass, $db);
            return $this->check_error();
        }
    }

    /*
     * 
     */
    public function query($sql)
    {
        $result=parent::query($sql);
        if($this->check_error())
            return FALSE;
        $this->result=$result;
        return $result;
    }

    /*
     * 
     */
    private function check_error()
    {
        if($this->connect_error!=NULL)
        {
            $GLOBALS['yamiko']->set_error('yamiko_myslqi connection error: '.$this->connect_error);
            return FALSE;
        }elseif ($this->error!=NULL)
        {
            $GLOBALS['yamiko']->set_error('yamiko_myslqi error: '.$this->error);
            return FALSE;
        }
    }
}#this is line 109....-_-
  • 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-03T15:22:47+00:00Added an answer on June 3, 2026 at 3:22 pm

    custom mysqli class has an error with php 5.4?

    No, not an error, but a strict standard warning. If you consider a warning an error, then yes, your custom mysqli class has an error with php 5.4.

    The strict standard warning reads as follows:

    If you ever intent to extend from the base class. the declaration of the connect function must match with that one of the base class:

    mysqli::connect($host = NULL, $user = NULL, $password = NULL, $database = NULL, $port = NULL, $socket = NULL)
    

    In your case it does not:

    Yamiko_mysqli::connect($auto=TRUE, $user=NULL, $pass=NULL, $host=NULL, $db=NULL)
    

    As you can see, both have different parameters.

    The fix in your case is rather trivial, you just re-use the first parameter, if NULL you provide the class’es own default values:

    /*
     * 
     */
    public function connect($host = NULL, $user = NULL, $password = NULL, $database = NULL, $port = NULL, $socket = NULL)
    {
        if($host === NULL)
        {
            parent::__construct($this->host, $this->user, $this->pass, $this->db);
            return $this->check_error();
        }else
        {
            parent::__construct($host, $user, $password , $database, $port, $socket);
            return $this->check_error();
        }
    }
    

    Take care that port and socket is missing with your default config.

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

Sidebar

Related Questions

I had an app which plays videos from a web server but it just
I just added this to my web.xml on my JBOSS server. But it had
I had enough from shared web hosting(sql server on shared web hosting is just
I've had my web server for a while now and known that it was
We have a local server with an access database which feeds data to clients
I am trying to use this web service in my app (just to try
I have a web project that had UrlRewriter.NET installed and working fine on .NET
I was on a page that redirected me to my own web server (www.myserver.com)
I just had a request to add PGP support to a web application and
I'm just getting to grips with the C# API for MSDeploy (Microsoft.Web.Deployment.dll), but I'm

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.