PDA

View Full Version : Help with script!


Goldleader
02-25-2003, 08:00 PM
I'm new to the pearl/cgi game and in need of some help. I tried to install the webadverts banner script located at http://awsd.com/scripts/webadverts/ but ran into errors. Help!

For anyone that uses this script, where did you install it...you have to install it in the cgi-bin or scgi-bin directories right? If possible, I would love to know what you entered for the ads.pl script...I am certain I entered and cmod'd everything correctly...but still, it just doesn't seem to want to work. Also, when you're all done entering and configuring everything, what URL are you supposed to direct your browser to for changes, new banners...etc?

Thanks,

David

don5408
02-26-2003, 08:18 AM
"I'm new to the pearl/cgi game and in need of some help."

Hi, David. First of all not to nitpick (no points are deducted for typos/misspellings in forum posts, however they CAN be a problem in Perl scripts) but just for the record note that there is no "a" in Perl. ;-)

"I tried to install the webadverts banner script located at http://awsd.com/scripts/webadverts/ but ran into errors. Help!"

What can be helpful in such cases is to post the exact text of the error, this will often yield clues as to the nature of the problem. Immediately after executing your script if you go to "Error Logs" in the HR Control Panel you should find the error referenced there where it can be easily copied and pasted.

"For anyone that uses this script, where did you install it...you have to install it in the cgi-bin or scgi-bin directories right?"

HostRocket doesn't necessarily require that Perl scripts be stored in the cgi-bin directory as is the case with some hosts, you should be able to run such scripts from any location.

"If possible, I would love to know what you entered for the ads.pl script"

Well I'm not using the script in question however assuming that (a) you have placed all of the files for this script in your cgi-bin folder, (b) that the data directory you created and chmod 777 is a folder called "ads" directly under public_html, and (c) that your domain name is gamebreaker.com and that your HR userid is "gamebre" these would be the appropriate values:

-- ads.pl --

$ADVsettings_path = "/home/gamebre/public_html/cgi-bin/ads_settings.pl";
$ADVdisplay_cgi = "http://www.gamebreaker.com/cgi-bin/ads.pl";

-- ads_admin.pl --

$ADVsettings_path = "/home/gamebre/public_html/cgi-bin/ads_settings.pl";
$ADVtext_path = "/home/gamebre/public_html/cgi-bin/ads_text.pl";
$ADVrebuild_path = "/home/gamebre/public_html/cgi-bin/ads_rebuild.pl";

-- ads_settings.pl --

$ADVdisplay_path = "/home/gamebre/public_html/cgi-bin/ads_display.pl";
$ADVadverts_dir = "/home/gamebre/public_html/ads";
$admin_cgi = "http://www.gamebreaker.com/cgi-bin/ads_admin.pl";
$nonssi_cgi = "http://www.gamebreaker.com/cgi-bin/ads.pl";

Things to Note:

- the first line (aka the 'shebang line') in ads.pl and ads_admin.pl should be #!/usr/bin/perl
- Both ads.pl and ads_admin.pl should be chmod 755
- The /ads directory should be chmod 777

"Also, when you're all done entering and configuring everything, what URL are you supposed to direct your browser to for changes, new banners...etc?"

Try http://www.gamebreaker.com/cgi-bin/ads_admin.pl?admin

If you have any further problems post the specific errors as per "Error Logs" in the HR Control Panel.

Best o' luck!
Don

Goldleader
02-27-2003, 06:52 PM
Geez, thanks Don! You really went above and beyond the call of duty on this one.

After using your supplied info, I was able to get the script up and running at last.

Most of the info I previously entered was correct, but I mis-understood what they wanted for some of the server addresses. I ended up pointing things to the wrong directories, because I thought I put the data files in a different location.

Thank you for all your help!

David

don5408
02-27-2003, 07:51 PM
"After using your supplied info, I was able to get the script up and running at last...Thank you for all your help!"

Outstanding, happy to hear that everything worked out!
(and you're welcome)

Enjoy!
Don