Hi! Work with the sessions always returns an error "Cannot manipulate
headers - already sent". Please help! My Apache config looks like this:
<VirtualHost *:8080>
ServerAdmin [email protected]
ServerAlias *.somesite.com
ServerName somesite.com
UseCanonicalName On
CustomLog
/home/webserver/somesite/www/logs/access_log.apache.log combined
ErrorLog /home/webserver/somesite/www/logs/errors_log.apache.log
TransferLog
/home/webserver/somesite/www/logs/transfers_log.apache.log
DocumentRoot /home/webserver/somesite/www/html/
RivetServerConf ChildInitScript "package require DIO;
::DIO::handle Mysql db -user xxx -host localhost -db xxx -pass xxx"
RivetServerConf ChildInitScript "package require Session;
Session SESSION -entropyFile /dev/random -entropyLength 10 -debugMode 1
-dioObject db -sessionTable session"
<Directory "/home/webserver/somesite/www/html/">
RivetDirConf BeforeScript "SESSION activate"
AllowOverride All
Options +FollowSymLinks +ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.html index.htm index.rvt
</Directory>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
</VirtualHost>
And regardless of the script I get:
::SESSION (debug) activate: checking out the situation
::SESSION (debug) id: no session cookie 'rivetSession'
::SESSION (debug) activate: new session, reason 'no_cookie'
::SESSION (debug) get_entropy_bytes: returning 'e978a8ca70f1890a874a'
::SESSION (debug) gen_session_id - feeding this to md5:
'12946631424269354032127.0.0.11294663142some random
stringe978a8ca70f1890a874a'
::SESSION (debug) create_session: ip 127.0.0.1, id
'8DF5C83A062ACB5922CFC89EEA758E7D'
------------------------------------------------------------------------
Cannot manipulate headers - already sent
invoked from within
"headers add $cookieKey $cookieValue"
("set" arm line 18)
invoked from within
"switch -- $cmd {
"set" {
set value [lindex $args 0]
set args [lrange $args 1 end]
import_keyvalue_pairs params $args
if {[regex..."
(procedure "cookie" line 4)
invoked from within
"cookie set $cookieName $value -path $cookiePath -minutes $cookieLifetime -secure
$cookieSecure"
(object "::SESSION" method "::Session::set_session_cookie" body line 2)
invoked from within
"set_session_cookie $id"
(object "::SESSION" method "::Session::activate" body line 23)
invoked from within
"SESSION activate"
------------------------------------------------------------------------
*OUTPUT BUFFER:*
SESSION activate
namespace eval request {
puts -nonewline ""
puts "Hello world!";
puts -nonewline "
"
}