Forum Moderators: coopster & phranque

Message Too Old, No Replies

I want to make a forum

But now I'm just pulling out hair

         

Powdork

7:49 pm on Aug 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello all,
I'm trying to install a forum on my site and it's not going so well. :(

The latest error I am receiving is:
<ERROR:
Missing or Invalid Selection!

Use your browser's [BACK] button and try again.>

modified script:

#!/usr/bin/perl
use CGI::Carp qw(carpout fatalsToBrowser);

# CONFIGURE THE SCRIPT:
#
# Change these sample paths to the actual paths on your server:

# Your Unix system date and sendmail commands
$dateCmd = '/bin/date';
$mailCmd = '/usr/lib/sendmail';

# Your E-Mail address - note mandatory backslash before \@
$myMail = "webmaster\@xx.xx.47.13/";

# Unix path to bbmat directory
$bbmatDir = "/usr/home/user_name/filename/bbmat";

# URL to the bbmat directory
$bbmatUrl = "http://xx.xx.47.13/bbmat";

# URL to bbmat.cgi
$scriptUrl = "http://xx.xx.47.13/cgi-bin/bbmat.cgi";

# Link to exit from manager
$exitUrl = "http://xx.xx.47.13/";

# Here you define one or more forums using a keyword and path to
# the directory where each can be found. You will create the directories
# in a later step. The 'how2bbm.txt' document will explain what to place
# there. For simplicity you can use your chosen keywords as the names
# of the directories as in the example. Use short alphanumeric keywords.

%Script = (
'OZ','/usr/home/user_name/filename/OZ',
);

# Select one of the above keywords as the default forum.
$script = 'OZ';

# If BBMATIC frame(s) will be nested inside your own frames set to 'Y'
$nested = 'N';

# OPTIONAL - YOU CAN EDIT THESE VARIABLES IF DESIRED:

# You will probably want to use your imagination and list some
# inappropriate words that you want to exclude from being posted.
@badWords = ("xx*","xx");

# Maximum length in CHARACTERS to DISPLAY on the main page
# for subjects and followup comments.
$maxSubj = 250; $maxComm = 60;

# Set maximum length in CHARACTERS for a subject or comment. If
# exceeded, the text will be truncated. Default is 5120 = 5KB.
$maxLength = 5120;

# If you want a signature file attached to mail messages,
# uncomment the next line and enter the correct Unix path ..
# $MYSIG = "/home/yourpath/to/mysig.txt";

# otherwise uncomment the next 2 lines and replace with your info ..
$myName = "Powdork";
$homeUrl = "http://xx.xx.47.13/";

# If you don't want to backup the bbm.dat file, set $bakFlag to 'N',
# otherwise set bakTime, bakMax and bak Dir in the 'if' loop ..
$bakFlag = 'Y';

if ($bakFlag eq 'Y')
{ $bakTime = 2; # days btwn backups
$bakMax = 7; # days to keep backups

# Unix path to backup directory
$bakDir = "/usr/home/user_name/filename//bak";

The actual program was to large to post but I can if needed. I doubt thats where the problem lies.
I use cute ftp 4.0 and uploaded in ascii mode. I am very new to unix paths so that is what I suspect is the problem.
Thanks

[edited by: jatar_k at 4:40 pm (utc) on Aug. 25, 2003]
[edit reason] removed repetitive code see Charter [/edit]

jatar_k

4:43 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



That looks like a handled error, any idea what the true error is or what is actually missing?

Powdork

5:20 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That looks like a handled error, any idea what the true error is or what is actually missing?

No, I'm afraid I'm pretty much clueless here. What is a handled message?
Here is my guess, but I don't know if it would give that message.
The path to sendmail is most likely wrong. The instructions with the script say to type in 'which sendamail' at the unix prompt to find the path. How do I get to the unix prompt?
I had made about a zillion modifications before I added the code that spits out error messages so I don't know what the previous errors were.
As for the other paths-
When I am at my hosting account control panel I go to 'file manager'. The breadcrumbs say 'home/user_name/' so I included that. I assumed the '/usr' was important so I kept that from the original script. Is the user_name necessary or is that just for the control panel access?

Thanks for the link to the charter.
I just want to learn to fish.:)

Josk

1:18 pm on Aug 26, 2003 (gmt 0)

10+ Year Member



>No, I'm afraid I'm pretty much clueless here. What is a handled message?

A message that has been handled by an internal subsystem of the script.

>How do I get to the unix prompt?

Ask your host if you have ssh access. Alternativly ask them where sendmail is located. Usually /usr/sbin/sendmail or /sbin/sendmail

> When I am at my hosting account control panel I go to 'file manager'. The breadcrumbs say 'home/user_name/' so I included that. I assumed the '/usr' was important so I kept that from the original script. Is the user_name necessary or is that just for the control panel access?

Don't assume things. Assuming things wastes time. Only include what you know. Again if you have ssh access the home directory will be shown if you type 'pwd' after you login. Alternativly ask your host. The home direcory is usually /home/user_name/ .

Powdork

3:55 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ooops, I need to upgrade my plan for ssh access. is it necessary to run the script, or just to get the answers?

Powdork

5:08 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay, I think I'm going to hook one soon.

Here is the part within the script that must be 'handling' the message.

# ensure a valid script is selected

if ($Script{$Form{'script'}})
{ $script = $Form{'script'};
}
$scriptDir = $Script{$script};

$BBMCFG = "$scriptDir/bbm.cfg";
$BBMCNT = "$scriptDir/bbm.cnt";
$BBMDAT = "$scriptDir/bbm.dat";
$BBMOLD = "$scriptDir/bbmold.dat";
$BBMFLK = "$scriptDir/bbm.flk";
$BBMTEMP = "$scriptDir/bbmtemp.html";

open (CFG,"<$BBMCFG") ¦¦ &endIt ("Missing or Invalid Selection!");
@bbmCfg = <CFG>;
close (CFG);

and from the installation instructions
Create a directory (777) for each forum using the directory paths
and names you specified in 'bbmat.cgi' for the %Script variable. You
may want to make these subdirectories of the 'bbmat' directory
such as:

/bbmat/recipe/ and /bbmat/decapitation/

Place each set of 'bbm.dat' (666), 'bbm.cfg' (644), 'bbm.cnt' (666),
'bbm.flk' (666), 'bbmtemp.html' (644) and 'bbmold.dat' (666) into the
corresponding directory. These directories MUST be world-writeable!

end
Which I think is what I've done. Except, How do I make the files world writable?

jatar_k

5:13 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If you are using an ftp program they usually have the ability to change the permissions.

look for something called chmod in either the top menu or right click on the directory itself in the ftp program. Then just change it to 777 or select the appropriate checkboxes.

Powdork

5:38 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had already chmod 777'ed it. I just wasn't sure if it was the same as world writable.

Here's another shot in the dark. It couldn't have anything to do with the domain not resloving yet (thus the ip address), could it?

jatar_k

5:51 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Since this is the error in question

Missing or Invalid Selection!

what exactly were you trying to do when it was generated?
Any idea if it is missing or if it is invalid?
Which actual script is it coming from?
Is it the one you pasted or is it something else?

First you need to understand exactly where the error is from and then move on to the other questions.

Ip should be fine I would think.

Powdork

6:52 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what exactly were you trying to do when it was generated?
open the script via the url- [xx.****.xxx...]

Any idea if it is missing or if it is invalid?
No

Which actual script is it coming from?
I'm not sure what you mean. It's being generated by the part of the script listed in msg 6.

Is it the one you pasted or is it something else?
Yes

My raw logs simply show it as a successful GET of /cgi-bin/bbmat.cgi, as well as when I use /cgi-bin/bbmat.cgi?script=OZ

Shot in the dark #198
Is it ok to use caps for the directory name (OZ)

Damian

12:23 pm on Aug 27, 2003 (gmt 0)

10+ Year Member



Powdork, I think the problem is in this part, the path to OZ is wrong so you get that error message because it can not find the script at the specified location:

%Script = (
'OZ','/usr/home/user_name/filename/OZ',
);

Just guessing , but the path to OZ is likely to be something like

/usr/home/powdork/OZ

or

/usr/home/powdork/OZ.cgi

The above assuming 'powdork' is your actual user name with your host, and OZ or OZ.cgi is the filename

If it does not work or to test what the problem really is you could make the error message to specify what file it could not open by adding $! to the error message..

so changing
[perl]
open (CFG,"<$BBMCFG") ¦¦ &endIt ("Missing or Invalid Selection!");
[/perl]
to
[perl]
open (CFG,"<$BBMCFG") ¦¦ &endIt ("Missing or Invalid Selection! $!");
[/perl]

Powdork

6:31 pm on Aug 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the reply Damian (and everyone else too).

/usr/home/powdork/OZ.cgi- Nah, the directions say it is the path to the directory.

/usr/home/powdork/OZ- I have tried this, but only when I adjusted the other paths similarly. I'll try changing only that path.

("Missing or Invalid Selection! $!"); - Thanks, I'll do that too.

Shot in the dark #199- What's up with the capital 'C'?
open (CFG,"<$BBMCFG") ¦¦ &endIt ("Missing or Invalid Selection!");
@bbmCfg = <CFG>;

Powdork

7:26 am on Aug 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, I give up. I just went and upgraded my hosting package so it now includes MySQL. Any ideas on a simple php MySQL solution?