ispCP - Board - Support
RC5 release soon! Tester Wanted! - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: RC5 release soon! Tester Wanted! (/thread-3326.html)

Pages: 1 2 3 4 5


RE: RC5 release soon! Tester Wanted! - sci2tech - 05-20-2008 03:40 AM

Only find this in ispcp.conf:
AWSTATS_CACHE_DIR = /var/cache/awstats
AWSTATS_CONFIG_DIR = /etc/awstats
AWSTATS_WEB_DIR = /usr/share/awstats
AWSTATS_ROOT_DIR = /var/www/ispcp/engine/awstats

AWSTATS_PATH seems to be defined in
.../client/error_pages.php function gen_page_awstats($tpl) (line 65)
in
.../client/protect_it.php function gen_page_awstats($tpl) (line 351)
in
.../client/puser_gadd.php function gen_page_awstats($tpl) (line 117)
in
.../client/puser_manage.php function gen_page_awstats($tpl) (line 148)
in
.../client/puser_edit.php function gen_page_awstats($tpl) (line 126)
in
.../client/puser_asign.php function gen_page_awstats($tpl) (line 270)
in
.../client/webtools.php function gen_page_awstats($tpl) (line 42)
in
.../client/error_edit.php function gen_page_awstats($tpl) (line 78)
in
.../client/protected areas.php function gen_page_awstats($tpl) (line 89)
in
.../client/puser_uadd.php function gen_page_awstats($tpl) (line 135)
in
.../client/backup.php function gen_page_awstats($tpl) (line 67)
in all files there is same function
PHP Code:
function gen_page_awstats($tpl) {
        global 
$cfg;
        
$awstats_act $cfg['AWSTATS_ACTIVE'];
        if (
$awstats_act != 'yes') {
                
$tpl->assign('ACTIVE_AWSTATS''');
        } else {
                
$tpl->assign(
                        array(
                                
'AWSTATS_PATH' => 'http://' $_SESSION['user_logged'] . '/stats/',
                                
'AWSTATS_TARGET' => '_blank'
                                
)
                        );
        }

generated result is
Quote:<tr>
<td><a href="http://cms.eu.bogus/stats/" target="_blank" class="submenu">Web statistics</a></td>
</tr>
if $cfg when running webtools.php:
Quote:[AWSTATS_ACTIVE] => yes
[AWSTATS_MODE] => 1
[AWSTATS_CACHE_DIR] => /var/cache/awstats
[AWSTATS_CONFIG_DIR] => /etc/awstats
[AWSTATS_ENGINE_DIR] => /usr/lib/cgi-bin
[AWSTATS_WEB_DIR] => /usr/share/awstats
[AWSTATS_ROOT_DIR] => /var/www/ispcp/engine/awstats
But I DO remember that i specified static awstats when i installed ispcp.
I`ll install a fress lenny tonigh with last trunk from ispcp and we shall see what happend.
BTW: It`s the same function in all that file Tongue
Later:
I think it`s significant the template too:
Sniff from .../gui/themes/omega_original/client/webtools.tpl:
Quote: <!-- BDP: active_awstats -->
<tr>
<td>&nbsp;</td>
<td class="content">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="65"><a href="{AWSTATS_PATH}" target="{AWSTATS_TARGET}"><img src="{THEME_COLOR_PATH}/images/icons/awstatsicon.gif" alt="awstats" width="46" height="46" border="0"></a></td>
<td><a href="{AWSTATS_PATH}" target="{AWSTATS_TARGET}" class="link">&nbsp;{TR_AWSTATS}</a><br />
&nbsp;{TR_AWSTATS_TEXT}</td>
</tr>
</table>
</td>
</tr>
<!-- EDP: active_awstats -->



RE: RC5 release soon! Tester Wanted! - ispcomm - 05-20-2008 04:42 AM

sci2tech Wrote:
Code:
function gen_page_awstats($tpl) {
        global $cfg;
        $awstats_act = $cfg['AWSTATS_ACTIVE'];
        if ($awstats_act != 'yes') {
                $tpl->assign('ACTIVE_AWSTATS', '');
        } else {
                $tpl->assign(
                        array(
                                'AWSTATS_PATH' => 'http://' . $_SESSION['user_logged'] . '/stats/',
                                'AWSTATS_TARGET' => '_blank'
                                )
                        );
        }
}
The bug is here. If awstats is dynanic AWSTATS_PATH is never defined hence never substituted in the template. Maybe a bug in the template (but since I'd move this logic to the php file I'd modify it to define a corrent AWSTATS_PATH).
sci2tech Wrote:BTW: It`s the same function in all that file Tongue
Yes... like I said in the past. Whoever coded this mess has been paid by the line of code and not for quality. SmileSmileSmile

Good luck. I think you nailed down the problem correctly.

ADDED: However a little more debugging on my platform shows that AWSTATS_PATH is set correctly.

The problem is in the declaration of the function where $tpl is passed as value. It must be passed as reference:
Code:
function gen_page_awstats(&$tpl) {
....

I tested and it works Smile

You can attach the patch to the ticket as you're the one who found it Smile

ispcomm.


RE: RC5 release soon! Tester Wanted! - sci2tech - 05-20-2008 05:39 AM

ispcomm Wrote:You can attach the patch to the ticket as you're the one who found it Smile
.
No need. Rats already fixed. I tracked down but you are the one who figure the problem. I think it`s not about who, it`s all about make it stable Wink . I can`t wait to see the the cleaned code from vacancy.


RE: RC5 release soon! Tester Wanted! - ispcomm - 05-20-2008 08:34 AM

Hmmm.. i have bad presentiment about this one...

ispcomm


RE: RC5 release soon! Tester Wanted! - ispcomm - 05-21-2008 10:49 PM

I found one more bug that is imho serious because it prevents editing resellers. More info here http://www.isp-control.net/ispcp/ticket/1272

ispcomm


RE: RC5 release soon! Tester Wanted! - Kika - 06-01-2008 03:45 AM

I just installed the latest nightly build. When i clicked to the database update in the ispCP's menu than i give an error message: database update #4 failed. When i click to the database update menu again i found that i haven't new update :S

I will test this version tonight. Smile


RE: RC5 release soon! Tester Wanted! - Kika - 06-01-2008 04:06 AM

I tired to run the script by hand:
Code:
ALTER IGNORE TABLE `mail_users` CHANGE `mail_auto_respond` `mail_auto_respond_text` text collate utf8_unicode_ci;
ALTER IGNORE TABLE `mail_users` ADD `mail_auto_respond` BOOL NOT NULL default '0' AFTER `status`;
ALTER IGNORE TABLE `mail_users` CHANGE `mail_type` `mail_type` varchar(30);

Mysql error: #1054 - Unknown column 'mail_auto_respond' in 'mail_users'.


RE: RC5 release soon! Tester Wanted! - ralph - 06-04-2008 07:10 AM

ANY eta on RC5 so i can test it?


RE: RC5 release soon! Tester Wanted! - sci2tech - 06-04-2008 07:12 AM

ralph Wrote:ANY eta on RC5 so i can test it?
http://www.isp-control.net/download.html all are RC5 betas Smile . Use the last one.


RE: RC5 release soon! Tester Wanted! - aseques - 06-04-2008 05:36 PM

sci2tech Wrote:
ralph Wrote:ANY eta on RC5 so i can test it?
http://www.isp-control.net/download.html all are RC5 betas Smile . Use the last one.

I would like to know if the new changes commited to svn are still for the rc5 or if someone is tagging the new version so I don't mix rc6 patches with rc5 stuff.
I plan to use the most recent rc5 before breaking anything in the way to rc6