Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Perl
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Perl section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 9th, 2006, 12:40 AM
Registered User
Join Date: Apr 2006
Location: Payyanur, Kerala, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to arunmohanmp
Default Problem with CGI Counter

Hi All,

I got a cgi script http://nss.nitc.ac.in/cgi-bin/counter.cgi
When i run this link directly it works. But if i try in one of my html pages (http://nss.nitc.ac.in/html/title.shtml or http://nss.nitc.ac.in/html/title.html) it is not showing the Counter. How can i show the counter in the webpage?

The CGI code am using is

# txcounter cgi
# © 2000 Jackie Hamilton - http://www.cgi101.com/
# this cgi increments a counter in a file, then prints out a line like
# "You are visitor number XXX."
# HTML code to call this:
# this requires server-side includes. You may need to rename your HTML
# file to a .shtml extension to make it work.
# note: be sure that the counter file is set WRITABLE by the httpd
# daemon owner or group. in Unix you'll need to 'chmod 775 countfile'
# or possibly 'chmod 777 countfile'.

$countfile = "/home/nss/web/html/counter";

$count = `cat $countfile`;
$count = $count + 1;
print INF "$count\n";

print "Content-type:text/html\n\n";
print "Visitor: $count.<p>\n";

# the end.

Please suggest a solution...

Thanks and Regards,
Arun Mohan M P
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Counter PHP problem its_jon Beginning PHP 5 June 23rd, 2006 07:08 AM
help! on CGI Error heerajee Pro PHP 0 February 2nd, 2006 05:17 AM
HELP: Perl CGI + Java marina Perl 1 January 23rd, 2006 07:41 AM
CGI Timeout EricS Beginning PHP 3 January 24th, 2005 01:50 AM
How to fix "CGI timeout" baoshenyi Pro PHP 1 October 1st, 2003 12:46 AM

All times are GMT -4. The time now is 08:11 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.