Jump to content
xisto Community
Sign in to follow this  
AlternativeNick

Php Problem > Hit Counter

Recommended Posts

im attempting to use a php hit counter, and i have everything uploaded and configured as the directions say, however it doesnt show up on the sitei have it on, and when i go directly to the page (counter.php) i get this error

Warning: fopen(logs/.log): failed to open stream: Permission denied in /home/altscr/public_html/counter.php on line 66

this is line 66

$file = fopen($logfile,"w+") or die("Can't open/write the log file, please CHMOD logs folder to 777 (rwx-rwx-rwx)!");

Share this post


Link to post
Share on other sites

did your configuration include CHMOD of logs folder as directed? that is the error you get since your script is trying to write a log update (an increment in your hit count) BUT your access permission configuration does not allow it. you need to set CHMOD to 777 as required.

check out this thread for CHMOD details:
http://forums.xisto.com/index.php?sho=32102&hl=CHMOD

also search the forums for other related topics on chmod.

Share this post


Link to post
Share on other sites

To have it show up on the site you will need to actually include the hit counter file on the page. Wherever you want the hit counter to appear you will need to add this line:

<?php include('counter.php'); ?>
And remember then to save your web pages with the .PHP extension rather than .HTML or something, if you are not already doing so.

Share this post


Link to post
Share on other sites

thank you very much, that post definately helped me out alot as i had absolutely no idea what CHMOD was :) anyways, its also helped me out with alot of other things now, because apparently, chmod is pretty important :( i appreciate the help both of you, and yeah, i was using a php include to incorporate the data... thanks

Share this post


Link to post
Share on other sites

topic resolved. closed.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.