PDA

View Full Version : Cgi-bin


use4free
12-4-01, 01:16 AM
I want to make my guest book working!!!
I want to know why I've keeping recive 500 International Error?
?????????????????????????????????????????????????? ????????

1-I'm USING WS_FTP PRO.
2-CHMOD is 755. (rwxr-xr-x)
3-The SCRIPTS point to the file in my cgi folder.
4-I uploading in ASCII MODE. ( NOT BINARY ).

WHAT ELSE??????????????????????????????!!!!!!!!!
PLEASE ANY BODY TELL ME MORE.
THANKS,,,

Bud
12-4-01, 04:54 AM
(rwxr-xr-x) is not 755

The last "x" is incorrect - it means that the script is executable to the world but not readable. It should br "xr", executable and readable. :)

~bud

Starr
12-4-01, 04:56 AM
I hate to differ, but...

R = 4
W = 2
X = 1

Ill let you do the math. :)

Use4free, if you have your scripts set CHMOD 755 (or rwx|r-x|r-x), you are correct. Make sure your directories that contain scripts are set the same.

Bud
12-4-01, 06:15 AM
Starr is correct, my mistake, I read it as "x" when I should have read "r-x". I rarely use the character system, I normally use binary combinations when setting permissions on my linux...the character system gets cumbersome when doing complex changes (ie: chmod u+w, og+rx is easier written as 755 :) ) and umask takes care of most tasks, and of course ws ftp shows chmod as text so I get no experience there either lol.

sorry use4free :eek:

Don't hate to differ starr, I should be corrected when I'm wrong...wouldn't be the first time ;)

~bud

use4free
12-5-01, 02:04 AM
Thanks for help guys...
PLEASE tell me more what should I do?!
The chmod is 755 and when I press the
DIR INFO I get this:-
**************
**************
total 4
drwxr-xr-x 2 38014 500 512 Dec 3 21:38 cgi-bin
drwxr-xr-x 2 38014 500 512 Nov 30 16:04 etc
drwxr-xr-x 5 38014 500 512 Dec 3 20:58 htdocs
drwxr-xr-x 2 38014 500 512 Dec 3 21:40 logs
**************
**************
whats the problem?????
How its 755 and the (rwxr-xr-x) is wrong???!

In the chmod box:-
*******************************************
Owner Group Other
* Read * Read * Read
* Write Write Write
* Execute * Execute * Execute
*******************************************
Please help me more :(!!!!!!!!!!!!!?

Bud
12-5-01, 03:33 PM
Your directory permissions are correct I believe use4free.

I think the etc directory should be rwx------ (700) though.

Is that correct starr?

As for the guest book not working, are your paths set correctly in the scripts?

If the guestbook you are using creates any directories inside your cgi-bin you'll need to chmod those to 755 as well.

Post the 500 error you are receiving and I'll see if I can help.

~bud

use4free
12-5-01, 04:04 PM
Hi Bud...
my 500 Erorr is:-
***********************************************
***********************************************
500 Internal Server Error

--------------------------------------------------------------------------------
There has been an error in processing your request. Please contact webmaster@use4free.net with a brief description of your problem and what you were doing at the time.
--------------------------------------------------------------------------------


PowWeb Hosting WebMasters


--------------------------------------------------------------------------------

Webmasters, if you are having problems getting CGI, SSI or PHP scripts to work or need additional information such as paths to popular programs, please check the following before contacting PowWeb Technical Support.

Please check your error_log in your logs directory. If you do not have an error_log, please make sure logging is enabled for your website.
Please consult our CGI/SSI and PHP Category in Our Frequently Asked Questions.
Please make sure your script and directory pemissions are properly configuered as stated in our FAQ's.
If you do not want this Error Page, you can use the ErrorDocument redirect directive in your .htaccess file.
Sincerely,
PowWeb Development Staff
************************************************** **
************************************************** **
Why should the etc be 700 ? it's 755
where dhould I but my guestbook folder????!
to visit it now and tuch the problem yourself go th:-

http://www.use4free.net/guestbook/guestbook.html

Now can you help me????!
Thanks,,,

Bud
12-5-01, 07:11 PM
hi use4free, what I need to see is the error statement in your error log. You can find your error log in your logs folder.

the error should look something like this:



[Wed Dec 5 07:19:56 2001] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: /www/m/yourdomain/cgi-bin/whatever-script.cgi
Bareword found where operator expected at taps.cgi line 41, near ""
Execution of taps.cgi aborted due to compilation errors.




I'm not sure of the hierarchial structure of your guest book, the instructions should say where to put folders.

~bud

use4free
12-6-01, 12:46 AM
Hi Bud... :)
Thanks alot 4 your helping. Thanks,,,

