Quick Links
Bible Search Christian Links
Online Bibles Link to Us
  Downloads Web Hosting  
  Domain Names  


PDA

View Full Version : Please Help: Hit Counter produces header error


Hala
Feb 14th 2009, 11:59 PM
I'm using the gcount on several sites most work ok but one produces a header error. I have debugged it to line 87 in pass.pl.

if ($pwd[1] eq "")
{
print "<h1>Please enter and confirm password.</h1>"; die "first use"; }


The server does not like die here. Removing die clears the header error but on running this file the first time after removing die it creates a password that is blank and a count file of dummy with zero value. Also they are created in the root directory of the site not the counter directory in cgi-bin folder.

So how can I fix this.

bdh
Feb 15th 2009, 06:19 AM
Been many years since I wrote this. I looked at the code now to get the old cells going. Here's what I can tell you:

Some webservers don't like the .cgi extension. Changing it to .pl sometimes helps. (And visa versa)

You could change
if ($pwd[1] ne $pwdconf[1])
{
print "<h2>Passwords don\'t match. No action taken.<br>Please try again.</h2>";
die ("passwords did not match");
} to if ($pwd[1] ne $pwdconf[1])
{
print "<h2>Passwords don\'t match. No action taken.<br>Please try again.</h2>";
exit;
} My guess is you have a permissions problem also. Especially on some BSD systems, you need to be very careful. What rights does the "pwd" file get created with? (Should be 644). The parent folder, should be 755.

Hala
Feb 16th 2009, 11:37 PM
The code you refered to it works, the code that fails is:

if ($pwd[1] eq "")
{
print "<h1>Please enter and confirm password.</h1>"; die "first use"; }

The server doesn't like die here. Also I worked with the permissions and I did use your suggestions but same results. I did try using both .cgi and .pl, this did not help.

bdh
Feb 17th 2009, 04:48 AM
try changing die to exit in the other place.

Hala
Feb 18th 2009, 01:38 AM
Thanks for the fast response, after my last reply I did try exit in place of die at the location I was talking about and that did remove the error.

Although it still puts the password and count files in the root of the website, but I can live with that unles you have some thoughts on this.

bdh
Feb 18th 2009, 05:34 AM
It is possible the server does not honor the ./ and ../, alhough I've not seen it before. If that is the case try creating the password file with the full path (from the server root)

SA Topsites