{"id":308,"date":"2007-09-21T23:20:44","date_gmt":"2007-09-22T04:20:44","guid":{"rendered":"http:\/\/fiveforks.com\/ted\/2007\/09\/counter\/"},"modified":"2012-01-04T19:50:37","modified_gmt":"2012-01-05T00:50:37","slug":"counter","status":"publish","type":"post","link":"https:\/\/www.fiveforks.com\/ted\/2007\/09\/counter\/","title":{"rendered":"Counter"},"content":{"rendered":"<p>When I moved the website from the old host, the old CGI Perl web counter stopped working. Because the new host supports php, I decided to try some php web counters. I found a <A HREF=\"http:\/\/www.developingwebs.net\/phpclass\/hitcounter.php\">simple one<\/A> and had to do a couple of things to make it work. First I had to add a file to my www root called .htaccess that enabled php code on html files by adding this line of text:<\/p>\n<p>Addhandler application\/x-httpd-php .html .php<\/p>\n<p>Next I had to set the CHMOD permissions for the file containing the page count to 777 or else it would read the file but be unable to increment the number and generated a bunch of error codes.<\/p>\n<p><!--more--><br \/>\nUnable to get all of that to work at first I tried CGI and Perl using <A HREF=\"http:\/\/www.scriptarchive.com\/readme\/textcounter.html\">this counter<\/A> and this <A HREF=\"http:\/\/www.htmlgoodies.com\/beyond\/cgi\/article.php\/3470131\">digital one<\/A>. I found that the correct path to Perl was &#8220;#!\/usr\/bin\/perl\/&#8221; but that somehow any scripts stored in the www folder under cgi-bin were not available. I tried changing the CHMOD permissions, but nothing seemed to work. Even if I put an index.html file in cgi-bin, I couldn&#8217;t see it from the web, so I think there is either a conflicting cgi-bin folder that I can&#8217;t see or the webhost automatically disables cgi-bin folders. Some people on ASO&#8217;s forums said that sometimes you had to get a support ticket to get the folder set up correctly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I moved the website from the old host, the old CGI Perl web counter stopped working. Because the new host supports php, I decided to try some php web counters. I found a simple one and had to do a couple of things to make it work. First I had to add a file &hellip; <a href=\"https:\/\/www.fiveforks.com\/ted\/2007\/09\/counter\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Counter&#8221;<\/span><\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-308","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/comments?post=308"}],"version-history":[{"count":1,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/308\/revisions"}],"predecessor-version":[{"id":1003,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/308\/revisions\/1003"}],"wp:attachment":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/media?parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/categories?post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/tags?post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}