<!--#include virtual="/cgi-bin/my.cgi? directive stopped working.

Status
Not open for further replies.

calloc

Member
Messages
30
Reaction score
0
Points
6
Hello everyone,
could someone please explain to me why my <!--#include virtual="/cgi-bin/my.cgi? directive stopped working all of a sudden in all of my .html files (pages) after it has been working perfectly fine for a while.
About a year ago, when I opened this account, I have used the counters service provided by this site. After the servers migrated once to a new hardware all of my counters have disappeared. OK. Fine. I have rolled my own counters since - I wrote my own CGI script, created my own directories, recorded the visits in my own files by including the above directory in all the relevant .html pages and it worked perfectly fine.
Now, I log in today into my account and what do I see? The error that says "[an error occurred while processing this directive]".
Is someone playing a prank on me or is there a technical reason why every time I try to count the visitors to my site (of which there are not that many really, I mean who wants to read about math and computer science?) this place takes this opportunity away from me? And more importantly - how can I fix this and have my functionality back?
Thank you very much.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
We don't support CGI scripts on free hosting--if they were working, they shouldn't have been.

I would recommend using PHP to do this--as we will always support PHP.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
PHP is already enabled. You just need to have a .php file, with PHP code inside.
 

calloc

Member
Messages
30
Reaction score
0
Points
6
I see, so something like
<?php
include ("myhitcounter.php");
?>
inside my .html files should work?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
You'll need the files to be .php.

You can use mod_rewrite to make it look like they're .html files (for the purposes of maintaining links you've had for a while, etc)
 

calloc

Member
Messages
30
Reaction score
0
Points
6
Oh, I see now. So my .html files have to really be .php files for PHP on this server to work. But because some people may have bookmarked my pages as .html files I have to make .php files look like .html files so that the bookmarks keep working for them. Oh, my.

Anyway, thank you very much for your time and your help. I appreciate it.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Making a hit counter using PHP and MySQL will help to do exactly what you want (pretty simple), who needs CGI scripts for things that you can do with PHP and maybe MySQL? ;)
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Making a hit counter using PHP and MySQL will help to do exactly what you want (pretty simple), who needs CGI scripts for things that you can do with PHP and maybe MySQL? ;)
making a hit counter - is not a issue in this thread
 
Status
Not open for further replies.
Top