PDA

View Full Version : Warning: ini_set() [function.ini-set]: A session is active.


isaBERLIN
12-13-2007, 09:39 AM
I only get this error and cannot login to SCP :
Warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time. in /home/www/web1/html/ticketsupport/main.inc.php on line 43

peter
12-13-2007, 09:47 AM
Move the following block of code below the ini_set function calls.
//Start the session
session_start();
list($usec, $sec) = explode(" ", microtime());
$_SESSION['time_start']=((float)$usec + (float)$sec);

isaBERLIN
12-13-2007, 09:50 AM
OK thanks.
Works fine now
CLOSE please

trancer01
12-13-2007, 10:11 AM
well please don't close or lock the thread, cus I was having the same issue. I still need to try what you suggested

sndinc
12-13-2007, 10:33 AM
Can you post the line it actually goes under please? I see Init_Set 9 times in the file and I've tried a few places and all I get is a blank page when I access the admin page...main page says the helpdesk is currently offline.

peter
12-13-2007, 10:39 AM
You can leave it as it is and simply comment out the following 2 init_set calls.

ini_set('session.use_trans_sid', 0);
ini_set('session.cache_limiter', 'nocache');I will update the downloads shortly.

isaBERLIN
12-13-2007, 10:39 AM
Move content of line 21,22,23 & 24 beneath line 51 !

(Click to enlarge)
http://img1.getpic.info/thumbs/250_MTMxMjA3-b185os_error_003.png (http://img1.getpic.info/show-MTMxMjA3-b185os_error_003.png.html)

Never mind, peter has shown better solution above this thread

merlinthemagic
07-15-2008, 09:25 PM
If you dont need sessions autostart for other apps you can disable it in php.ini.

session.auto_start = 0

That did the trick for me.

MM

matthewd
09-11-2008, 06:50 PM
I am getting a relatively same problem:

Warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time. in /public_html/support/main.inc.php on line 36

I do not quite understand how to solve it though. Can someone clear it for me please.

Thanks.

4ice
09-12-2008, 03:19 AM
I am getting a relatively same problem:

Warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time. in /public_html/support/main.inc.php on line 36

I do not quite understand how to solve it though. Can someone clear it for me please.

Thanks.

Are you using the latest version of osTicket? Because this was an issue with one of the old versions and I haven't heard about this anymore.

Anyway, the solution Peter has provided in this thread means that you need comment out the lines

#Disable session ids on url.
ini_set('session.use_trans_sid', 0);
#No cache
ini_set('session.cache_limiter', 'nocache');

in the file main.inc.php

matthewd
09-12-2008, 11:09 AM
Yeah, I have the latest version.

When I posted last night I did not know what it meant to comment something out, but once of my buddies explained it to me later.

So, to make sure I did this right: It told me my error was on line 36, so I went to line 36 and 38 and put "//" in front of the 2 lines.

Once I did this, the error message went away on my support page, but instead it just said "Fatal Error." So, it did not solve the problem completely. I changed it back to the original until for now.