Commit b5b86263 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3504 - Switching between FastCGI and any other and VHost website issue

parent 02797b78
......@@ -1205,18 +1205,15 @@ class apache2_plugin {
} else {
//remove the php fastgi starter script if available
$fastcgi_starter_script = $fastcgi_config['fastcgi_starter_script'].($data['old']['type'] == 'vhostsubdomain' ? '_web' . $data['old']['domain_id'] : '');
if ($data['old']['php'] == 'fast-cgi') {
$fastcgi_starter_path = str_replace('[system_user]', $data['old']['system_user'], $fastcgi_config['fastcgi_starter_path']);
$fastcgi_starter_path = str_replace('[client_id]', $client_id, $fastcgi_starter_path);
if($data['old']['type'] == 'vhost') {
if (is_dir($fastcgi_starter_path)) {
exec('rm -rf '.$fastcgi_starter_path);
}
if(is_file($fastcgi_starter_script)) @unlink($fastcgi_starter_script);
if (is_dir($fastcgi_starter_path)) @rmdir($fastcgi_starter_path);
} else {
$fcgi_starter_script = $fastcgi_starter_path.$fastcgi_config['fastcgi_starter_script'].'_web' . $data['old']['domain_id'];
if (file_exists($fcgi_starter_script)) {
exec('rm -f '.$fcgi_starter_script);
}
if(is_file($fastcgi_starter_script)) @unlink($fastcgi_starter_script);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment