Gossamer Forum
Home : Products : Gossamer Forum : Pre Sales :

Is speedyCGI

Quote Reply
Is speedyCGI
imcompatible with cgi-wrap? I'm having a terrible time installing speedycgi in my own area on the server. The installation seems to complete but even the simplest test script bombs. I checked the error logs and it says "cgi-wrapper" not found. Any ideas?
Quote Reply
Hours Later and NO LUCK In reply to
Okay I'll go through step by step what I've tried. In a nutshell I want to run speedyCGI since I'm on a shared server and do not have root access for mod_perl. The steps below are the exact ones I've tried (sorry to be so verbose):
  1. gunzip CGI-SpeedyCGI-2.11.tar.gz
  2. tar -xvf CGI-SpeedyCGI-2.11.tar
  3. cd CGI-SpeedyCGI-2.11
  4. perl Makefile.PL PREFIX=/home/sites/site45
  5. make
  6. make test
  7. make install


That seems to create the proper files in the proper places, although I did get some stuff about some failed tests. However when I run a simple cgi script it bombs. Some tests indicate it bombs on the shebang.

Code:


#!/home/sites/site45/bin/speedy

print "Content-type: text/html\n\nHello World!\n";

# Create a SpeedyCGI object

use CGI::SpeedyCGI;

my $sp = CGI::SpeedyCGI->new;

# See if we are running under SpeedyCGI or not.

print "Running under speedy=", $sp->i_am_speedy ? 'yes' : 'no', "\n";


Any ideas about what I'm doing wrong?

Quote Reply
Re: [Eric P] Hours Later and NO LUCK In reply to
What does your error log say exactly?

I think I remember installing speedycgi on a RAQ4 which uses cgi-wrap and that seemed to work.

Last edited by:

Paul: Sep 7, 2002, 1:58 AM
Quote Reply
Re: [Paul] Hours Later and NO LUCK In reply to
Paul

Thanks, unfortunately the error log is prett non-descript. It says "handler "cgi-wrapper" not found for : /home/sites/site45/web/forums/speedytest.cgi"

Any chance someone running on a RaQ could repeat what I've done and see if it works or identify the problem?

Eric P

Last edited by:

Eric P: Sep 7, 2002, 6:45 AM
Quote Reply
Re: [Eric P] Hours Later and NO LUCK In reply to
Hi,

Quote:
"handler "cgi-wrapper" not found


Edit your httpd.conf and look for where it says:

SetHandler cgi-wrapper

and replace that with

SetHandler cgi-script

Look for the line inside your <VirtualHost> directive.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Hours Later and NO LUCK In reply to
Ah yes I'd forgotten I'd changed to cgi-script from cgi-wrap on the raq, boy I still have nightmares about those purple RAQ error pages.

Last edited by:

Paul: Sep 9, 2002, 11:25 AM
Quote Reply
Re: [Alex] Hours Later and NO LUCK In reply to
Alex

Isn't modifying http.conf a root privalege? I looked for httpd.conf in my area on the server but didn't see it. If a user can modify or add their own httpd.conf where is that rascal?
Quote Reply
Re: [Eric P] Hours Later and NO LUCK In reply to
Yes it will need to be done as root, so your host will need to do it, either that or use cgi instead of speedycgi :(

Last edited by:

Paul: Sep 9, 2002, 11:53 AM
Quote Reply
Re: [Paul] Hours Later and NO LUCK In reply to
Hmm, although if cgi-wrapper can't be found, I don't think any cgi will work, let alone SpeedyCGI (as this is an apache error saying it can't find the proper handler for the context you are in).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Paul] Hours Later and NO LUCK In reply to
Paul

Thanks. My ISP will not modify any server config files at a users request. Configuration control is tight. I asked them if they would install SpeedyCGI in the base perl area but looks doubtful they will. So I'm left banging my head trying to get Speedycgi to run in my area. I've contacted Sam Horrocks (developer of speedycgi) and requested his help. Thus far he's been very receptive. I set him up an account on my server and hopefully he'll poke around and figure out why it won't work.

If I can't get speedycgi up and running I'll be very dissaponted. With the traffic my site sees I'm afraid running vanilla cgi will be too slow.

Thanks for all the help.
Quote Reply
Re: [Alex] Hours Later and NO LUCK In reply to
Fair point Blush
Quote Reply
Re: [Alex] Hours Later and NO LUCK In reply to
Alex

I re-checked my error log files. Actually the problem is "premature end of script headers".
Quote Reply
Re: [Eric P] Hours Later and NO LUCK In reply to
So you were leading us on a wild goose chase Wink

Do you have shell access?

Try:

perl -cw gforum.cgi

and

perl gforum.cgi
Quote Reply
Re: [Paul] Hours Later and NO LUCK In reply to
Paul

I did that with a two line test script and it works just fine. Try doing it with the browser and it croaks. I think when you explicity type perl from the shell it ignores the shebang which ordinarily attempts to load speedy.
Quote Reply
Re: [Eric P] Hours Later and NO LUCK In reply to
Normally it if works from ssh and not the browser it *can* be a simple issue like the wrong chmodding or directory permissions. Have you checked all those?....or even typos in the shebang line?

Make sure the directory gforum.cgi is in is 0755, make sure gforum.cgi is 0755 too

Last edited by:

Paul: Sep 9, 2002, 12:24 PM
Quote Reply
Re: [Eric P] Hours Later and NO LUCK In reply to
Instead of typing `perl script`, type: ./script and see if it works. Also, do a `killall speedy_backend` when you are done and try it from the web.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Hours Later and NO LUCK In reply to
Im losing my mind, why would I ask him to type perl script.cgi when he isn't even using perl....ugh....time for my chicken curry to wake up my brain cells ;)
Quote Reply
AHA! In reply to
Alex

Now we are getting somewhere... I think. When I do ./speedytest.cgi from the shell prompt I get the following error /usr/bin/speedy_backend: No such file or directory Cannot spawn backend process

What is interesting is I specified #!/home/sites/site45/bin/speedy in my script. So it kind of looks like it found speedy in my area but doesn't know to look in the same directory for speedy_backend. Does this sound plausible?
Quote Reply
Re: [Eric P] AHA! In reply to
Have a look at:

http://daemoninc.com/SpeedyCGI/

and you can try:

#!/path/to/your/speedy -p/path/to/speedy_backend

as your first line. Not sure why it didn't recognize that when you compiled it, maybe Sam knows more.

Cheers,

Alex
--
Gossamer Threads Inc.