fcgi

T

Tom Allison

I am a little familiar with running FCGI applications and have done some work in
Perl.

Under Perl I can test it easily enough by running the script from command line
with STDIN/STDOUT and command line args. But this doesn't work at all under ruby.

A different approach is needed.

Is there something I could do to simplify the testing/development of fcgi
scripts under ruby instead of editing them in cgi-bin and trying to run them
from there?
 
A

ara.t.howard

I am a little familiar with running FCGI applications and have done some
work in Perl.

Under Perl I can test it easily enough by running the script from command
line with STDIN/STDOUT and command line args. But this doesn't work at all
under ruby.

A different approach is needed.

Is there something I could do to simplify the testing/development of fcgi
scripts under ruby instead of editing them in cgi-bin and trying to run them
from there?

??


fortytwo :/var/www/html > cat ./env2.fcgi
#! /usr/local/bin/ruby

require 'rubygems' rescue nil
require 'fcgi'
require 'yaml'

FCGI.each_cgi{|cgi| cgi.out{ "<pre>#{ cgi.env_table.to_hash.to_yaml }</pre>" }}


fortytwo :/var/www/html > ./env2.fcgi </dev/null | head
Content-Type: text/html
Content-Length: 4037

<pre>---
XAUTHORITY: /home/ahoward/.Xauthority
GS_LIB: /home/ahoward/.fonts
SSH_ASKPASS: /usr/libexec/openssh/gnome-ssh-askpass
KONSOLE_DCOP_SESSION: DCOPRef(konsole-4421,session-4)
MAIL: /var/spool/mail/ahoward
KDEDIR: /usr


hth.

-a
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,293
Latest member
Hue Tran

Latest Threads

Top