arjitc / DCIMStack

Datacenter Inventory Management System
31 stars 8 forks source link

config issues, new install #88

Open rberg11 opened 6 years ago

rberg11 commented 6 years ago

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

/*

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);

`

arjitc commented 6 years ago

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

rberg11 commented 6 years ago

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

https://imgur.com/a/C7SfNM8

arjitc commented 6 years ago

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

arjitc commented 6 years ago

@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.