ISPConfig 3 issueshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues2017-11-10T15:25:39Zhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/744RewriteRule: unknown flag '[L]'2017-11-10T15:25:39ZNed HadRewriteRule: unknown flag '[L]'After update to ISPConfig 3.0.1.4 I get following error, apache dies if restarted.
RewriteRule: unknown flag '[L]'
from file /etc/apache2/sites-enabled/domain.co.uk.vhost
RewriteRule ^/(.*)$ http://www.to-domain.com/$1...After update to ISPConfig 3.0.1.4 I get following error, apache dies if restarted.
RewriteRule: unknown flag '[L]'
from file /etc/apache2/sites-enabled/domain.co.uk.vhost
RewriteRule ^/(.*)$ http://www.to-domain.com/$1 [[R,L]]
it should just be [R,L] or [L]https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/743When entered wrong user login data on ispconfig login page2017-11-10T15:25:39ZNed HadWhen entered wrong user login data on ispconfig login pagethe version number is showed in footer - ISPConfig 3.0.1.4the version number is showed in footer - ISPConfig 3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/742Webalizer stats working only for first domain...2017-11-10T15:25:39ZRené AdlerWebalizer stats working only for first domain...incremental stats update on fedora 11 work's only for the first domain if don't use a separate config for every client. i fixed it with following lines of code.
cron_daily.php
--------------
function setConfigVar( $filename, $varN...incremental stats update on fedora 11 work's only for the first domain if don't use a separate config for every client. i fixed it with following lines of code.
cron_daily.php
--------------
function setConfigVar( $filename, $varName, $varValue ) {
if($lines = @file($filename)) {
$out = '';
$found = 0;
foreach($lines as $line) {
list($key, $value) = split("[\t= ]+", $line, 2);
if($key == $varName) {
$out .= $varName." ".$varValue."\n";
$found = 1;
} else {
$out .= $line;
}
}
if($found == 0) {
//* add \n if the last line does not end with \n or \r
if(substr($out,-1) != "\n" && substr($out,-1) != "\r") $out .= "\n";
//* add the new line at the end of the file
if($append == 1) $out .= $varName." ".$varValue."\n";
}
file_put_contents($filename,$out);
}
}
...
#######################################################################################################
// Create webalizer statistics
#######################################################################################################
$sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ".$conf["server_id"];
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
$yesterday = date("Ymd",time() - 86400);
$logfile = escapeshellcmd($rec["document_root"].'/log/'.$yesterday.'-access.log');
if(!@is_file($logfile)) {
$logfile = escapeshellcmd($rec["document_root"].'/log/'.$yesterday.'-access.log.gz');
if(!@is_file($logfile)) {
continue;
}
}
$domain = escapeshellcmd($rec["domain"]);
$statsdir = escapeshellcmd($rec["document_root"].'/web/stats');
$webalizer = '/usr/bin/webalizer';
$webalizer_conf_main = '/etc/webalizer/webalizer.conf';
$webalizer_conf = escapeshellcmd($rec["document_root"].'/log/webalizer.conf');
if(!@is_file($webalizer_conf)) {
exec("cp $webalizer_conf_main $webalizer_conf");
setConfigVar($webalizer_conf, 'Incremental', 'yes');
setConfigVar($webalizer_conf, 'IncrementalName', $logdir.'/webalizer.current');
setConfigVar($webalizer_conf, 'HistoryName', $logdir.'/webalizer.hist');
}
if(!@is_dir($statsdir)) mkdir($statsdir);
exec("$webalizer -c $webalizer_conf -n $domain -s $domain -r $domain -q -T -p -o $statsdir $logfile");
}
for re-create all stats use ...
recalc_stats.php
----------------
```php
<?php
/*
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require("lib/config.inc.php");
require("lib/app.inc.php");
set_time_limit(0);
// make sure server_id is always an int
$conf["server_id"] = intval($conf["server_id"]);
// Load required base-classes
$app->uses('ini_parser,file,services');
function setConfigVar( $filename, $varName, $varValue ) {
if($lines = @file($filename)) {
$out = '';
$found = 0;
foreach($lines as $line) {
list($key, $value) = split("[\t= ]+", $line, 2);
if($key == $varName) {
$out .= $varName." ".$varValue."\n";
$found = 1;
} else {
$out .= $line;
}
}
if($found == 0) {
//* add \n if the last line does not end with \n or \r
if(substr($out,-1) != "\n" && substr($out,-1) != "\r") $out .= "\n";
//* add the new line at the end of the file
if($append == 1) $out .= $varName." ".$varValue."\n";
}
file_put_contents($filename,$out);
}
}
#######################################################################################################
// Re-Create webalizer statistics
#######################################################################################################
$sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ".$conf["server_id"];
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
$domain = escapeshellcmd($rec["domain"]);
$logdir = escapeshellcmd($rec["document_root"].'/log');
$statsdir = escapeshellcmd($rec["document_root"].'/web/stats');
$webalizer = '/usr/bin/webalizer';
$webalizer_conf_main = '/etc/webalizer/webalizer.conf';
$webalizer_conf = escapeshellcmd($rec["document_root"].'/log/webalizer.conf');
exec("rm -rf $webalizer_conf");
if(!@is_file($webalizer_conf)) {
exec("cp $webalizer_conf_main $webalizer_conf");
setConfigVar($webalizer_conf, 'Incremental', 'yes');
setConfigVar($webalizer_conf, 'IncrementalName', $logdir.'/webalizer.current');
setConfigVar($webalizer_conf, 'HistoryName', $logdir.'/webalizer.hist');
}
if(!@is_dir($statsdir)) mkdir($statsdir);
echo "Remove stats dir $statsdir ...\n";
exec("rm -rf $statsdir/*");
echo "Re-Create stats for $domain...\n";
exec("for logfile in $logdir/*access*; do\n$webalizer -c $webalizer_conf -n $domain -s $domain -r $domain -q -T -p -o $statsdir ".'$logfile'."\ndone");
echo "done.\n";
}
die("finished.\n");
?>
```3.0.1.5https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/741SRV Records need validation2017-11-10T15:25:39ZJason RosenthalSRV Records need validationmyDNS is really picky regarding SRV records. If the service record does not contain "3 space-separated values" then mydns throws a seg-fault when the zone is checked or transferred. If the service record is only one value (sip.example...myDNS is really picky regarding SRV records. If the service record does not contain "3 space-separated values" then mydns throws a seg-fault when the zone is checked or transferred. If the service record is only one value (sip.example.com), ISPConfig accepts it but myDNS does not like it. A workaround is to add 2 spaces in front of the single value ( sip.example.com) and mydns is happy again.3.0.1.5https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/740Spamfilter setting in email domain can not be changed directly2017-11-10T15:25:39ZTill BrehmSpamfilter setting in email domain can not be changed directlyThe spamfilter setting of email domains can not be changed directly. Currently you have to select not enabled and click on save before you can set a different filterThe spamfilter setting of email domains can not be changed directly. Currently you have to select not enabled and click on save before you can set a different filter3.0.1.5https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/733Server selector is not working for clients in 3.0.1.4 beta 22017-11-10T15:25:39ZTill BrehmServer selector is not working for clients in 3.0.1.4 beta 2Server selector is not working for clients in 3.0.1.4 beta 2Server selector is not working for clients in 3.0.1.4 beta 23.0.1.4Till BrehmTill Brehmhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/732bad handling of environment variables with jailkit ssh users in server/conf/b...2017-11-10T15:25:39ZBillbad handling of environment variables with jailkit ssh users in server/conf/bash.bashrc.masterat start of bash.bashrc these variables exist
HOME=/home/tester2
UID=5005
USER=tester2
USERNAME=tester2
[note] LOGNAME is not set
bash.bashrc has this logic
<tmpl_if name='jailkit_chroot'>
## Hack for Jailkit User to chan...at start of bash.bashrc these variables exist
HOME=/home/tester2
UID=5005
USER=tester2
USERNAME=tester2
[note] LOGNAME is not set
bash.bashrc has this logic
<tmpl_if name='jailkit_chroot'>
## Hack for Jailkit User to change back to the logged in user ##
if [ "$LOGNAME" != $USER ]; then
export HOME=<tmpl_var name='home_dir'>$LOGNAME
export USER=$LOGNAME
export USERNAME=$LOGNAME
cd $HOME
fi
## Change machine hostname to site domain ##
export HOSTNAME=<tmpl_var name='domain'>
</tmpl_if>
So because LOGNAME != USER the variables become:
HOME=/home/
USER=
USERNAME=
Is there a good reason for this and why does it all depend on $LOGNAME?3.0.1.5https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/731mod: monitor_core_module.inc.php function: monitorRkHunter - Cron Issue2017-11-10T15:25:39Zbajodelmod: monitor_core_module.inc.php function: monitorRkHunter - Cron IssueMod: monitor_core_module.inc.php
Function: monitorRkHunter (and maybe other)
---- CODE QUOTE START ----
[ ..CUT.. ]
$this->monitorServer();
$this->monitorDiskUsage();
$this->monitorMemUsage();
...Mod: monitor_core_module.inc.php
Function: monitorRkHunter (and maybe other)
---- CODE QUOTE START ----
[ ..CUT.. ]
$this->monitorServer();
$this->monitorDiskUsage();
$this->monitorMemUsage();
$this->monitorCpu();
$this->monitorServices();
$this->monitorMailLog();
$this->monitorMailWarnLog();
$this->monitorMailErrLog();
$this->monitorMessagesLog();
$this->monitorISPCCronLog();
$this->monitorFreshClamLog();
$this->monitorClamAvLog();
$this->monitorIspConfigLog();
$this->monitorSystemUpdate();
$this->monitorMailQueue();
$this->monitorRaid();
$this->monitorRkHunter();
$this->monitorFail2ban();
$this->monitorSysLog();
[ ..CUT.. ]
function monitorRkHunter(){
/*
* This monitoring is expensive, so do it only once a day
*/
$min = date('i');
$hour = date('H');
if ($min != 0 && $hour != 23) return;
[ ..CUT.. ]
---- CODE QUOTE END ----
I noticed rkhunter start too frequently .. the function is called at the bottom of the list and when time arrive to call that function the 'not run' time check fails ( $min is already not 0)
I think it's better to change the 'not run now' time conditions .. or put the functions in which there is such test at the top of the list.
Bye..
bajodel.3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/728How to migrate ensim to ispconfig32017-11-10T15:25:39ZsreerajHow to migrate ensim to ispconfig3Hello,
I need to migrate from ENSIM server to ISPCONFIG3.If any one have doc please send to or add a comment.Most of the google link says that remote plugin need to be installed and how to install .pkg in linux server....
thanks
sre...Hello,
I need to migrate from ENSIM server to ISPCONFIG3.If any one have doc please send to or add a comment.Most of the google link says that remote plugin need to be installed and how to install .pkg in linux server....
thanks
sreeraj
sreerajganga@rediffmail.comhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/726check if rkhunter is running too frequently2017-11-10T15:25:39ZTill Brehmcheck if rkhunter is running too frequentlycheck if rkhunter is running too frequentlycheck if rkhunter is running too frequently3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/721Display Error in Internet Explorer creating a website2017-11-10T15:25:39ZSamirDisplay Error in Internet Explorer creating a websiteIn the Webinterface of ISPConfig 3 (latest version from SVN), there is a display error only occuring browsing with the Internet Explorer. It appears when I want to set up a new Website. After choosing the Webserver for this site, there s...In the Webinterface of ISPConfig 3 (latest version from SVN), there is a display error only occuring browsing with the Internet Explorer. It appears when I want to set up a new Website. After choosing the Webserver for this site, there should be an asterix where you can choose the IPs. This Asterix does not show up in the IE 8.x. That's why I had to patch the following files:
/usr/local/ispconfig/interface/web/sites/templates/database_edit.htm
<select name="server_id" id="server_id" class="selectInput" onChange="loadContentInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value)">
-> <select name="server_id" id="server_id" class="selectInput">
/usr/local/ispconfig/interface/web/sites/ajax_get_ip.php
$ip_select = "<option value='*'>*</option>\r\n";
-> $ip_select = "*";
$ip_select .= "<option value='$ip[ip_address]'>$ip[ip_address]</option>\r\n";
-> $ip_select .= "#$ip[ip_address]";
/usr/local/ispconfig/interface/web/sites/templates/web_domain_edit.htm (18)
<select name="server_id" id="server_id" class="selectInput" onChange="loadContentInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value);">
-> <select name="server_id" id="server_id" class="selectInput" onChange="loadOptionInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value);">
[changed the name of the function loadContentInto to loadOptionInto]
/usr/local/ispconfig/interface/web/js/scrigo.js.php
function loadOptionInto(elementid,pagename) {
var itemContentCallback = {
success: function(o) {
var teste = o.responseText;
var elemente = teste.split('#');
el=document.getElementById(elementid);
el.innerHTML='';
for (var i = 0; i < elemente.length; ++i){
var foo2 = document.createElement("option");
foo2.appendChild(document.createTextNode(elemente[i]));
foo2.value=elemente[i];
el.appendChild(foo2);
}
},
failure: function(o) {
alert('Ajax Request was not successful.');
}
}
var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename, itemContentCallback);
}
These changes caused the Asterisk to appear in the Internet Explorer, too.3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/719German translation of client tab2017-11-10T15:25:39ZMichaelGerman translation of client tabIf you use the german translation it still says "Client" on the tab in the top menu bar. But if you click on it so that you are in the client section it switches to "Kunden".If you use the german translation it still says "Client" on the tab in the top menu bar. But if you click on it so that you are in the client section it switches to "Kunden".https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/717Unlimitred mailbox quota when value = 02017-11-10T15:25:39ZTill BrehmUnlimitred mailbox quota when value = 0Unlimitred mailbox quota when value = 0Unlimitred mailbox quota when value = 03.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/714Database management issues.2017-11-10T15:25:39ZRodrigo Moglia (Interatia)Database management issues.Mysql limits:
username=16
tablename=64
databasename=64
fieldname=64
1)
User name is still limited to 16 in MySQL 5.
Need check if result name prefix + custon text for username database have more then 16 chars.
2)
Use...Mysql limits:
username=16
tablename=64
databasename=64
fieldname=64
1)
User name is still limited to 16 in MySQL 5.
Need check if result name prefix + custon text for username database have more then 16 chars.
2)
User database name is still limited to 64 in MySQL 5.
Need check if result name prefix + custon text for database name database have more then 64 chars.
3)
Deleting database from interface don´t remove the phisical database and user. (need confirm first before deletion "you shure remove database?")
4) You can not choose existing user for new database.3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/713Language Editor: wrong filename shown while editing language-file outher glob...2017-11-10T15:25:39ZAlexander KampLanguage Editor: wrong filename shown while editing language-file outher global moduleSmall presentation bug that is only shown when editing Language-files outsite the global module.
For example:
Language File Edit: /usr/local/ispconfig/interface/lib/lang/nl.lng -> Correct (global module)
Language File Edit: /usr/loc...Small presentation bug that is only shown when editing Language-files outsite the global module.
For example:
Language File Edit: /usr/local/ispconfig/interface/lib/lang/nl.lng -> Correct (global module)
Language File Edit: /usr/local/ispconfig/interface/lib/admin/lib/lang/nl_software_repo_list.lng -> Wrong (../interface/lib/... should be ../interface/web/...)
All changes made in the language editor are saved, so this is just a presentation bug.
Also the editor won't return to the languages files-overview. Maybe bug in redirecting after executed 'Save'-action?3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/711Regarding Pure-ftpd2017-11-10T15:25:39Zshridhar kapshikarRegarding Pure-ftpdPure-ftpd Installations
Hi friends i need some steps regarding pure
-ftpd
As earlier then mention in howtoforge i gone through all the steps,
For instance, only Pure-Ftpd had gone faile.. please need a helpPure-ftpd Installations
Hi friends i need some steps regarding pure
-ftpd
As earlier then mention in howtoforge i gone through all the steps,
For instance, only Pure-Ftpd had gone faile.. please need a helphttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/710replacePrefix just returns last result (tools.inc.php)2017-11-10T15:25:39ZAlexander KampreplacePrefix just returns last result (tools.inc.php)When using multiple codes in prefixes (like u[CLIENTID]_[CLIENTNAME]), only the last result is being returned, causing validation errors (because [ and ] are not supported).
Located in /usr/local/ispconfig/interface/web/sites/tools.inc....When using multiple codes in prefixes (like u[CLIENTID]_[CLIENTNAME]), only the last result is being returned, causing validation errors (because [ and ] are not supported).
Located in /usr/local/ispconfig/interface/web/sites/tools.inc.php @ r30.
I prefer the following solution (not tested yet):
--------------
function replacePrefix($name, $dataRecord)
{
// No input -> no possible output -> go out!
if ($name=="")
return "";
// Array containing keys to search
$keywordlist=array('CLIENTNAME','CLIENTID');
// Try to match the key within the string
foreach ($keywordlist as $keyword)
if (substr_count($name, '['.$keyword.']') > 0)
{
switch ($keyword)
{
case 'CLIENTNAME' : $name=str_replace('['.$keyword.']', getClientName($dataRecord),$name);
break;
case 'CLIENTID' : $name=str_replace('['.$keyword.']', getClientID($dataRecord),$name);
break;
}
}
return $name;
}
--------------
Maybe interesting to think about a regular expression solution, instaid of this array-key-find method.
if (preg_match_all(/\[([^\]+)]\]/,$name,$matches)>0)
foreach($matches[1] as $match)
switch (strtoupper($match))
....
Code-blocks can perhaps also be lowercase.3.0.1.5Till BrehmTill Brehmhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/707waiting for 1200 or 12000 seconds?2017-11-10T15:25:40ZTorben Brodtwaiting for 1200 or 12000 seconds?we sleep with 10 seconds, we have a range from 1200 - so we sleep for 12000 seconds... i think this is too much
i had many ispconfig "instances" running, wasting my memory
see server.php
if(is_file($conf["temppath"].$conf["fs_di...we sleep with 10 seconds, we have a range from 1200 - so we sleep for 12000 seconds... i think this is too much
i had many ispconfig "instances" running, wasting my memory
see server.php
if(is_file($conf["temppath"].$conf["fs_div"].".ispconfig_lock")){
clearstatcache();
for($i=0;$i<1200;$i++){ // Wait max. 1200 sec, then proceed
if(is_file($conf["temppath"].$conf["fs_div"].".ispconfig_lock")){
$app->log("There is already a lockfile set. Waiting another 10 seconds...", LOGLEVEL_DEBUG);
sleep(10);
clearstatcache();
}
}
}https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/706Webalizer stats are missing since cron_daily.php script does not look for .gz...2017-11-10T15:25:40ZAndreas SchifflerWebalizer stats are missing since cron_daily.php script does not look for .gz compressed filesAfter noticing that webalizer stats for various subdomains were not complete (whole day ranges were missing), I noticed that the cron script does not pick up log files from "yesterday" since they had been already been gzip compressed.
...After noticing that webalizer stats for various subdomains were not complete (whole day ranges were missing), I noticed that the cron script does not pick up log files from "yesterday" since they had been already been gzip compressed.
Fix is easy ... check for uncompressed AND compressed logfiles in cron_daily.php using this updated code:
$sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ".$conf["server_id"];
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
$yesterday = date("Ymd",time() - 86400);
$logfile = escapeshellcmd($rec["document_root"].'/log/'.$yesterday.'-access.log');
if(!@is_file($logfile)) {
$logfile = escapeshellcmd($rec["document_root"].'/log/'.$yesterday.'-access.log.gz');
if(!@is_file($logfile)) {
continue;
}
}
$domain = escapeshellcmd($rec["domain"]);
$statsdir = escapeshellcmd($rec["document_root"].'/web/stats');
$webalizer = '/usr/bin/webalizer';
$webalizer_conf = '/etc/webalizer/webalizer.conf';
if(!@is_dir($statsdir)) mkdir($statsdir);
$commandline = "$webalizer -c $webalizer_conf -n $domain -s $domain -r $domain -q -T -o $statsdir $logfile";
exec($commandline);
}3.0.1.4https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/705DNS serial is updated by viewing records.2017-11-10T15:25:42ZJason RosenthalDNS serial is updated by viewing records.Whenever you click the "Records" tab while looking at a DNS zone, the serial gets incremented, even with no changes to the zone.
You can click the "DNS Zone" and "Records" tabs back and forth and the serial gets incremented each time th...Whenever you click the "Records" tab while looking at a DNS zone, the serial gets incremented, even with no changes to the zone.
You can click the "DNS Zone" and "Records" tabs back and forth and the serial gets incremented each time the records are listed.
I feel like the zone serial # should only be updated if there is truly an update or change to the zone.3.0.2Till BrehmTill Brehm