Several opensuse related fixes.
| | |
| | | //copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf'); |
| | | $content = rf("tpl/apache_ispconfig.conf.master"); |
| | | $records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'"); |
| | | if(count($records) > 0) { |
| | | if(is_array($records) && count($records) > 0) { |
| | | foreach($records as $rec) { |
| | | $content .= "NameVirtualHost ".$rec["ip_address"].":80\n"; |
| | | $content .= "NameVirtualHost ".$rec["ip_address"].":443\n"; |
| | |
| | | CREATE TABLE `sys_session` ( |
| | | CREATE TABLE IF NOT EXISTS `sys_session` ( |
| | | `session_id` varchar(32) NOT NULL default '', |
| | | `date_created` datetime NOT NULL default '0000-00-00 00:00:00', |
| | | `last_updated` datetime NOT NULL default '0000-00-00 00:00:00', |
| | |
| | | break; |
| | | } |
| | | |
| | | if (!fwrite($fp, date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\r\n")) { |
| | | if (!fwrite($fp, @date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\r\n")) { |
| | | die('Unable to write to logfile.'); |
| | | } |
| | | echo date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\n"; |
| | | echo @date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\n"; |
| | | fclose($fp); |
| | | |
| | | // Log to database |
| | |
| | | /* |
| | | * Do the monitor every n minutes and write the result to the db |
| | | */ |
| | | $min = date('i'); |
| | | $min = @date('i'); |
| | | if (($min % $this->interval) == 0) { |
| | | $this->doMonitor(); |
| | | } |