Welcome to Geeklog, Anonymous Saturday, September 14 2024 @ 06:43 pm EDT

Geeklog Forums

Visitor Stats - Page/Title/URL column content


Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Hi just wondering whether everything is ok with my Visitor Stats (v. 1.2) because all I get in Page/Title/URL column is shared-cgi/php4
Geeklog Polish Support Team
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Doesn\'t look good to me.

TomW
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
What do you suggest Tom?
Geeklog Polish Support Team
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
I assume that you are talking about the page created by page.php.

That column uses php's parse_url routine to get the host name from the $_CONF['site_url'] variable. And then it uses the $page column from the gl_userstats database to figure out what page it comes from.

If you have a site that is located in a sub-directory of public_html then it will confuse this parsing routine. As a temporary fix you can alter the code in page.php to include the subdirectory. Thus starting on about line 212 you will find a compare like $A['page'] == 'article.php'. Change the 'article.php' to include the subdirectory. If you subdirectory was 'subdir' you would change it to read 'subdir/article.php'. If unsure look in your gl_userstats table at the page column.

Clear as mud? The version I am working on now will have a config variable to fix this.

TomW
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Did no good. Or I messed up something. I have my GL files in a dir called web. Inside there is public_html (in my case called html). So it goes webhtmlarticle.php. I tried various combinations htmlarticle.php, webarticle.php and webhtmlarticle.php. Same thing. Have I misunderstood your suggestions?
Geeklog Polish Support Team
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Robin, The easiest way to find out what you should use is to look at you database and see what the page column of the gl_userstats contains. If it is just page names like article.php, then you should require no changes, but if it contains web/html/article.php then that is what you should use. TomW
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Right. After careful inspection of gl_userstats there is shared-cgi/php4 in page column. Question
Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
A small update.
When entering a particular month the Next page link displays
Text Formatted Code
http://www.geeklog.now.pl/shared-cgi/php?month=Jun&year=2004&page=2
 

And then after clicking on such link I get this
Text Formatted Code
Warning: Unexpected character in input: ' ' (ASCII=12) state=1 in /home/httpd/shared-cgi/php on line 886

Parse error: parse error in /home/httpd/shared-cgi/php on line 886
 


Any insights?
Geeklog Polish Support Team
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
It just so happens I think I know what the problem is. Let me guess your site is running on a Zeus webserver, right. If so change the $SCRIPT_NAME to $PHP_SELF in the function create_url in functions.inc.

TomW
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
To be honest I have no idea as to the kind of webserver it is running on the server.
I applied the recommended change, looks like we are getting there
Now the next page link looks like this
Text Formatted Code
http://www.geeklog.now.pl/?month=Jun&year=2004&page=2
 

and as you probably would guess it gets you to the index (main) page.

Should I replace $SCRIPT_NAME with $PHP_SELF in the whole functions.inc?
Geeklog Polish Support Team
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Sounds good.

TomW
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Problem solved
Thanx a lot Tom


Geeklog Polish Support Team
 Quote

All times are EDT. The time is now 06:43 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content