PHP sessions variables, Login, not working in remote server, very weird

Punk_Rckr83

New member
problem Need Help!. it's urgent? My problem is:
I programed a website in dreamweaver CS4 and using wampp server in localhost PHP, everything works awesome, i have a login page where user inputs username and password and hits connect and it connects perfectly.

Now... i uploaded my website to de Internet (remote server) Live!!! and now i tried to connect with a username and nothing, the database works perfect but here is the weird thing. i got my code

if (!isset($_SESSION)) {
session_start();
}

with this, there is no user login. it doesnt work, but when i put this:

if (!isset($_SESSION)) {
session_start();
$sess = session_save_path();
echo $sess;
}

It connects to a user account, it works. but because of the echo.. then an error message comes out. Warning: Cannot modify header information - headers already sent by (output started at... if I eliminate the echo, no session variable working(doesn't work), if i put the same echo anywhere else it doesnt work. what's wrong with these ?? i can't seem to find a solution. Please help.
I know i cant print anything before head but the sessions work when i print that echo, otherwise i dosn't work. how come? if i comment the echo it dosnt work i cant login if i uncomment it the i can log in but the error appears =(.
 
Back
Top