the error log is:-
********************
********************
Can't Open /www/u/use4free/logs/access_log/guestbook.html: Not a directory
[Wed Dec 5 05:27:36 2001] [error] [client 195.39.134.82] Premature end of script headers: /www/u/use4free/cgi-bin/guestbook.pl
/usr/bin/date: not found
/usr/bin/date: not found
********************
********************

I think its what your asking for!!!
PLEASE help me more,,,
Thanks again.

Bud
12-6-01, 02:15 PM
No problem, glad to help :)

The error you posted looks to me like it may still be a chmod problem.

Did you chmod the guestbook.pl file to 755? Does the guestbook use any other cgi files?

Let me know which guestbook you are using and I'll take a look at how the code is set up. I'm not familiar with the 3rd party guestbooks that are around...I always write them as I need them.

I'm sure the problem is something simple to repair :)

~bud

use4free
12-7-01, 01:49 AM
Hi again Bud...
Sorry and thanks for your time...

*I CHMOD the guestbook.pl file and all FOLDERS &
FILES to 755.

*The GUESTBOOK not use any other cgi files.

*I'm useing matt's guestbook.

*You can download it by visit this URL:-

http://www.worldwidemart.com/scripts/guestbook.shtml

Please help...Casue this problem not just with the guestbook.It's with all scripts.
So if I make the guestbook working = all other scripts will working.

Thanks,,,

Bud
12-7-01, 02:14 AM
hi use4free, which ftp program do you use?

It seems that a lot of people here are having problems setting permissions with WS FTP. I have been using it for several years and have never had a problem, but maybe it's a problem in the newer versions I don't know, I'm using version 5.08.

I'm slightly familiar with Matt's scripts (used some years ago), I'll have a look at the guestbook script to see how it's configured.

Let me know about which ftp program you use, if all scripts are failing then it really sounds like permissions to me.

thx,
~bud

sophiespo
12-7-01, 03:44 AM
Can't Open /www/u/use4free/logs/access_log/guestbook.html: Not a directory


is your guestbook.html file supposed to be in your logs folder??
I thought html files were supposed to be in your htdocs folder

Looks to me like that path is wrong. That would generate the error your getting.

From your previous post, it seems to me your path should be
/www/u/use4free/htdocs/guestbook/guestbook.html

sophie

use4free
12-7-01, 02:24 PM
Hi Bud...
I'm Using WS_FTP PRO.
*****
PLEASE tell me where should I put the guestbook folder
and the guedtbook.pl file???!

Maybe the problem is here!!?Maybe!

Thanks,,,

SBGlasby
12-7-01, 03:54 PM
It not just improtant to CHMOD all of your files to 755, but you need to make sure you upload them in "ASCII" mode.... Binary & AUTO mode seem to play with .pl files.....

You should have created a folder in your cgi-bin called guestbook.... " you don't have to, but if your going to be using a few scripts", you need to organize them somehow.... instead of just dumping them into the cgi-bin.....

1.anyway, create the Folder " guestbook", inside the cgi-bin folder... CHOMD the folder to 755, by default it's assigned 644 or something like that.....

2. Upload the .pl & or .cgi files into the " guestbook folder" in " ASCII", then CHMOD them to 755.

3. If your Guest Book is being called from an .HTML file, go into your \htdocs folder, and create another folder called " Guestbook", and upload the .html file into that.... Don't worry about permissions for that folder.....


I'm assuming there's a setting in the .html file to tell it where the GuestBook .pl file is...... edit the string to something like:
http://www.yoursite.com/cgi-bin/guestbook/guestbook.pl

or whatever the name of the .pl file is.....

Most .pl files I've seen need a directory path set in them.... to tell it the path to the file ......

Check the "readme file" that came with the script.... so see if you need to edit this.....

If all else fails..... Try and find another guestbook file with better documentation.....

hope it helps

sophiespo
12-7-01, 05:04 PM
I think youve just set your paths wrong in your guestbook.pl file

i think (according to your post before) you have this path set:

/www/u/use4free/logs/access_log/guestbook.html

when you should have:

/www/u/use4free/htdocs/guestbook/guestbook.html

of course, I may be wrong, but i havent seen your guestbook.pl file to be able to know exactly whats wrong..

try it
sophie

Bud
12-7-01, 08:23 PM
His first post states:

1-I'm USING WS_FTP PRO.
2-CHMOD is 755. (rwxr-xr-x)
3-The SCRIPTS point to the file in my cgi folder.
4-I uploading in ASCII MODE. ( NOT BINARY ).

