Author Topic: Apache and CGI  (Read 2598 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« on: 18 July 2002, 21:17 »
I just put YaBB on my server and it doesnt work. After setting up YaBB I went to the YaBB.cgi file as i was told in the instructions. It gives me This  error. Anyone know how to solve this dilema?
Its not YaBBs fault, no CGI will work.
I thought i had the apache setup properly to run CGI anywhere, as i followed VoidMains advice.

[ July 18, 2002: Message edited by: Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

smokey

  • Member
  • **
  • Posts: 183
  • Kudos: 0
Apache and CGI
« Reply #1 on: 18 July 2002, 14:31 »
quote:
Originally posted by Master of Reality / Bob:
I just put YaBB on my server and it doesnt work. After setting up YaBB I went to the YaBB.cgi file as i was told in the instructions. It gives me This  error. Anyone know how to solve this dilema?
Its not YaBBs fault, no CGI will work.
I thought i had the apache setup properly to run CGI anywhere, as i followed VoidMains advice.

[ July 18, 2002: Message edited by: Master of Reality / Bob ]


Would help b/c I set up UBB on my server but your link doesnt work  :(
  :(
//this is how I was born :)

cat /dev/urandom > /dev/mybrain

Tip for win98 (l)users: type copy /con/con in your command prompt to increase stability


Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« Reply #2 on: 18 July 2002, 17:14 »
egao is giving me problems.... I will move the pic to boomspeeed
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« Reply #3 on: 18 July 2002, 17:16 »
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache and CGI
« Reply #4 on: 18 July 2002, 18:29 »
Can you just post the text of the error message so I don't have to unblock boomspeed?
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« Reply #5 on: 18 July 2002, 20:22 »
this was in the error log for apache:
[Error} (2) No such file or directory: exec of var/www/html/bobhub/cgi-bin/yabb/YaBB.cgi failed
[client ***.***.***.***] Premature end of script headers: /var/www/html/bobhub/cgi-bin/yabb/YaBB.cgi

it gives me the same thing with the perl_test.cgi that comes with ikonboard.

[ July 21, 2002: Message edited by: Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache and CGI
« Reply #6 on: 19 July 2002, 00:56 »
That actually means that it is executing the CGI program which is good. If it was not executing the CGI program it would display the source code instead, just like any other text file.  Can you execute the script on the command line and have it run with no errors?  If it runs with no errors on the command line but gives you a message about premature end of headers when you execute it through Apache it usually can be resolved by looking at the first couple of lines of the script (print statements).  You may have to put this line as the first output line:

print "Content-Type: text/html\n\n";

Also, in your error message you have "cgi-nin" as part of the directory path.  Is that a typo?

[ July 18, 2002: Message edited by: VoidMain ]

Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« Reply #7 on: 22 July 2002, 04:11 »
first of all, i guess it would help to make it executable.
It still did the same thing.
I put that print statement: print "Content-Type: text/html\n\n";
and it still did the same thing
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache and CGI
« Reply #8 on: 22 July 2002, 04:19 »
Did you run the script on the command line as I suggested to make sure there isn't a problem with the script itself?
Someone please remove this account. Thanks...

TheLizardKing

  • Newbie
  • *
  • Posts: 15
  • Kudos: 0
    • http://www.ti-programmers.com
Apache and CGI
« Reply #9 on: 22 July 2002, 11:13 »
I can't be much of assistance in this field but are you trying to use the perl that came with your distro?  because you may be interested in mod_perl

http://perl.apache.org

I can't help much with the installation but they do have good documentation and its much faster then using perl outside of apache.
If it ain't broken,
Smash it.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache and CGI
« Reply #10 on: 22 July 2002, 20:06 »
Personally, I'm not a big fan of mod_perl.  I would rather use PHP in the instances where mod_perl would be beneficial.  But I do like external Perl CGI for some things.
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« Reply #11 on: 26 July 2002, 04:08 »
i did run the script from the command line and it didnt give any errors
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache and CGI
« Reply #12 on: 26 July 2002, 04:52 »
Well if you reset my password I will go in and take a look at it.  And if you make the directory writable to me I will make a backup copy of any script I modify and see if I can get it working for you...
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache and CGI
« Reply #13 on: 26 July 2002, 05:15 »
you want /etc/httpd/ writable... /var/www/html/bobhub/cgi-bin has the perl_text.cgi is the script i was trying to execute.
your password is the same as the one i sent you before (if you still have it)
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache and CGI
« Reply #14 on: 26 July 2002, 06:14 »
m0r, check your PM.
Someone please remove this account. Thanks...