Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help

Status
Not open for further replies.

yoramdar

IS-IT--Management
Jan 8, 2004
15
US
Hi mate,

I am trying to install a hit counter on the bottom of one of my html pages
Surfing the Internet I found many free perl scripts, but none of them seems to work

All of these perl scripts suggest that in order to run the script I need to use the following line in the html page.
<img scr=”
As I said none of the installed scripts is working. I suspect that something should be defined in the apache server.

Mind you, I run Apache 2.0 and all the perl scripts work locally

Thank you.
 
Thank you siberian,

But it seems that this is not the case.
The script is located in the CGI directory. other scripts are working well. I start to think that I should add a line to the scripts as follow:

print "Content-type: image/x-xbitmap\n\n";

this might solve the problem.

Thank you very much
 
Yes, of course, you must display the proper headers to the web-browser. Thats a scripting issue, not an apache configuration issue as you had specified in your original email. I had assumed that the script was functioning properly.

Good luck!
 
No I just had a typo now, but in the source it is written correctly
 
What is in your apache error log?

This is a bit difficult, I feel like I have to pull information out of you to help you.

Its best when posting questions to give us a link to the page, error log output and the script source. If you can't do that then the script source and error log output are the minimum for us to effectively assist.

Tx
 
Thank you very much sometimes one need help from outsite to find his errors. I solved the problem.


 
Can you post the resolution of the problem so that future solution seekers can have something to reference?

Thanks! congratulations on resolving the issue.
 
Of course,
The solution is that “Content-type:” line should be printed before printing any image something like this:

print "Content-type: image/gif\n\n";
print `cat digits/0.gif`` ;

in the first line there is declaration of the content-type, while on the second line you print the image.
In this case it is the digit zero retrieved from a file. In this case the name of the file is 0.gif located under digits folder.
Mind you that cat digits\0.gif is a command so you must enclose it in a special apostrophe causing it to run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top