Never try to hide warnings in development environment: they're tremendously useful in hunt for bugs. For example, without this particular warning you'd probably never know why your session-related headers were actually not sent (in other words, why session doesn't work).
Eliminate the reason for the warning shown instead. This particular warning is, most probably, caused by the rogue whitespace that crawled in front of your trusty <?php
code delimiter. That means the server have already started to output something to the client, yet you want them to get back to sending of the headers...
So check you files and make sure nothing is echoed before session_start()
is called. This discussion would probably be quite helpful. )
UPDATE:
In fact, the code you've quoted in the question has it quite clearly:
<?php
session_start();
include("connect/config1.php");
?>
See, <?php
is preceded by whitespace here. That means the server will actually send these symbols (in the HTTP response body), and only then starts to parse the script itself. But then it'll be instructed to send headers - and cries foul with this warning.
The solution is simple: remove the whitespace. This way not only the warning will be gone, but also session will start to work. )