Welcome Guest ( Log In | Register)



 
Closed TopicStart new topic
> Php Problem > Hit Counter
AlternativeNick
post Jun 17 2006, 06:29 PM
Post #1


Super Member
*********

Group: Members
Posts: 210
Joined: 7-June 06
Member No.: 24,817



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

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


this is line 66

CODE
$file = fopen($logfile,"w+") or die("Can't open/write the log file, please CHMOD logs folder to 777 (rwx-rwx-rwx)!");
Go to the top of the page
 
+Quote Post
serverph
post Jun 17 2006, 06:51 PM
Post #2


Ancient Enigma
Group Icon

Group: [MODERATOR]
Posts: 1,788
Joined: 11-July 04
From: under the stars
Member No.: 76



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://www.trap17.com/forums/index.php?sho...=32102&hl=CHMOD

also search the forums for other related topics on chmod.
Go to the top of the page
 
+Quote Post
rvalkass
post Jun 18 2006, 07:59 AM
Post #3


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,153
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol



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:
CODE

<?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.
Go to the top of the page
 
+Quote Post
AlternativeNick
post Jun 19 2006, 07:41 AM
Post #4


Super Member
*********

Group: Members
Posts: 210
Joined: 7-June 06
Member No.: 24,817



thank you very much, that post definately helped me out alot as i had absolutely no idea what CHMOD was smile.gif anyways, its also helped me out with alot of other things now, because apparently, chmod is pretty important smile.gif i appreciate the help both of you, and yeah, i was using a php include to incorporate the data... thanks
Go to the top of the page
 
+Quote Post
serverph
post Jun 25 2006, 04:37 PM
Post #5


Ancient Enigma
Group Icon

Group: [MODERATOR]
Posts: 1,788
Joined: 11-July 04
From: under the stars
Member No.: 76



topic resolved. closed.
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Need Cheat Codes(38)
  2. Billing Problem. Plz Help(2)
  3. Problem With My Pc(2)
  4. How To Make A Counter Strike 1.6 Dedicated Server(18)
  5. Problem Concerning Credits Reduced(12)
  6. Problem With Hosting(4)
  7. Counter-strike Model Maker(12)
  8. Firefox 3 Cookies Problem(4)
  9. Your Favorite Gun In Counter Strike(65)
  10. What Is My (power) Problem?(4)
  11. Did You Face Problem Opening Pdf With Firefox?(15)
  12. Attachment Problem In Pmwiki(0)
  13. Pop-up Virus / Trojan Problem(10)
  14. Problem With The Trap17 Forum(4)
  15. Cs 1.7(11)
  1. Remote Assistance Problem(9)
  2. Counter Strike Problem(2)
  3. Laptop Keyboard Problem(8)
  4. Upload Component - Failed(6)
  5. Hosting Credits Problem? [resolved](9)
  6. Tutorial Build Your Own Cs Server 1.6 Steam(16)
  7. Dandruff Problem(29)
  8. How To Make Your Own Counter Strike Source Dedicated Server!(38)
  9. 60 Seconds Countdown That Shutdown The Pc(15)
  10. Sharing Files And Printer Between Windows Vista And Xp(9)
  11. Problem Installing Sims 2 Nightlife(26)
  12. I Have A Girl Problem Here(27)
  13. Php Unique Hit Counter(29)
  14. Problem With My Girlfriend Family, Need Suggestions For Action(2)
  15. Problem With Page Redirect(8)


 



- Lo-Fi Version Time is now: 13th October 2008 - 12:08 PM