PDA

View Full Version : I need help :(


kickster
06-26-1999, 01:08 AM
I have been working 10 hours on a rotory banner script
It just doesnt work!
Can some one help me

Here is my admin script (part that need editing)

[nbsp][nbsp][nbsp][nbsp] #########################################################
[nbsp][nbsp][nbsp][nbsp] $adverts_dir = "/big/dom/xweb_toolz/www/ads";
[nbsp][nbsp][nbsp][nbsp] $admin_cgi = "http://www.web-toolz.com/cgi-bin/ads_admin.pl";
[nbsp][nbsp][nbsp][nbsp] $nonssi_cgi = "http://www.web-toolz.com/cgi-bin/ads.pl";

[nbsp][nbsp][nbsp][nbsp] # %nonssi_cgis = (
[nbsp][nbsp][nbsp][nbsp] # 'Zone1','http://foo.com/ads/ads_1.pl',
[nbsp][nbsp][nbsp][nbsp] # 'Zone2','http://foo.com/ads/ads_2.pl',
[nbsp][nbsp][nbsp][nbsp] # 'Zone3','http://foo.com/ads/ads_3.pl',
[nbsp][nbsp][nbsp][nbsp] # );

[nbsp][nbsp][nbsp][nbsp] $UseLocking = 1;
[nbsp][nbsp][nbsp][nbsp] $LogIP = 1;

[nbsp][nbsp][nbsp][nbsp] $AdminDisplaySetup = 0;

[nbsp][nbsp][nbsp][nbsp] $AllowUserEdit = 0;
[nbsp][nbsp][nbsp][nbsp] $RequireAdminApproval = 1;
[nbsp][nbsp][nbsp][nbsp] $DefaultDisplayRatio = 2;
[nbsp][nbsp][nbsp][nbsp] $DefaultWeight = 1;

[nbsp][nbsp][nbsp][nbsp] $DefaultLinkAttribute = "TARGET=_blank";

[nbsp][nbsp][nbsp][nbsp] $bodyspec = "BGCOLOR=\"#ccffff\" TEXT=\"#000000\"";
[nbsp][nbsp][nbsp][nbsp] $header_file = "";
[nbsp][nbsp][nbsp][nbsp] $footer_file = "";

[nbsp][nbsp][nbsp][nbsp] $ExchangeName = "soccer banner exchange";
[nbsp][nbsp][nbsp][nbsp] $ExchangeURL = "http://www.web-toolz.com";
[nbsp][nbsp][nbsp][nbsp] $ExchangeLogo = "";
[nbsp][nbsp][nbsp][nbsp] $ExchangeLogoWidth = 40;
[nbsp][nbsp][nbsp][nbsp] $ExchangeLogoHeight = 40;
[nbsp][nbsp][nbsp][nbsp] $ExchangeBannerWidth = 400;
[nbsp][nbsp][nbsp][nbsp] $ExchangeBannerHeight = 40;

[nbsp][nbsp][nbsp][nbsp] $email_address = "ibe\@web-toolz.com";
[nbsp][nbsp][nbsp][nbsp] $mailprog = '/usr/lib/sendmail';
[nbsp][nbsp][nbsp][nbsp] $WEB_SERVER = "";
[nbsp][nbsp][nbsp][nbsp] $SMTP_SERVER = "";

[nbsp][nbsp][nbsp][nbsp] # use Socket;
[nbsp][nbsp][nbsp][nbsp] ###############################################################
[nbsp][nbsp][nbsp][nbsp] This is my SERVER CGI LOGs

[nbsp][nbsp][nbsp][nbsp] %% [Sat Jun 26 00:34:04 1999] GET /cgi-bin/ads_admin.pl?admin HTTP/1.0
[nbsp][nbsp][nbsp][nbsp] %% 500 /big/dom/xweb_toolz/cgi-bin/ads_admin.pl
[nbsp][nbsp][nbsp][nbsp] %request
[nbsp][nbsp][nbsp][nbsp] Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
[nbsp][nbsp][nbsp][nbsp] Accept-Charset: iso-8859-1,*,utf-8
[nbsp][nbsp][nbsp][nbsp] Accept-Encoding: gzip
[nbsp][nbsp][nbsp][nbsp] Accept-Language: en
[nbsp][nbsp][nbsp][nbsp] Connection: Keep-Alive
[nbsp][nbsp][nbsp][nbsp] Host: www.web-toolz.com (http://www.web-toolz.com)
[nbsp][nbsp][nbsp][nbsp] User-Agent: Mozilla/4.5 [en] (Win95; I)
[nbsp][nbsp][nbsp][nbsp] %response
[nbsp][nbsp][nbsp][nbsp] %% [Sat Jun 26 00:35:11 1999] GET /cgi-bin/ads_admin.pl HTTP/1.0
[nbsp][nbsp][nbsp][nbsp] %% 500 /big/dom/xweb_toolz/cgi-bin/ads_admin.pl
[nbsp][nbsp][nbsp][nbsp] %request
[nbsp][nbsp][nbsp][nbsp] Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
[nbsp][nbsp][nbsp][nbsp] Accept-Charset: iso-8859-1,*,utf-8
[nbsp][nbsp][nbsp][nbsp] Accept-Encoding: gzip
[nbsp][nbsp][nbsp][nbsp] Accept-Language: en
[nbsp][nbsp][nbsp][nbsp] Connection: Keep-Alive
[nbsp][nbsp][nbsp][nbsp] Host: www.web-toolz.com (http://www.web-toolz.com)
[nbsp][nbsp][nbsp][nbsp] User-Agent: Mozilla/4.5 [en] (Win95; I)
[nbsp][nbsp][nbsp][nbsp] %response

jenili
06-26-1999, 02:21 AM
Hmm, there's not much to go on in the error log excerpt. What output or error message do you get when you run it from the command prompt (as opposed to via the Web)? One problem I see is that you haven't escaped the # signs in some of the strings you've edited; e.g.,
[nbsp][nbsp] $bodyspec = "BGCOLOR=\"#ccffff\" TEXT=\"#000000\"";
should read
[nbsp][nbsp] $bodyspec = "BGCOLOR=\"\#ccffff\" TEXT=\"\#000000\"";

That could be causing a syntax error, which would keep the script from running. Running it from the command prompt would help you track those down. Hope this helps.
------------------

jeni

Charles Capps
06-26-1999, 03:31 AM
When running from the command line as suggested, try the -c switch to catch any syntax errors. Once those are eliminated, if it's still giving you errors then it's a procedure, not a syntax problem.
------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
http://solareclipse.net/

kickster
06-26-1999, 08:32 AM
What do you mean by command line?
What program should I use.
As you see I am still amateur when it comes to CGI
Scripts :)

Justin
06-26-1999, 09:47 AM
You don't have to escape #'s :)[nbsp][nbsp]In fact, you don't need to quote them either.

$bodyspec = "bgcolor=#ccffff text=#000000";

That's all that is needed.

To run a script from the command line, telnet in, change to the directory the script is in (cd /big/dom/xdomain/cgi-bin, for example) and type:

perl -c script.cgi

This will syntax check the script for you...

Hope this helps.
------------------
Justin Nelson
FutureQuest Support

Rich
06-26-1999, 10:47 AM
Kick:

Be sure you have chmod the ads_admin.pl script to 755 so that it is set to run as a script.

Also, what version of WebAdverts are you running? I recall that the last time I installed this script that the ads_admin.pl script would not run without error as distributed by the author.

P.S. After you have installed/tested the script, I would recommend that you set the $LogIP=0. The IP logging is a real drain and does not provide any useful functionality over what is provided in the built-in stats.

Rich

kickster
06-26-1999, 10:59 AM
rich
You are a life saver :)
All I needed to do was to change the permission to 755.
I thought if I assign them all 777 i wouldn't have any problems. I guess I was wrong.
So far the Admin script works. I will let you guys know if I have any farther problems.[nbsp]

tedloh
06-27-1999, 01:13 PM
aha... you're here as well.[nbsp][nbsp]I have limited success with it, but it isn't that bad once you start testing (keep in mind I know little about Unix, Perl or CGIs, but I have programming experience).

Firstly, the latest version (2.02) was released a day or so ago... and some problems appear to have been resolved but still no guarantee that clicking on the banner will take you to the right URL.

Secondly, there's a debug-type script by WebAssist at http://awsd.com/scripts/webadverts/index.shtml[nbsp][nbsp]that might help.

Lastly, you have to remember to upload your files in ASCII mode, not binary, otherwise they get corrupted.

Let me know if you progress.

Regards,

Ted

kickster
06-27-1999, 01:20 PM
well, every thing is working fine except for the ratio.
I set it to 2. but the actual stats show 41-1 or 18:1!!!!
I dont know whats wrong. well I will keep working until
its fixed. then I got to pay the guy 50 $$.
If it works it is worth it.