Web Hosting Talk







View Full Version : IF you can help me with this, I will sign over my life! with this scricpt wwwboard


Nonchalant
09-17-2002, 06:26 PM
ok if you know pleeeezzzzz help me! this is what I did so far... and I am substituting a different fan site than mine becuzzz my competition is just plain weird. :D

Ok I got the script for wwwboard. I made a directory named 'rant' and I made a subdirectory named 'messages' then I

1. uploaded wwwboard.pl
2. edited the variables in the controll panel to show this:
# Define Variables

$basedir = "http://beatles.net";
$baseurl = "http://beatles.net/rant/";
$cgi_url = "http://beatles.net/rant/wwwboard.pl";

$mesgdir = "messages";
$datafile = "data.txt";
$mesgfile = "rant.html";
$faqfile = "faq.html";

$ext = "html";

$title = "WWWBoard Version 2.0 Test";

# Done


3.ok now I changed the wwwboard.html file to rant.html & within this file that I uploaded changed the post line to point to http://bettles.net/rant/wwwboard.pl

4. so now when I type in my url http://beatles.net/rant/rant.html , my board shows but when I post there is an error!

5. I tryed changing the file name extensions to .cgi for wwwboard.pl and when posted got this response which is different:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@me and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
--------------------------------------------------------------------------------

Apache/1.3.26 Server at opps Port 80


:confused: who da' man who can help me out or point me ?? pleezzzz

Techark
09-17-2002, 06:44 PM
Lets start off with will your account allow you to run cgi Scripts outside of the cgi-bin dir?
If so check your premissions on all files to make sure they are correct.
Check your error log file what do they say.

Nonchalant
09-17-2002, 06:57 PM
ok thanx

1. yes they do let you run cgi outside the bin

2. I set permissions like so:

wwwboard.pl = 755

messages directory = 777

rant.html = 744

now this is all I uploaded so far..... nothing else except for wwwadmin.pl and I set that for 777

Nonchalant
09-17-2002, 07:10 PM
ok umm I don't see anything looking like an error log in my file manager..... :confused:

Techark
09-17-2002, 07:16 PM
$basedir = "/home/domainname/Public_html/messageboard";

Your base path must be the absolute path not the URL path.

Nonchalant
09-17-2002, 07:30 PM
ok in my file manager up top it says Location: /www/www

is this home? like /www/beatles.net/public_html/rant

sorry....... am I close yet lol

NOTE USING BEATLES.NET AS AN EXAMPLE SITE, NOT MY SITE.
in case somebody does a search I wrote that.

akashik
09-17-2002, 08:36 PM
$basedir = "/home/username/public_html/messageboard";

might work better. It looks like it's a CPanel server.
(username and small P in public_html)

Greg Moore

Techark
09-17-2002, 08:39 PM
IS this a cpanel server ensim, plesk or what?

Your host should be able to tell you the correct path if you ask.

Yep sorry if it is a cpanel server the path will be. /home/username/public_html/messageboard

If it is one of the other control panels you will have to ask your host.

Nonchalant
09-17-2002, 08:40 PM
I cant figure this out.....


tryed I dont understand what to put for that baseline

tryed

/www/www/domain.net/rant
/www/domain.net/rant
/domain.net/rant

and many more.......

also for the first line to read perl ........ my hosting company said that the direct path to perl is ' /usr/bin/perl ' so I changed the first line from "#!/usr/local/bin/perl to #!/usr/bin/perl is this right??

Nonchalant
09-17-2002, 08:44 PM
$basedir = "/home/username/public_html/messageboard";

ok so I will try with my user name in there....... now what do I actually type public_html? and messageboard I sub in "rant" ??

thanx in advance

Nonchalant
09-17-2002, 09:18 PM
You can also run cgi scripts outside of your cgi-bin, but you would have to name them with the .cgi extension for security reasons.

ok this is a quote from my hosting site! but they just told me you cant do this. but yes I did have to use a user name.

now I will try again with the cgi-bin. thanx guys. I may be back to this thread :)

Nonchalant
09-18-2002, 12:23 AM
ok still trying for hours on this! here is what I did....

1. my variables look like this for wwwboard.pl :

$basedir = "/home/username/www/www/rant";
$baseurl = "http://domain.com/wwwboard";
$cgi_url = "http://domain.com/cgi-bin/wwwboard.pl";

$mesgdir = "messages";
$datafile = "data.txt";
$mesgfile = "rant.html";
$faqfile = "faq.html";

THIS FILE IS IS IN MY CGI-BIN SET AT 755

2. rant.html is in a directory not in my cgi-bin in "rant" directory
I added line "http://domain.com/cgi-bin/wwwboard.pl" in rant.html for the pointer. permission set 744

