Forum Moderators: coopster

Message Too Old, No Replies

session already started, then php ini

not allowed. so what do I do?

         

httpwebwitch

2:50 am on Apr 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have two seemingly incompatible systems here.

1) first is an ROI tracking program that uses sessions. It has this one global script that gets inserted before every page. To do that, it adds this to the .htaccess:

php_value auto_prepend_file "/exampledotcom/public_html/global_prepend.inc"

inside that prepended file, it starts a session using session_start().

2) second I have this bloggy CMS thing known as "drupal". It has a settings file which includes these lines:


ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);

Unfortunately, the two systems are clashing. (1) creates a session, then (2) tries to manipulate session settings. That's not allowed.

The error I get is this:


Warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time. in /exampledotcom/public_html/beeswax/sites/default/settings.php on line 134

Is there anything I can do about this?

jatar_k

4:46 pm on Apr 23, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



take those 4 lines out of drupal and put them in your auto_prepend file

httpwebwitch

4:54 pm on Apr 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jatar, you are the king of pointing out the obvious to the thick.
I'll do that. thanks.

httpwebwitch

12:04 pm on Apr 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



did it, it worked, all is well.