PHPee.com PHP development forum
Stats dont work with php/js

 
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger Support
View previous topic :: View next topic  
Author Message
EvM-Mike



Joined: 17 Aug 2004
Posts: 9

PostPosted: Tue Aug 17, 2004 2:55 am    Post subject: Stats dont work with php/js Reply with quote
I just loaded PPHlogger and it is pretty damn amazing. However I cannot seem to get the combined PHP/JS implementation working. I read through the docs a few times and looked through this forum.

If I enter the JS below, i get good logging:






If I enter just the PHP I do not:



$st = 'phpjs';
// $showme = 'y';include(PPHL_SCRIPT_PATH."pphlogger.php");?>

When using the combined approach I just need to add the PHP, right?

Thanks....Mike
_________________
http://www.evolutionmsport.com
A Mustang Performance Company
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 872
Location: London, UK

PostPosted: Tue Aug 17, 2004 12:20 pm    Post subject: Reply with quote
That is correct yes.
What goes wrong?

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
EvM-Mike



Joined: 17 Aug 2004
Posts: 9

PostPosted: Tue Aug 17, 2004 3:29 pm    Post subject: Reply with quote
If I do not have the JS text in the page I get no logging.

So, if I just add the php piece in the body nothing gets logged.

Do I need to leave the JS stuff on the pages?

Also, I have a dynamic site that has only two pages that are dynamically generated. Is there any way to get granularity on what pages are called? Or do I need to do some URL rewriting?

Thanks...Mike
_________________
http://www.evolutionmsport.com
A Mustang Performance Company
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 872
Location: London, UK

PostPosted: Tue Aug 17, 2004 5:35 pm    Post subject: Reply with quote
The PHP version can only be used if the main part of the scripts are located on the same server as the site that you are trying to log.
Is this the case?

You can setup the query handling for the script to take certain parameters and classify between pages. This is all detailed in the manual:

http://pphlogger.phpee.com/doc.html#urlhandling

Smile

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
EvM-Mike



Joined: 17 Aug 2004
Posts: 9

PostPosted: Tue Aug 17, 2004 8:31 pm    Post subject: Reply with quote
Yeah they are the same machine.

That URL handling thing works great.....

Thanks...Mike
_________________
http://www.evolutionmsport.com
A Mustang Performance Company
Back to top
View user's profile Send private message
EvM-Mike



Joined: 17 Aug 2004
Posts: 9

PostPosted: Thu Aug 19, 2004 7:43 pm    Post subject: Reply with quote
I was wondering if I should try to change the absolute path in the below code:



$st = 'phpjs';
// $showme = 'y';include(PPHL_SCRIPT_PATH."pphlogger.php");?>

To a relative path:



$st = 'phpjs';
// $showme = 'y';include(PPHL_SCRIPT_PATH."pphlogger.php");?>


Could this possibly work???

Thanks....Mike
_________________
http://www.evolutionmsport.com
A Mustang Performance Company
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 872
Location: London, UK

PostPosted: Thu Aug 19, 2004 8:59 pm    Post subject: Reply with quote
I have no idea. Why don't you try it and see Smile

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
EvM-Mike



Joined: 17 Aug 2004
Posts: 9

PostPosted: Fri Aug 20, 2004 1:39 am    Post subject: Reply with quote
OK, I found my problem and got a new one. Here is what I had



$st = 'phpjs';
// $showme = 'y';include(PPHL_SCRIPT_PATH."pphlogger.php");?>

Here is what it should have been:



$id = "EvM-Admin";
define('PPHL_SCRIPT_PATH', 'evmStats/'); // relative (e.g. "pphlogger/") or absolute path to your PP-directory
$st = 'phpjs';
// $showme = 'y';
include(PPHL_SCRIPT_PATH."pphlogger.php");
?>

What was happening is that since i didn't have it formatted properly, the last include was commented out.

But now that I got it working I cannot see the pages people are on anymore. Since I have a dynamic site I am only seeing the general page. I lost all the granularity and I have the short query set to *.

Should I be able to retain this granularity or do I need to set it somewhere else.

Thanks....Mike
_________________
http://www.evolutionmsport.com
A Mustang Performance Company
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 872
Location: London, UK

PostPosted: Fri Aug 20, 2004 10:16 am    Post subject: Reply with quote
This is something that i've noticed myself. I log my main website using the PHP include option and like you, i have some dynamic pages.
I have been unable to get any of the query strings to be logged as a seperate page, which is most annoying.

I've had a look through the code, but can't for the life of me find where things may be going wrong.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
EvM-Mike



Joined: 17 Aug 2004
Posts: 9

PostPosted: Fri Aug 20, 2004 1:20 pm    Post subject: Reply with quote
Quote:
I have been unable to get any of the query strings to be logged as a seperate page, which is most annoying.


Well at least I can have some one corroborate my story... Smile

I guess after all is said and done I will stick with the JS implementation until someone figure it out.

Thanks again....Mike
_________________
http://www.evolutionmsport.com
A Mustang Performance Company
Back to top
View user's profile Send private message
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger Support All times are GMT + 1 Hour
Page 1 of 1

 
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


Powered by phpBB 2.0.11
Theme design based on Team 101 Designs, modified by Philip Iezzi