I assume his paths are correct and that ACSII was used for uploading (I'm also assuming the path error was a fluke on his behalf, is that correct use4free?)

use4free, just to be sure, check that $guestbookurl points to "http://use4free.com/guestbook/guestbook.html" and $guestbookreal points to "/www/u/use4free/htdocs/guestbook/guestbook.html";

Your guestbook is located at http://www.use4free.net/guestbook/guestbook.html - which should be correct.

After seeing so many people here in the forum having problems setting permissions with WS FTP Pro, I would recommend trying Cute FTP (not my favorite) and see if using it to set permissions solves the problem.

I would also set zero to all of the options near the top of guestbook.pl (until the error is repaired) to be sure that none of the options are contributing to the error.

~bud

use4free
12-9-01, 09:53 PM
Hi Bud , Starr , sophiespo , SBGlasby & all USERS...
I said many times thats:-

*I'm USING WS_FTP PRO.
*CHMOD is 755. (rwxr-xr-x) and the folers (drwxr-xr-x).
*The SCRIPTS point to the {pl} file in my cgi folder.
*I uploading in ASCII MODE. ( NOT BINARY ).
*The etc folder CHMOD is 700. ( drex------ ).
********************************
*The DIRINFO is:-
total 4
drwxr-xr-x 3 38014 500 512 Dec 8 17:39 cgi-bin
drwx------ 2 38014 500 512 Nov 30 16:04 etc
drwxr-xr-x 6 38014 500 512 Dec 8 18:50 htdocs
drwxr-xr-x 3 38014 500 512 Dec 8 18:56 logs
********************************
*The error_log is:-
Can't Open http://www.use4free.net/Guestbook/guestbook.html: No such file or directory
[Sat Dec 8 10:52:05 2001] [error] [client 195.39.134.82] Premature end of script headers: http://www.use4free/cgi-bin/guestbook/guestbook.pl
/u/bin/date: not found
/u/bin/date: not found
*********************************
*All Scripts Files CHMOD to 755.& the Folders also.
*For EXAMPLE I'm using Matt's Guestbook.
http://www.worldwidemart.com/scripts/guestbook.shtml

*My guestbook html files in "Guestbook" folder into the
"htdocs" folder.

*the " guestbook.pl " in " guestbook " folder into the
" cgi-bin " folder.
*The " guestbook.pl " file address is:-
http://www.use4free.net/cgi-bin/guestbook/guestbook.pl

PLEASE HELP...!!!
Thanks again,,,

SimCoWeb
12-10-01, 03:04 AM
use4free, I ran through your guestbook and it's taking the posts fine. Problem is you can't view them. Somewhere there's a path that's incorrect. When I click on my post it goes to a dead URL with this in the address bar: http:///

So the path to the posts is not correct.

Also, I noticed that the path to the date was wrong in your previous post. It's /usr/bin/date as opposed to what was in your message of /u/bin/date This may just be the way the error log shows it but check the script to make sure if there's a setting for it that it's the correct path to the date.

Bud
12-10-01, 01:58 PM
use4free, near the top of guestbook.pl you will see the following info. Please copy it from your script and paste here so that we can look for any path problems you may be having.


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
# Set Variables

$guestbookurl = "http://your.host.com/~yourname/guestbook.html";
$guestbookreal = "/home/yourname/public_html/guestbook.html";
$guestlog = "/home/yourname/public_html/guestlog.html";
$cgiurl = "http://your.host.com/cgi-bin/guestbook.pl";
$date_command = "/usr/bin/date";

# Set Your Options:
$mail = 0; # 1 = Yes; 0 = No
$uselog = 1; # 1 = Yes; 0 = No
$linkmail = 1; # 1 = Yes; 0 = No
$separator = 1; # 1 = <hr>; 0 = <p>
$redirection = 0; # 1 = Yes; 0 = No
$entry_order = 1; # 1 = Newest entries added first;
# 0 = Newest Entries added last.
$remote_mail = 0; # 1 = Yes; 0 = No
$allow_html = 1; # 1 = Yes; 0 = No
$line_breaks = 0; # 1 = Yes; 0 = No

# If you answered 1 to $mail or $remote_mail you will need to fill out
# these variables below:
$mailprog = '/usr/lib/sendmail';
$recipient = 'you@your.com';

# Done
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


Thanks,
~bud

use4free
12-10-01, 08:06 PM
Hi All,,,
Thanks alot 4 ur helping...
My scripts is working,,,
Thanks again and gooooood bye...

Bud
12-10-01, 09:04 PM
congrats use4free :)

~bud