Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

wtf? with all the blah blah cgi clah blah perl boards

Options
  • 28-01-2002 3:33pm
    #1
    Posts: 0 ✭✭


    Ok, so I'm workin on a new website and, instead of using ezboard or something like that, I decide I should run my own little boards of my site.

    After looking round at all the options I find http://www.yabbforum.com/ and I like the look of it.

    Now I have a problem, I have no idea whatsoever how to install it. It sez i need either perl or cgi so i look for both on the redhat box i want to run it off.

    I presume this means perl is installed : /usr/lib/perl5/5.00503/

    so i choose perl.

    Now what?

    1. is /usr/lib/perl5/5.00503/ the location of perl? If so should I replace #!C:/Perl/Bin with it?

    2. How do i find the 'location of your sendmail program'?

    3. wtf is a cgi-bin? can i just create one or is there only one per box? Basically, do i just create a cgi-bin folder inside the folder i want to install yabb to and work from ther?

    As you can see, I really dont have a clue what im doin, but I betcha I make it wrk :D

    Thanx in advance for any help :D


Comments

  • Registered Users Posts: 2,660 ✭✭✭Baz_


    1. replace the "#!c:\perl\bin" line with "#!/usr/bin/perl" usually.

    2. the location of sendmail is again usually "/usr/sbin/sendmail"

    3. The folder you have set to contain the website, usually should have a folder called cgi-bin directly under it. On my server i log in, and the folders i can see are cgi-bin and httpdocs among others, it is within the cgi-bin folder that you install the stuff.

    hope that helps


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    I installed this one before without any problems, but then I was getting hosting off the guys that wrote it :)

    You should be ok if you just follow the instructions.

    A quick checklist:

    Are you on a *nix server?

    Is Perl installed?

    Is sendmail installed?

    Have you got permission to run CGI's?


  • Registered Users Posts: 476 ✭✭Pablo


    which sendmail

    #!usr/lib/perl

    and cgi-bin is a folder name cgi-bin , which normally has the facility , set the mode , so that anyone can execute a script


  • Posts: 0 ✭✭ [Deleted User]


    Thanx for the reply d00d :D

    baz: so which one of the follwoing is the address?


    /usr/bin/perl5.00503
    /usr/bin/perl
    /usr/bin/perlbug
    /usr/bin/perlcc
    /usr/bin/perldoc

    /usr/bin/perl i guess??????


    Cool, sendamil sorted :D thanx

    Enygma:
    YES
    YES
    YES
    Er, how do i check if I have cgi permission?


    So, then i create a cgi bin folder and work from ther? And there should not necessarily be one there already?


  • Closed Accounts Posts: 3,859 ✭✭✭logic1


    Alright Gary,

    First off stick this in a text file:
    <?php phpinfo(); ?>
    

    Save it as info.php and upload it to your server. Chmod 777 if needs be and go to http://www.your-url.com/info.php

    That'll give you a bit of php info if it's installed.

    Then stick this in a new text file called perlinfo.cgi
    #!/usr/bin/perl
    
    $sendmail	=`whereis sendmail`;$plocation	=`whereis perl`;@perlloc = split(" ",$plocation);@mailloc = split(" ",$sendmail);$font = '<FONT FACE="Verdana, sans serif" SIZE=2>';&vars;print "Content-type:  text/html\n\n";print qq~<HTML><HEAD><TITLE>$program $version</TITLE></HEAD><LINK REL="stylesheet" HREF="http://www.scriptsolutions.com/images/style.css" TYPE="text/css"><body bgcolor="#FFFFFF" ALINK="#FDB900" LINK="#BF0425" VLINK="#1200FD" TOPMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0><TABLE WIDTH=100% BGCOLOR=#FDB900 CELLPADDING=2 CELLSPACING=0 BORDER=0 BACKGROUND="http://www.scriptsolutions.com/cgi-bin/bannertrak/bannertrak.cgi?aff=${program}_${version}&img=top.GIF"><TR><TH>&nbsp;<BR>&nbsp;</TD></TR></TABLE><P ALIGN=CENTER><FONT FACE="Courier New,mono" SIZE=3 COLOR="#BF0425"><B><A HREF="http://www.scriptsolutions.com/" TARGET="_blank">$dev</A><BR><FONT SIZE=6>$program $version</FONT></FONT></P></B><P><DIV ALIGN=CENTER><TABLE WIDTH=100% BGCOLOR=#FDB900 CELLPADDING=2 CELLSPACING=0 BORDER=0><TR><TH>$font<FONT SIZE=4>Server Program Paths</FONT></TD></TR></TABLE><P><TABLE BORDER=0 CELLPADDING=3 WIDTH=95%>	<TR><TD BGCOLOR="$bgcolor" WIDTH=35%>${font}<B>Perl Executable:</B></TD>		<TD WIDTH=65%>${font}$^X</TD></TR>	<TR><TD BGCOLOR="$bgcolor">${font}<B>Perl Version:</B></TD>		<TD>${font}$]</TD></TR>	<TR><TD BGCOLOR="$bgcolor">${font}<B>PERL compile version OS:</B></TD>		<TD>${font}$^O</TD></TR>	<TR><TD BGCOLOR="$bgcolor">${font}<B>GID</B>: <FONT SIZE=1>(If not blank, you are on a machine that supports membership in 		multiple groups simultaneously)</FONT></TD>		<TD>${font}$<</TD></TR>	<TR><TD VALIGN=TOP BGCOLOR="$bgcolor">${font}<B>Location of Perl:</B></TD>		<TD>${font}~;foreach $loc(@perlloc){	print "$loc<BR>\n";}		print qq~</TD></TR>	<TR><TD VALIGN=TOP BGCOLOR="$bgcolor">${font}<B>Location of Sendmail:</B></TD>		<TD>${font}~;foreach $ml(@mailloc){	print "$ml<BR>\n";}		print qq~</TD></TR>	<TR><TD VALIGN=TOP BGCOLOR="$bgcolor">${font} <B>Directory locations searched for perl executables</B></TD><TD>$font~;foreach $item(@INC){	print "$item <BR>\n";}	print qq~</TD></TR></TABLE><P><TABLE WIDTH=100% BGCOLOR=#FDB900 CELLPADDING=2 CELLSPACING=0 BORDER=0><TR><TH>$font<FONT SIZE=4>Environment Variables</FONT></TD></TR></TABLE><P><TABLE BORDER=0 CELLPADDING=3 WIDTH=95%>~;foreach $fieldname(keys %ENV){	print qq~	<TR><TD BGCOLOR="$bgcolor" WIDTH=35%><B>${font}$fieldname</B></TD>		<TD WIDTH=65%>${font}$ENV{$fieldname}</TD></TR>~;}	print qq~</TABLE><P><TABLE WIDTH=100% BGCOLOR=#FDB900 CELLPADDING=2 CELLSPACING=0 BORDER=0><TR><TH>$font<FONT SIZE=4>Installed Modules</FONT></TD></TR></TABLE><P><TABLE BORDER=0 CELLPADDING=3 WIDTH=100%>~;find(\&wanted,@INC);$modcount = 0;foreach $line(@foundmods){		$match = lc($line);		if ($found{$line}[0] >0)	{$found{$line} = [$found{$line}[0]+1,$match]}		else 		  		{$found{$line} = ["1",$match];$modcount++}}@foundmods = sort count keys(%found);sub count {return $found{$a}[1] cmp $found{$b}[1]}$third = $modcount/3;$count=0;print "<TR><TD WIDTH=33% VALIGN=TOP><TABLE BORDER=0 CELLPADDING=1>";foreach $mod(@foundmods){	chomp $mod;	$count++;	if ($count <= $third){			print qq~<TR><TD>${font}$mod</TD></TR>~;	}	else {push (@mod1,$mod)}}print "</TABLE></TD><TD WIDTH=33% VALIGN=TOP><TABLE BORDER=0 CELLPADDING=1>";$count = 0;foreach $mod1(@mod1){	chomp $mod1;	$count++;	if ($count <= $third){			print qq~<TR><TD>${font}$mod1</TD></TR>~;	}	else {push (@mod2,$mod1)}}print "</TABLE></TD><TD WIDTH=33% VALIGN=TOP><TABLE BORDER=0 CELLPADDING=1>";$count = 0;foreach $mod2(@mod2){	chomp $mod2;	$count++;	if ($count <= $third){			print qq~<TR><TD>${font}$mod2</TD></TR>~;	}}print qq~</TABLE></TD></TR></TABLE><P><HR COLOR="#BF0425" SIZE=1><P>${font}The latest version of <B><FONT FACE="Courier New, mono">$program</FONT></B> can always be found on <A HREF="http://www.scriptsolutions.com/programs/free/perldiver/" TARGET="_blank">${dev}'s web site</A>.<P><FONT SIZE=1>$font&copy; 1999, <A HREF="http://www.scriptsolutions.com/" TARGET="_blank">ScriptSolutions&#8482;</A>, a <A HREF="http://www.tintagel.net/" TARGET="_blank">Tintagel</A> project.<P><TABLE WIDTH=100% BGCOLOR=#FDB900 CELLPADDING=2 CELLSPACING=0 BORDER=0 BACKGROUND="http://www.scriptsolutions.com/images/top.GIF"><TR><TH ALIGN=RIGHT>&nbsp;<BR>&nbsp;</TD></TR></TABLE></BODY></HTML>~;exit;sub vars {$dev="ScriptSolutions&#8482;";use File::Find;$bgcolor = "GHOSTWHITE";$program="perl diver";$version="1.1";}sub wanted {	$count = 0;	if ($File::Find::name =~ /\.pm$/){		open(MODFILE,$File::Find::name) || return;		while(<MODFILE>){			if (/^ *package +(\S+);/){				push (@foundmods, $1);				last;			}		} 	}}
    

    Upload that change perms to 755 and run it in the browser.

    This should give u all other info you need. (assuming /usr/bin/perl is your path of course)

    .logic.


  • Advertisement
  • Posts: 0 ✭✭ [Deleted User]


    logic, u never cease to amaze me.


  • Registered Users Posts: 2,660 ✭✭✭Baz_


    your guess on the perl is right, and as for whether there should be a cgi-bin folder already the answer is I think so.

    not completely sure, sorry, just go to the website folder, and check (ie. one directory up from the actual html files)

    who are you hosted with? that will help in checking if you have cgi access or not. If it is your own box, that you are running the server from, then basically the question becomes do you have permission to run programs on your own machine, and the answer to that is obviously yes. If you are being hosted elsewhere, check the conditions, options, and terms, should be there somewhere.


  • Registered Users Posts: 2,660 ✭✭✭Baz_


    wow, the amount of replies you get if you whore some from irc amazing


  • Posts: 0 ✭✭ [Deleted User]


    Im hosted on a friends box you see, I can do pretty much anything i like in my home area, but have very little access anywhere else.

    as you can see, no mention of a cgi-bin:
    drwxr-xr-x   32 psire    psire        4.0k Jan 25 12:03 .
    drwx--x--x   11 psire    psire        4.0k Jan 28 13:53 ..
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 agentorange
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 beastiality
    drwxr-xr-x    2 psire    psire        4.0k Dec 20 15:03 cam
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 captainfist
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 cs
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 dino
    drwxr-xr-x    2 psire    psire        4.0k May 12  2001 dnc
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 dump
    drwxr-xr-x    4 psire    psire        4.0k May 12  2001 fist
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 fistedsister
    drwxr-xr-x    2 psire    psire        4.0k Mar 28  2001 iza
    -rw-------    1 psire    psire        3.3k Jan 25 12:03 lin.save
    -rw-r--r--    1 psire    psire         775 Jan 25 10:33 lines
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 linux
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 loki
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 microsofty
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 offury
    drwxr-xr-x    2 psire    psire        4.0k Apr  3  2001 opium
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 pee
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 pokey
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 poo
    drwxr-xr-x    2 psire    psire        4.0k May 27  2001 porn
    drwxr-xr-x    2 psire    psire        4.0k Jun  6  2001 porno
    drwxr-xr-x    2 psire    psire        4.0k Jan 27  2001 prep
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 sex
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 sexy
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 sexymofo
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 sirunderpants
    drwxr-xr-x    2 psire    psire        4.0k Mar  7  2001 slapmabitchup
    drwxr-xr-x    2 psire    psire        4.0k Jan 24  2001 smeg
    drwxr-xr-x    2 root     root         4.0k May  6  2001 stats
    -rw-r--r--    1 psire    psire        411k Mar  9  2001 website.png
    drwxr-xr-x    2 psire    psire        4.0k Jan 22 14:12 www
    



    Logic: my website has runout and so has my credit card, I cant do what you said till this weekend :/


  • Posts: 0 ✭✭ [Deleted User]


    Do what u know, thats what my mother always said ;)


  • Advertisement
  • Registered Users Posts: 258 ✭✭peterd


    If you have *practically* your own box, why wouldn't you go with something like a php+mysql combo board ? An excellent one is: www.phpbb.com it's really fast and won't drain any server as much as a .cgi driven one. I believe phpbb2 is now in the making.

    logic, why would you chmod a php file ? and then to go one step further and say 777 ? You don't need to give php files permission to execute. That said, fair play to ya for the helpful reply!


Advertisement