View Full Version : Perl SCript - First attempt
Pvasoldier
12-09-03, 04:01 PM
HI,
I found a script and have tried to upload it. Ive never used perl before. And im trying to get a news system up (http://www.awtrey.com/support/scripts/news.php)
www.lawsofshotgun.com/cgi-bin/news
The script first page works but i can get anything else to work? WHat have a i done wrong?
Ive looked at the instructions on the webstie but i cant get it to work. Ive found .htpasswrds but i dont ahve a .htgroup... Ive read through a few posts and help sites.. but got nothing.
CAn someone point me in the right direction?
It looks like you have the path(s) set wrong in the config/script. If you look here: http://www.lawsofshotgun.com/cgi-bin/news/news.pl?archive, it will work . But your links have: http://www.lawsofshotgun.com//cgi-bin/news.pl?archive.
Check the config for something line /cgi-bin and make sire it's /cgi-bin/news. If you still have troubles, post the config portion of your script (less any password type stuff). You also have an extra / somewhere. maybe /cgi-bin/news needs to be cgi-bin/news?
~Charlie
Pvasoldier
12-10-03, 05:37 AM
Ive changed what you suggested and managed to get the script working to a degree. Go to www.lawsofshotgun.com/cgi-bin/news . I cant post anything and i havent been able to set up usernames and password as im not sure how.
The setup for the script looks like this.
#Program Vars
$webmaster = "Laws of Shotgun";
$webmastername = "LOS boys";
$webmasterdomain = "www.lawsofshotgun.com";
$basedir = "/home/lawsofsh/public_html/";
$baseurl = "http://www.lawsofshotgun.com/";
$cgidir = "$baseurl/cgi-bin/news";
$newsdir = "$basedir/news";
$htaccess_dir = "/home/lawsofsh/public_html/cgi-bin";
$htpasswd_file = ".htpasswd";
$htgroup_file = ".htmltemplates";
$timezone = "GMT";
$num_of_days = "1";
//Im not sure what the 3 lines below mean?
$fpfile = ""; #Leave blank if you don't want this feature.
if ($fpfile) { $fpnews = "$basedir/$fpfile"; }
if ($fpfile) { $fpurl = "$baseurl/$fpfile"; }
$cgifile = "news.pl";
$cgiurl = "$cgidir/$cgifile";
$lockfile = "lock.lok";
$backfile = "backup.news";
Thanks so much for your help so far!
It looks like the script auths from .htpasswd (like you already mentioned). There is a tutorial on the site that will walk you through setting it up: http://www.awtrey.com/support/webhost/access.php.
That should get you going.
~Charlie
Pvasoldier
12-10-03, 02:01 PM
Thanks ill see how i get on .. i may be back! he he
mk
Pvasoldier
12-10-03, 06:29 PM
It looks like the script auths from .htpasswd (like you already mentioned). There is a tutorial on the site that will walk you through setting it up: http://www.awtrey.com/support/webhost/access.php.
That should get you going.
~Charlie
Ok so I can find .htgroup on my server? and so cant fix the script how do i sort out this problem? Can i make the .htgroup file and will it serve the same purpose?
help..
Go ahead and make your own .htgroup/.htpasswd files. I looked over the code that checks the group file and I wonder if it really works so you might still have troubles.
.htgroup:
News: Pvasoldier
Change Pvasoldier to what ever user name you want to use to add news.
Use his handy dandy .htpasswd password generator at the bottom of link I posted above to create the line for your .htpassword file.
Stuff both files in the cgi-bin/news dir. Then all you need to do is fix up the config vars:
#Program Vars
$webmaster = "Laws of Shotgun";
$webmastername = "LOS boys";
$webmasterdomain = "www.lawsofshotgun.com";
$basedir = "/home/lawsofsh/public_html/";
$baseurl = "http://www.lawsofshotgun.com/";
$cgidir = "$baseurl/cgi-bin/news";
$newsdir = "$basedir/news";
$htaccess_dir = $cgidir;
$htpasswd_file = ".htpasswd";
$htgroup_file = ".htgroup";
$timezone = "GMT";
$num_of_days = "1";
~Charlie
Pvasoldier
12-11-03, 10:14 AM
OK i made the changes just a few quick questions.
DO i need a .htacess file in the cgi-bin too?
When i made a password with the ever so handy script on the site i got this:
Your DES encrypted .htpasswd entry is:
Your MD5 encrypted .htpasswd entry is:
which do i use? and is this the password i have to type in when the script works?
ok thats it fr now thanks so much so far! hehe
OK i made the changes just a few quick questions.
DO i need a .htacess file in the cgi-bin too?
It doesn't look like it. It should just be authing off of the group and password files.
When i made a password with the ever so handy script on the site i got this:
Your DES encrypted .htpasswd entry is:
Your MD5 encrypted .htpasswd entry is:
which do i use?
Try MD5 first. If that doesn't work, it must be DES :)
and is this the password i have to type in when the script works?
Yep, thats the one.
ok thats it fr now thanks so much so far! hehe
No worries.
~Charlie
Pvasoldier
12-11-03, 02:29 PM
keep getting this
There was an unexpected file error.
Please contact webmaster.
Return to the News Page
i tried all the passwords to no avail... i lose...
To make things clearer.
www.lawsofshotgun.com/cgi-bin/news
I only changed what you said in the script (account details)
my cgi-bin contains:
.htgroup ---- News:Losboys
.htpasswrds----Losboys:$1$TV2ULnx7$cYOuvdQDorA4cLUwZF8bb1 ---MD5
news --- script with my account details.
what am i doing wrong? *cries*
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.