Control Web Panel
WebPanel => Updates => Topic started by: cloud on February 03, 2020, 04:35:51 PM
-
Dear Developers,
Congratulate for the new login window, Iam an PRO user, after recent update error log option is not showing
any where in the user control panel. So please let me know if it was removed or it will be available when any error
happen in php script which Cpanel follow. So please let me know where is our error log >:(
If any one know how to move this user error logs to their public directory or error occurring folder same like
Cpanel. OR please consider this request to be added in your next update to move the error logs to user direcotry
by this way user usage quota will also effect and if any one is not caring about error log they will start looking to
it if their quota was full because of error log files.
-
The error logs stay in the /usr/local/apache/domlogs/*.error.log ;)
-
yes all access and error logs are in /usr/local/apache/domlogs/ sorted by individual domain name.
-
yes all access and error logs are in /usr/local/apache/domlogs/ sorted by individual domain name.
If the error logs are not accessible by the user in their control panel what was the use to staying it there ..?
Error logs are very important for users, if they have sort of issues in their script how they can access it if it was
not view able from their control panel ? Did you think each time the server admin or support have time to share
the error logs with them ..?
-
The error logs stay in the /usr/local/apache/domlogs/*.error.log ;)
If it can't be accessible or view able by the hosted user what is the use of it. Before reply think twise.
It was an important thing which each hosted user needed it.
-
user panel error log module is in developement
-
Seriously Devs. It's not that hard if you would be willing to expand basedir
sed -i "s@fastcgi_param PHP_ADMIN_VALUE \"open_basedir =/home@fastcgi_param PHP_ADMIN_VALUE \"open_basedir =/usr/local/apache/domlogs/:/home@g" /root/cwpsrv/conf.d/users/*.conf
cwpsrv -s reload
cp -R /usr/local/cwpsrv/var/services/users/cwp_theme/origional /usr/local/cwpsrv/var/services/users/cwp_theme/modified/
// PHP Section /usr/local/cwpsrv/var/services/user_files/modules/php_error.php
<?php
if (isset($_GET["loadfile"])) {
if (file_exists("/usr/local/apache/domlogs/{$_GET["loadfile"]}.error.log")) {
echo $content = file_get_contents("/usr/local/apache/domlogs/{$_GET["loadfile"]}.error.log");
} else {
echo "No File Found";
};
exit;
}
// Replace this with built in code to populate domains and subdomains //
//use API to get list of users
$mod["returl"] = $_SERVER['REQUEST_URI'];
$data = array("key" => "(SET YOUR API KEY HERE)","action"=>'list',"user"=>$_SESSION ['username']);
$url = "https://{$_SERVER['SERVER_NAME']}:2304/v1/accountdetail";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response);
$domains = array();
$mod['select'] = array();
foreach ($response->result->domains as $key) {
$domains[] = trim($key->domain);
}
foreach ($response->result->subdomins as $key) {
$domains[] = trim($key->subdomain .".". $key->domain);
}
foreach ($domains as $domain) {
$mod['select'][] = $domain;
}
if (file_exists("/usr/local/apache/domlogs/{$domains[0]}.error.log")) {
$mod['file'] = file_get_contents("/usr/local/apache/domlogs/{$domains[0]}.error.log");
} else {
$mod['file'] = "No File Found";
};
?>
HTML /usr/local/cwpsrv/var/services/users/cwp_theme/modified/mod_php_error.html <<< YOu might want to copy origional to modified so it doesn't go bye bye
<div class="row">
<div class="col-lg-12">
<h1>Error Log</h1>
</div>
<div>
/usr/local/apache/domlogs/
<form action="{{mod.returl}}" action="get"><select id="loadfile">
{% for option in mod.select %}
<option>{{ option }}</option>
{% endfor %}
</select><noscript><input type="submit" value="Change"></noscript></form>
<textarea id="logfile" readonly style="width:800px; height:400px">{{mod.file}}</textarea>
</div>
</div>
javascript /usr/local/cwpsrv/var/services/users/cwp_theme/modified/js/modules/php_error.js.twig
(function($){
$(document).ready(function() {
$("#loadfile").change(function() {
$.get( "{{mod.returl}}", { loadfile: $("#loadfile").val() },"text" )
.done(function( data ) {
if (data == "") data = "Congratulations! No PHP Errors were logged";
$("#logfile").text(data);
});
});
});
})(jQuery);
INI File /usr/local/cwpsrv/var/services/users/cwp_lang/en/php_error.ini
SOMETHING="Nobody Really Cares"
Edit file /usr/local/cwpsrv/var/services/users/cwp_theme/modified/menu_left.html
find (~ Line 62)
{% if ("statistics" in rmenu )or(swmenu==1) %}
<li class="search"><a href="?module=statistics">{{langene.GNLABEL51}}</a></li>
{% endif %}
add after
<li class="search"><a href="?module=php_error">PHP Error Log</a></li>
-
Additional Note, because the theme changer doesn't work, you need to change /home/(users)/.conf/cwp.ini THEME to modified
-
Seriously it was very hard to find when a small error occur while executing an script. In the error log viewer there was was option to check date wise. Currently we are running and in the CWP hosting account it have user, manager and admin directory each folder inside some script have some issues in a day that CRM was using by more than 50 users with different with different privilege. If we check the error log for an single folder issue we can't find it when we give Results lines as 1 or 10 So it was an serious mistake in CWP. If the CWP TEAM can build an Hosting panel like this why this option was possible ?
-
Hi, can you tell me if it can done from our end, as the CWP TEAM is looking only for get revenue but they for forgot about if there was feature the user will automatically move to paid version (CWP PRO) Because of the feature they are getting. So if you can explain these this can be added by administrator it will be helpful for other who looking for the same answer.
Seriously Devs. It's not that hard if you would be willing to expand basedir
sed -i "s@fastcgi_param PHP_ADMIN_VALUE \"open_basedir =/home@fastcgi_param PHP_ADMIN_VALUE \"open_basedir =/usr/local/apache/domlogs/:/home@g" /root/cwpsrv/conf.d/users/*.conf
cwpsrv -s reload
cp -R /usr/local/cwpsrv/var/services/users/cwp_theme/origional /usr/local/cwpsrv/var/services/users/cwp_theme/modified/
// PHP Section /usr/local/cwpsrv/var/services/user_files/modules/php_error.php
<?php
if (isset($_GET["loadfile"])) {
if (file_exists("/usr/local/apache/domlogs/{$_GET["loadfile"]}.error.log")) {
echo $content = file_get_contents("/usr/local/apache/domlogs/{$_GET["loadfile"]}.error.log");
} else {
echo "No File Found";
};
exit;
}
// Replace this with built in code to populate domains and subdomains //
//use API to get list of users
$mod["returl"] = $_SERVER['REQUEST_URI'];
$data = array("key" => "(SET YOUR API KEY HERE)","action"=>'list',"user"=>$_SESSION ['username']);
$url = "https://{$_SERVER['SERVER_NAME']}:2304/v1/accountdetail";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response);
$domains = array();
$mod['select'] = array();
foreach ($response->result->domains as $key) {
$domains[] = trim($key->domain);
}
foreach ($response->result->subdomins as $key) {
$domains[] = trim($key->subdomain .".". $key->domain);
}
foreach ($domains as $domain) {
$mod['select'][] = $domain;
}
if (file_exists("/usr/local/apache/domlogs/{$domains[0]}.error.log")) {
$mod['file'] = file_get_contents("/usr/local/apache/domlogs/{$domains[0]}.error.log");
} else {
$mod['file'] = "No File Found";
};
?>
HTML /usr/local/cwpsrv/var/services/users/cwp_theme/modified/mod_php_error.html <<< YOu might want to copy origional to modified so it doesn't go bye bye
<div class="row">
<div class="col-lg-12">
<h1>Error Log</h1>
</div>
<div>
/usr/local/apache/domlogs/
<form action="{{mod.returl}}" action="get"><select id="loadfile">
{% for option in mod.select %}
<option>{{ option }}</option>
{% endfor %}
</select><noscript><input type="submit" value="Change"></noscript></form>
<textarea id="logfile" readonly style="width:800px; height:400px">{{mod.file}}</textarea>
</div>
</div>
javascript /usr/local/cwpsrv/var/services/users/cwp_theme/modified/js/modules/php_error.js.twig
(function($){
$(document).ready(function() {
$("#loadfile").change(function() {
$.get( "{{mod.returl}}", { loadfile: $("#loadfile").val() },"text" )
.done(function( data ) {
if (data == "") data = "Congratulations! No PHP Errors were logged";
$("#logfile").text(data);
});
});
});
})(jQuery);
INI File /usr/local/cwpsrv/var/services/users/cwp_lang/en/php_error.ini
SOMETHING="Nobody Really Cares"
Edit file /usr/local/cwpsrv/var/services/users/cwp_theme/modified/menu_left.html
find (~ Line 62)
{% if ("statistics" in rmenu )or(swmenu==1) %}
<li class="search"><a href="?module=statistics">{{langene.GNLABEL51}}</a></li>
{% endif %}
add after
<li class="search"><a href="?module=php_error">PHP Error Log</a></li>