PDA

View Full Version : Apache, SSLMutex?


bliz0r
January 7th, 2009, 15:10
Hello,

I have a slight problem with Apache, and a website I'm running with some SSL configuration.

The scenario is following:

Whenever I start/restart apache, the following output comes to httpd-error.log:

[Wed Jan 07 14:44:01 2009] [warn] (13)Permission denied: Cannot reinit SSLMutex
[Wed Jan 07 14:44:02 2009] [warn] (13)Permission denied: Cannot reinit SSLMutex
[Wed Jan 07 14:44:02 2009] [warn] (13)Permission denied: Cannot reinit SSLMutex

I've tried to look around for anything about SSLMutex, but I'm left clueless beside it's an extension for mod_ssl.

Now when I try to use the webpage I'm hosting using SSL I get the following output:

[Wed Jan 07 14:44:02 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/home/xxx/includes/languages/danish.php:647) in /usr/home/xxx/includes/functions/general.php on line 30, referer: http://xxx.xxx.xxx.xxx/

The following file /usr/home/xxx/includes/functions/general.php is using the SSL at this bit (line 30 included):

////
// Redirect to another page or site
function tep_redirect($url) {
if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}
// THIS IS WHERE LINE 30 IS IN THE FILE, THIS IS WHERE THE ERROR OCCURS.
header('Location: ' . $url);

tep_exit();
}

////

I suspect the error occurs due to SSLMutex not being reinited, but I'd appreciate any input on what to do in this situation. And any information about SSLMutex would be great.

Mel_Flynn
February 12th, 2009, 07:36
Unrelated to SSLMutex, but your problem is in danish.php. Or better, the tep_redirect function should:

while( ob_get_level() )
ob_end_clean();

before calling header().

As far as SSLMutex goes, are you using semaphores? The message doesn't make sense with any file based mutex. See:
http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslmutex