I am trying to integrate opening a session and registering session variables and the logging actions using syslog().
The code excerpt is as follows (the sessino code worked fine before the log code).
session_save_path(SESSION_PATH);
session_name(WOS_SESSION_NAME);
session_start();
if (!LOG_AUTH) {
define_syslog_variables();
}
openlog(WOSLOG_IDENT, LOG_NDELAY, LOG_AUTH);
syslog($priority, $emsg);
closelog();
I then get an error message:
"Cannot send session cookie - headers already sent by (output started at LINE...)"
where LINE points to the syslog code. Why would the log code send any HTTP headers and what strategies should I use to get round this limitation?
Any help would be appreciated.
Regards,
Harley Mackenzie