user881703
user881703

Reputation: 1199

Mysql connect give Strict Standards error

when i try to connect mysql in Xamp that give me

Strict Standards: Declaration of DBAccessor::connect() should be compatible with that of mysqli::connect() in C:\xampp\htdocs\cgs\CGS\com\DBAccessor.class.php on line 237

database password, host and user were correctly enterd in my code

Upvotes: 0

Views: 2364

Answers (2)

Ashwin A
Ashwin A

Reputation: 3867

Strict standards messages should not be displayed by PHP as they are disabled by default. Please edit your php.ini and change the error_reporting option to: error_reporting = E_ALL & ~E_NOTICE

It's not related to MySQL credentials but to the way your PHP settings are.

If you do not have access to the php.ini file you can try to edit your htaccess file.

Upvotes: 1

Mchl
Mchl

Reputation: 62395

Is DBAccessor a class you wrote, or a part of some library/application.

If you wrote it, then you should know that when extending a base class (mysqli in this case) methods in extending class should have same signatures as methods in base class.

If you didn't write it: switch off E_STRICT error level

error_reporting(error_reporting() & ~E_STRICT);

Upvotes: 2

Related Questions