DCIMStack icon indicating copy to clipboard operation
DCIMStack copied to clipboard

config issues, new install

Open rberg11 opened this issue 7 years ago • 4 comments

Hello, thanks for making this! I am having a config issue on a brand new setup. I am getting

Notice: Constant DB_HOST already defined in C:\xampp\htdocs\dcimstack\config\db.php on line 10 Notice: Constant DB_NAME already defined in C:\xampp\htdocs\dcimstack\config\db.php on line 11 Notice: Constant DB_USER already defined in C:\xampp\htdocs\dcimstack\config\db.php on line 12 Notice: Constant DB_PASS already defined in C:\xampp\htdocs\dcimstack\config\db.php on line 13

on everypage and cannot figure it out. My db.php file is as follows:

`<?php

/*

  • DB_HOST: database host, usually it's "127.0.0.1" or "localhost", some servers also need port info
  • DB_NAME: name of the database. please note: database and database table are not the same thing
  • DB_USER: user for your database. the user needs to have rights for SELECT, UPDATE, DELETE and INSERT.
  • DB_PASS: the password of the above user */

define("DB_HOST", "localhost"); define("DB_NAME", "dcimstack"); define("DB_USER", "dcimstack"); define("DB_PASS", "dcimstack");

// Create connection $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);

`

rberg11 avatar Sep 12 '18 16:09 rberg11

Hi, Apart from that notice/warning displayed does the rest of the page render or does it stop rendering after this notice?

arjitc avatar Sep 13 '18 12:09 arjitc

All the pages render, just where there is SQL information pulled it displays that message.

https://imgur.com/a/C7SfNM8

rberg11 avatar Sep 17 '18 15:09 rberg11

Thanks for reporting this in -- I'll try to clear it up this week.

arjitc avatar Nov 05 '18 22:11 arjitc

@rberg11 i've pushed a small change into the config/db.php file, can you try it with this change? It's a simple if(!defined(DB_HOST)) that I've applied to prevent multiple define attempts.

arjitc avatar Nov 05 '18 22:11 arjitc