site counter installation problems - help!
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_sitestats
View previous topic :: View next topic  
Author Message
=cipher=



Joined: 18 Feb 2005
Posts: 11
Location: My Computer

PostPosted: Fri Feb 18, 2005 7:57 pm    Post subject: site counter installation problems - help! Reply with quote

Hey, I tried to add the site counter to on of my pages today. Unfortunatly it had a debug error and said please contact www.phpMix.com for support on the installation process of this. I was able to get everything uploaded, installed and working except the site counters (times visited one:D)

Could someone please help!

 
 
_________________
Best Regards:
Aaron McGowan (=cipher=)
 
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Fri Feb 18, 2005 8:22 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Was that a message with a link to the module release notes? Rolling Eyes

.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Feb 20, 2005 1:32 am    Post subject: Re: site counter installation problems - help! Reply with quote

...and reading the above mentioned notes fixed the problem?


Rolling Eyes

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Tue Apr 05, 2005 8:58 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Not here... I get the same error... refers to the install docs..

realized that I didn't have the page_header.php mod anymore because of my upgrade to mx 2.7.5

so I go readd the following code
Code:

// ------------------------------
// MOD:mx_sitestats:begin
//
include_once( $mx_root_path . 'modules/mx_sitestats/collector.' . $phpEx );
//
//MOD:mx_sitestats:end
// ------------------------------


to the bottom of my page_header.php right before the ?>

make sure there's no blank space after the ?> and save.

Now I only get a page header, the rest is blank.
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Thu Apr 07, 2005 3:31 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Sorry, for the delay. I've been a bit busy working on latest mxBB Core release (2.7.5-pl3).

Still with problems?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Fri Apr 08, 2005 10:25 pm    Post subject: Re: site counter installation problems - help! Reply with quote

markus wrote:
Sorry, for the delay. I've been a bit busy working on latest mxBB Core release (2.7.5-pl3).

Still with problems?


Yup... if I include the counter.php in my page_header.php the entire site will not display. If I don't I get the "it's not setup right" error. I just pasted the above code right above the ?> and made sure there were not blanks after the ?>

This worked fine before I upgraded to 2.7.5 and 2.7.5-pl3
 
Back to top
View user's profile Send private message
MennoniteHobbit



Joined: 11 May 2004
Posts: 196
Location: Indiana, USA

PostPosted: Sat Apr 09, 2005 12:20 am    Post subject: Re: site counter installation problems - help! Reply with quote

Odd; my site's running pl3 and all I had to do was reinstall the collection part, and everything works fine... 
Back to top
View user's profile Send private message Send e-mail MSN Messenger
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Apr 09, 2005 1:09 am    Post subject: Re: site counter installation problems - help! Reply with quote

Well, the question now is how to debug this... maybe doing something like...

OPEN: modules/mx_sitestats/collector.php

FIND:
Code:
//
// Security check...
//


BEFORE ADD:
Code:
die("This is step 1.");


FIND:
Code:
if( !defined('IN_PORTAL') && !defined('IN_PHPBB') )
{
   die("Hacking attempt !!!");
}


AFTER ADD:
Code:
die("This is step 2.");


FIND:
Code:
$module_root_path = $module_root_save;


AFTER ADD:
Code:
die("This is step 3.");


FIND:
Code:
if( !$sitestats_counter->updateCounter() )
{
   if( $userdata['user_level'] == ADMIN )
   {
//      message_die(GENERAL_ERROR, "Could not update SiteStats counter information for page: " . $sitestats_counter->page,
//         "", __LINE__, __FILE__, $sitestats_counter->sql);
   }
}


AFTER ADD:
Code:
die("This is step 4.");


FIND:
Code:
//
// Update HTTP Referer...
//
if( $sitestats_config['referers_logging'] )
{
   if( !$sitestats_counter->updateReferer() )
   {
      if( $userdata['user_level'] == ADMIN )
      {
//         message_die(GENERAL_ERROR, "Couldn't insert new referer", "", __LINE__, __FILE__, $sql);
      }
   }
}


AFTER ADD:
Code:
die("This is step 5.");


UPLOAD and TEST.

If you can see "This is step 1.", edit collector.php and remove:
Code:
die("This is step 1.");


UPLOAD and TEST.

If you can see "This is step 2.", edit collector.php and remove:
Code:
die("This is step 2.");


UPLOAD and TEST.

...and so on...

Idea is to detect where the code hangs.

If anything works... odd. Check if all scripts have been uploaded as text, check file permissions, etc.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Apr 09, 2005 1:14 am    Post subject: Re: site counter installation problems - help! Reply with quote

cryptoknight wrote:
if I include the counter.php in my page_header.php the entire site will not display.


Yep! ...it is not the counter.php but the collector.php you should include in page_header.php.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Mon Apr 11, 2005 3:30 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Ignore what I type... look at the code I quoted... I'm using collector... it's the counter portion of the module that doesn't work. heh 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Mon Apr 11, 2005 3:41 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Ok made it through all the die's... still no page display.

Here's the bottom of my page_header.php file
Code:

$template->assign_vars(array(
   'META' => $meta_str)
);
);
$template->pparse('overall_header');
include_once( $mx_root_path . 'modules/mx_sitestats/collector.' . $phpEx
?>


If it's like this... the page never displays.

If I move it so it's like this
Code:

$template->assign_vars(array(
   'META' => $meta_str)
);
);
include_once( $mx_root_path . 'modules/mx_sitestats/collector.' . $phpEx
$template->pparse('overall_header');
?>


Then I get
Quote:

Warning: Cannot use a scalar value as an array in /home/cryptok/public_html/index.php on line 93

Warning: Cannot use a scalar value as an array in /home/cryptok/public_html/index.php on line 121


but the rest of the portal actually displays.
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Mon Apr 11, 2005 3:43 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Well, we have a problem 'cause this is very difficult to debug remotely.

Could you please try the step by step procedure posted above?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Mon Apr 11, 2005 3:46 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Ah... it seems a simple copy/paste problem. Hopefully...

Code:
$template->assign_vars(array(
   'META' => $meta_str)
);
$template->pparse('overall_header');
include_once( $mx_root_path . 'modules/mx_sitestats/collector.' . $phpEx);
?>


See the difference?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Mon Apr 11, 2005 6:18 pm    Post subject: Re: site counter installation problems - help! Reply with quote

Markus,

I did stick in the debugging code. Each step was successful (in that I reached it and received the die message). When I remove all of the die commands (i.e. resetting it back to normal), then all I get displayed is the header itself, the page contents never display.

Thinking the $template->pparse('overall_header'); coming prior to the include statement might be causing this problem. I then moved the include call to prior to the $template->pparse('overall_header'); command, so that it looked like I referenced it above.

At that point, instead of not displaying the full portal page, I get the portal page with the error messages listed above.
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Mon Apr 11, 2005 6:23 pm    Post subject: Re: site counter installation problems - help! Reply with quote

I see what you were pointing at... so I went back and checked the code.

If I use the following code, I get the following error
Code:

$template->assign_vars(array(
   'META' => $meta_str)
);
include_once( $mx_root_path . 'modules/mx_sitestats/collector.' . $phpEx );
$template->pparse('overall_header');
?>

error wrote:

Warning: Cannot use a scalar value as an array in /home/cryptok/public_html/index.php on line 93


If I use the code below here, the full page never displays.
Code:

$template->assign_vars(array(
   'META' => $meta_str)
);
$template->pparse('overall_header');
include_once( $mx_root_path . 'modules/mx_sitestats/collector.' . $phpEx);
?>
 
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_sitestats All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum