Jump to content

session problem ( multi users )


mraiur

Recommended Posts

Hi.

  I was developing the site on my PC and when we uploaded on the host server one strange problem occur .

 

I can only log-in on the site from one PC and whit all users .

But if i try to log on from a diferent PC i notised that no sessions where able to be set .

Why is that  ?

 

I used:

session_start();

 

then for an example :

$_SESSION['USER_NAME'] = 'someuser'

Link to comment
https://forums.phpfreaks.com/topic/97110-session-problem-multi-users/
Share on other sites

Your question is a bit vauge, but i would guess this is to do with the settings of the browser on the 2nd machine.

 

Whilst you are using sessions, PHP will most likely (i say most likely, because it depends on your php setup) be setting a cookie to track the session ID. Therefore, if your browser on your second machine isn't accepting cookies, then no session will be kept.

The strangest thing is that when i put

session_start();

 

on the first line of index.php

this is shown:

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/autoserv/public_html/index.php:1) in /home/autoserv/public_html/index.php on line 1

 

 

any idia ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.