3. made a subdirectory 'messages' in "rant" directory. permission 777

4. Data.txt is in rant directory set at 777

now I didnt set the "rant" directory since there was not a direction to. should I? Do you see anything wrong here?
Does the rant directory have to be in cgi?

PLEEEZZZZZZ HELP

Webdude
09-18-2002, 12:26 AM
That sounds like an OLM setup.

/www/home/ or /home/www/ will work because of the symlinks they setup.

Nonchalant
09-18-2002, 12:55 AM
when I go to post, I keep getting an "internal server error" 500

Webdude
09-18-2002, 12:57 AM
If it is OLM you are on, dont chmod "anything" to 777. At the most, 755.

merconline
09-18-2002, 01:02 AM
to know wat'r ur base directory, u can use phpinfo()

Nonchalant
09-18-2002, 01:13 AM
thanx Webdude..... ok I put the permissions in the control panel to 755 for the 2 I had set for 777 and still I get the same error.....

I dunno any other suggestions :confused:

Nonchalant
09-18-2002, 01:18 AM
to know wat'r ur base directory, u can use phpinfo()"

I got a hold of support earlier and I think I have the right info for base based on there response:

Hello,

You cannot run .cgi files outside the cgi-bin, they would be useless in any other folder of your domain.

The server path to your main directory is:
/home/username/www/www/
Then the path to cgi-bin would be
/home/username/www/www/cgi-bin

#!/usr/bin/perl is the correct path to perl


ok and I did set the perl path........... & for base I used "/home/username/www/www/rant"

Webdude
09-18-2002, 01:25 AM
So it's working now? It's unusual to have /www/www/ . You should only have one www.

/home/username/ being your root
where
/home/username/www/ would be your web accessible directory.

Nonchalant
09-18-2002, 01:28 AM
no its not working now! but i can now try what you said.....

but yeah even on top of my control panel it says location: www/www and then my main files. I have icdsoft as a host

Webdude
09-18-2002, 01:33 AM
cd /home/username/www/
ls -al

what do you see? another www?

Nonchalant
09-18-2002, 01:37 AM
no go ......

ummm ok I think you are throwing telnet at me..... I was working out of the control panel the whole time.

merconline
09-18-2002, 01:39 AM
again i'd suggest to use phpinfo() to get hold of exact path .. and stamp out confusions :)

Webdude
09-18-2002, 01:41 AM
Ok, yeah, you might want to use the phpinfo...If you dont have command line access, or dont understand it...that's your best bet..

Nonchalant
09-18-2002, 01:44 AM
ok do ya want to help me try that :blush: I got windows 2000. cuzz don't know what phpinfo is

Webdude
09-18-2002, 01:48 AM
Umm, LOL...merc{Are you}online? I think you can just create a file called info.php with the followin in it, upload it to where you can read it from the web...



<?php
phpinfo();
?>



If I'm wrong, others can correct me. It's been a while since I used it.. Look for DOCUMENT_ROOT

Nonchalant
09-18-2002, 02:32 AM
ok I did it!!!!


Document_Root = /home/myusername/www/www

so had it right ;)

Nonchalant
09-18-2002, 03:11 AM
oh and by me saying I did it,,,,,,,, I meant I got the root info....

still cant get the board to work :bawling:

ok my info is still this except I let up on the permissions......


1. my variables look like this for wwwboard.pl :

$basedir = "/home/username/www/www/rant";
$baseurl = "http://domain.com/rant";
$cgi_url = "http://domain.com/cgi-bin/wwwboard.pl";

$mesgdir = "messages";
$datafile = "data.txt";
$mesgfile = "rant.html";
$faqfile = "faq.html";

THIS FILE IS IS IN MY CGI-BIN SET AT 755

2. rant.html is in a directory not in my cgi-bin in "rant" directory
I added line "http://domain.com/cgi-bin/wwwboard.pl" in rant.html for the pointer. permission set 744

3. made a subdirectory 'messages' in "rant" directory. permission 777

4. Data.txt is in rant directory set at 777

now I didnt set the "rant" directory since there was not a direction to. should I? Do you see anything wrong here?
Does the rant directory have to be in cgi?

:confused:

Webdude
09-18-2002, 11:59 AM
AT this point, without being in there myself, there's not much I could help on. There are too many possibilities of what the problem could be.

Nonchalant
09-18-2002, 04:07 PM
OK thanx for your help......... It was a matter of setting the rant directory to 777 and that did the trick! however another problem..

is anybody familiar with how this board works.... I see on other boards that when you click "post" > it says it posted> but when I click the "title" meaning to go back> it go's back to rant.html but does not refresh on my board like I see on other wwwboard! so I have to hit refresh again on mine

does anyone have a solution??