tags:

views:

209

answers:

2

hi all, $dbhost = 'localhost'; $dbuser = 'EhpEngineUser'; $dbpass = 'password'; $conn = mysql_pconnect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'joomladb'; mysql_select_db($dbname);

// include 'config.php'; // include 'opendb.php';

above code works fine, if i comment DB connection part and inculde config.db and Opendb, then i get the error as Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\Joomla\Config.php:8) in C:\xampp\htdocs\Joomla\ConfXml.php on line 103

Both file are used for opening DB only.

regards, Leo

+1  A: 

"header already sent" error may caused by some extra space/linefeed after your php ending tag ?>

try to remove ending tag ?> in C:\xampp\htdocs\Joomla\Config.php

number5
Do you mean i should i keep it like this <?php $dbhost = 'localhost'; $dbuser = 'User'; $dbpass = 'password'; $dbname = 'joomladb';?> i should remove last ?> from file
Leo
yes, that's what I mean.
number5
+1  A: 

You may used echo and header within same page. thats why error comes.

Deepali