Lỗi mysqli real_connect hy000 2005 codeigniter mysqli_driver.php line number 201 năm 2024

Message: mysqli::real_connect[]: php_network_getaddresses: getaddrinfo failed: Name or service not known

Filename: mysqli/mysqli_driver.php

Line Number: 202

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect[]: [HY000/2002]: php_network_getaddresses: getaddrinfo failed: Name or service not known

Filename: mysqli/mysqli_driver.php

Line Number: 202

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by [output started at /home/sbarmotin/public_html/appoitments/system/core/Exceptions.php:272]

Filename: core/Common.php

Line Number: 568

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: controllers/Appointments.php

Line Number: 28

Alex Tselegidis

unread,

Dec 6, 2016, 7:52:23 AM12/6/16

to Easy!Appointments - Support Group

As the error states your database credentials seem to be invalid. Please make sure that you have entered the correct ones in the root "config.php" file of your installation.

Stan Barmotin

unread,

Dec 6, 2016, 11:06:08 AM12/6/16

to Easy!Appointments - Support Group

when i try url/appoitments/config.php if just url/appoitments:

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: controllers/Appointments.php

Line Number: 28

can you please tell what i'm doing rong..8 hours nothing

Craig Tucker

unread,

Dec 7, 2016, 4:18:55 AM12/7/16

to Easy!Appointments - Support Group

Stan, are you upgrading from a prior instal or are you installing new?

If this is a new instal, the database needs to be set up first. I assume you already have Apache/Nginx, PHP and MySQL installed. I would delete your easyappointments database and start over. I use phpMyAdmin to set up my database, this is the process I use to set it up:

  1. In phpMyAdmin Go to "user accounts" tab
  2. Select add user
  3. Enter the following information:
    User name: [your user name for EA]

Host name: localhost

Password: [your EA password for the database]

Re-type:

In Database for user account

Choose "Create database with same name and grant all privileges."
Hit [GO] at the bottom of the page.

That should get you set up correctly in MySQL. Your database and username will be the same. Next, go to config.php in the root of your EA installation and enter your BASE_URL and the credentials you made for the database. For example--

`// --------

// GENERAL SETTINGS

// --------

const BASE_URL = '';

const LANGUAGE = 'english';

const DEBUG_MODE = FALSE;

// --------

// Database Settings

// --------

const DB_HOST = 'localhost';

const DB_NAME = '[your user name for EA]';

const DB_USERNAME = '[your user name for EA]';

const DB_PASSWORD = '[your EA password for the database]';

`

With this done go to the address you put in BASE_URL and you should see the installation page.

The BASE_URL needs to reflect how you are running either http or https. That can be an issue sometimes. In my example I show https but you may not be running that so adjust it for your situation.

Brian Hogan

unread,

Feb 27, 2017, 9:40:26 AM2/27/17

to Easy!Appointments - Support Group

I would say I have tried this about 8 to 9 times and still nothing. I am so lost with this and so frustrating because you would think this is so simple. It's a very small app and it should be very easy to do. I keep getting the error message that unable to connect to your database server using the provided settings Line Number 28 for filename controllers/appointments.php. I also tried viewing the logs for apache and mysql, still nothing that I can make out for what is wrong. I also have other apps on my server and is connected to mysql and they work beautiful except for easy appointments. I am running mysql 5.6 with php 7. I even downgraded both of them and still nothing. Any ideas why this is happening? Thanks, Brian

Chủ Đề