Log in

View Full Version : Problem with cgi script



Jim Weinberg
05-12-2018, 05:58 PM
Hello.

First, I'm not sure this is the right forum for this post, I just didn't know where else to put it.

Recently, the company which provided our hosting service was bought out and our files transferred to the new servers. Prior to the transfer, we had a cgi script which displayed a page-level hit counters. Following the transfer, the script no longer worked.

I've attached a copy of the cgi file. The only change I made was to the root home address in line 21.

I had a similar problem with a PHP file until the root home address was changed. I used the same address in this routine, but it still doesn't work. It's like it can't find it's digits and data folders (the script also created a file for each page with the count for that page).

I've talked with the new company's support people and they say it's a coding problem.

The way this routine was normally invoked is:


<img src="http://www.ohiobuttons.org/cgi-bin/BSCounter/bsimgcount.cgi?file=ShowScenes&style=plain_b" border="1" height="24" width="40" align="top">

The digits and style folders are located in the cp/images/digits/ folder and the data folder is located in the cgi-bin/BSCounter/ folder.

I'm not familiar with Perl/cgi, so I'm hoping that someone who is can help me out.

Thanks,
Jim

styxlawyer
05-12-2018, 07:45 PM
Sorry, I can't help with the CGI script bit I have used this PHP counter (https://www.phpjunkyard.com/php-graphical-hit-counter.php) for many years and it works perfectly.

Jim Weinberg
05-13-2018, 02:17 PM
Hi styxlawyer.

Thanks for the quick reply. I looked at the PHP counter, but it has one problem. I don't want the page count to appear on some of the pages, and that doesn't seem to be an option. Have you found a way to hide the count if necessary?

Thanks again.
Jim

styxlawyer
05-13-2018, 07:07 PM
I haven't tried this, but you could surround the call to the php file with the following:



<div style="display:none;">
.
.
</div>

Jim Weinberg
05-14-2018, 05:10 PM
Hi Styxlawyer.

Works fine. Should have thought of that myself. Many thanks.

I'd still like to know why the cgi script doesn't work on the new servers, if there's any cgi gurus out there.

Best regards,
Jim

Boss246
06-11-2018, 09:23 PM
Are you sure about it?