Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-25 Thread Giannis Economou

Mark Fuller wrote:

On Sun, Feb 24, 2008 at 3:34 AM, Giannis Economou <[EMAIL PROTECTED]> wrote:
  

 Actually, the best thing for me was to use the mod_fcgid module
 (http://fastcgi.coremail.cn/) instead of the old fastcgi (www.fastcgi.com).
 mod_fcgid is binary compatibility to mod_fastcgi, but I like it much more.



Thanks. I wasn't aware there was a fastcgi and fastcgid. It sounds
like this is just a change at the Apache server, not the instance
script? You continue to use FCGI.pl? (There's not an FCGId.pl?).

  

Yes, you continue using FCGI (no FCGId).

I googled and found a couple of people saying the "d" handler is
unstable (one said it's "more unstable than a monkey on crack"). That
was posted in the past 60 days. Have you had any problems?

  
None! No problems. Running non-stop for many months without any problem 
at all.

Give it a try.

Giannis


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-24 Thread Ron Savage
Hi Mark

> To Ron: I emailed Sven, asking if he could reindex FCGI. He was very
> responsive. I received a reply in 10 minutes that he'd done it. (Just
> to let you know that discussion led to something productive.). If it
> doesn't appear in the search results by tomorrow I'll nag him a little
> more about it. Maybe it's not a big deal. But, it was always confusing
> to me that it's not discoverable through CPAN. It gave me the
> impression it wasn't really "mainstream."

Good idea.

Well, it may not be "mainstream", but the CPAN index sure is, and it's
the latter I'd like to know is reliable.

All in all, a productive thread.

$response = $many x $thanx;

to all who contributed. And don't stop now if you have more to say!
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-24 Thread Mark Fuller
On Sun, Feb 24, 2008 at 1:42 AM, David Emery <[EMAIL PROTECTED]> wrote:
>
>  You'd be getting whatever version of Perl is on that machine.

Thanks. I had the idea that it was creating it's own statically linked
Perl executable.

>  It works very well for me. The ability to group scripts together to
>  share a speedy instance, and to set config parameters in the
>  shebang-line are nice.

I like it too. Especially the ability to play with it at the command
line. 2-3 years ago I went through the learning curve figuring out the
subtle differences between persistence and non-persistence (the
difference between class and object data, how begin and end blocks
work, etc.). That would have been a lot easier at the command line
instead of experimenting with a CGI. I think there's a way to hook up
a command line script to a FCGI script through a pipe or unix socket.
But, I haven't looked at it closely.

I like how there's not much to change to switch to mod_perl. I'm
trying to think if there's a way to make common FCGI processing a
plugin so it would just be a one-line change. I saw
CGI::Application:FastCGI:

http://search.cpan.org/~naoya/CGI-Application-FastCGI-0.02/lib/CGI/Application/FastCGI.pm

A superclass between you and C::A. But, it looks like the object never
goes out of focus. I guess that could lead to coding that wouldn't
behave the same way under mod_perl or native fcgi.

Mark

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-24 Thread Mark Fuller
On Sun, Feb 24, 2008 at 3:34 AM, Giannis Economou <[EMAIL PROTECTED]> wrote:
>  Actually, the best thing for me was to use the mod_fcgid module
>  (http://fastcgi.coremail.cn/) instead of the old fastcgi (www.fastcgi.com).
>  mod_fcgid is binary compatibility to mod_fastcgi, but I like it much more.

Thanks. I wasn't aware there was a fastcgi and fastcgid. It sounds
like this is just a change at the Apache server, not the instance
script? You continue to use FCGI.pl? (There's not an FCGId.pl?).

I googled and found a couple of people saying the "d" handler is
unstable (one said it's "more unstable than a monkey on crack"). That
was posted in the past 60 days. Have you had any problems?

>  In the past (before mod_fcgid) I had several experiences with speedycgi
>  (aka perperl)

*Another* name (perperl) for speedyCGI/persistentPerl :). That made
finding it difficult for me. I read in the POD that persistentPerl was
supposed to become the name going forward. That was back in 2002. I
spent about an hour trying to find it. By chance I tried "speedyCGI"
and found an up-to-date package in Ubuntu's repository. I never tried
"perperl." (Which is confusingly similar to pperl, an entirely
different module on CPAN).

It's confusing. This discussion's clarified a lot of things.

To Ron: I emailed Sven, asking if he could reindex FCGI. He was very
responsive. I received a reply in 10 minutes that he'd done it. (Just
to let you know that discussion led to something productive.). If it
doesn't appear in the search results by tomorrow I'll nag him a little
more about it. Maybe it's not a big deal. But, it was always confusing
to me that it's not discoverable through CPAN. It gave me the
impression it wasn't really "mainstream."

Mark

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-24 Thread Giannis Economou

Hello...

I'm using fastcgi for C::A for a long time in production installations, 
with success (with C::A::Dispatch).
Actually, the best thing for me was to use the mod_fcgid module 
(http://fastcgi.coremail.cn/) instead of the old fastcgi (www.fastcgi.com).

mod_fcgid is binary compatibility to mod_fastcgi, but I like it much more.
mod_fcgid become more popular after RoR success - it seems it become 
quite common accelerator for  ruby environments nowadays.
Installation is pretty easy. And it's working reliable for accelarating 
my C::A non-stop in production environments.


In the past (before mod_fcgid) I had several experiences with speedycgi 
(aka perperl) and C::A (with Dispatch). But I abandon this, because 
there were problems. It was 2006 and I don't remember exactly the 
problems I had. I remember that I've managed to have speedycgi running 
and it seemed ok.
But the processes of speedycgi was becoming problematic after some 
days/weeks of execution. Maybe it had to do with database persistency, I 
really do not remember now. I remember also that I was very pleased to 
abandon speedy and to go to mod_fcgid.


BTW, if you are interested we offer shared hosting that is ready for 
C::A (wth mod_fcgi), in case you are interested. Our systems run CentOS 
4, 5 (and Debian, but our Debian servers are not available for shared 
hosting now).




To make a plain CGI C::A to go on Fast CGI (mod_fcgi), usually I just 
have to:

use CGI::Fast qw(:standard);
and then implement the main loop, as:
while ( my $q = new CGI::Fast ) {
...
}

I also use in the dispatch() options:
args_to_new => {
   QUERY => $q,
   PARAMS => {
'::Plugin::DBH::dbh_config' => [ sub 
{DBI->connect_cached(  
MyWebApp::Util::Config->instance->GetDbConnectionParams()  );} ],

  },

(Util::Config->GetDbConnectionParams() just returns the connection string)

I also take care to not relyi on any relative paths in my C::A.



Best regards,
Giannis Economou


Ron Savage wrote:

On Thu, 2008-02-21 at 09:59 +0800, Silent wrote:

Hi Slient

  

has anyone use C-A-Dispatch with FastCGI ?



I had no trouble using it. I can send my code it that helps.
  



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-24 Thread David Emery
"Mark Fuller" <[EMAIL PROTECTED]> writes:

> BTW: The speedyCGI package installed with Ubuntu 7.10 (probably the
> same package available in Debian) seems to work. I'm not sure what
> version of Perl I'm getting. 

You'd be getting whatever version of Perl is on that machine. 

> But, it's a pretty simple way to play
> with persistence without going through a web server. An easy way to
> see how class and object data differ.

I use speedy fairly regularly and like it a lot. Virtual server hosts I
use often run on FreeBSD, which has a port available so it's easy to
install. In the past I've been able to get a couple of shared hosting
companies to install it as well.

It works very well for me. The ability to group scripts together to
share a speedy instance, and to set config parameters in the
shebang-line are nice.

Dave

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
Hi Mark

On Sat, 2008-02-23 at 23:19 -0700, Mark Fuller wrote:
> >  Go to http://www.fastcgi.com/ and scroll down to /Perl/, not /CPAN/
> >  (between Java and Python). Takes you straight to the module.
> 
> I see what you mean. If you click on the "Perl" link it takes you to a
> list of CPAN modules. Do you understand why those modules can't be
> found by searching CPAN?

My guess is that a while ago (a couple of years) there was a problem
with the indexer at CPAN, and because the Perl for FCGI has not needed
to be updated for so long, it has not been seen by the new indexer.
Confusing, I admit.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Mark Fuller
>  Go to http://www.fastcgi.com/ and scroll down to /Perl/, not /CPAN/
>  (between Java and Python). Takes you straight to the module.

I see what you mean. If you click on the "Perl" link it takes you to a
list of CPAN modules. Do you understand why those modules can't be
found by searching CPAN?

Mark

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
Hi Mark


> Can you provide a link to the site that provides the link? :) If I go
> to www.fastcgi.com it has a link to CPAN's main page.

Go to http://www.fastcgi.com/ and scroll down to /Perl/, not /CPAN/
(between Java and Python). Takes you straight to the module.

> >A few lines of change is not worth worrying about.
> 
> Another thing is testing if the script's source changed. The
> documentation for the fastcgi perl handler has an option to test for
> this, but it says it's better for the fcgi script to test if the
> source changed.

I'd be worried about my modules changing, not the script itself...
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Mark Fuller
>  IIRC there's a link from the FastCGI web site to the CPAN module.

Can you provide a link to the site that provides the link? :) If I go
to www.fastcgi.com it has a link to CPAN's main page.

The only way I found FCGI in the past was to browse FCGI::ProcManager
(which turned up in a search for FCGI). It has a link to FCGI.

BTW: The speedyCGI package installed with Ubuntu 7.10 (probably the
same package available in Debian) seems to work. I'm not sure what
version of Perl I'm getting. But, it's a pretty simple way to play
with persistence without going through a web server. An easy way to
see how class and object data differ.

>A few lines of change is not worth worrying about.

Another thing is testing if the script's source changed. The
documentation for the fastcgi perl handler has an option to test for
this, but it says it's better for the fcgi script to test if the
source changed.

It adds up.

Mark

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
Hi Mark

> life of me, I can't figure out how to find it on CPAN without already
> knowing where it is. :) Taken as a sum I gather impressions. That's
> all.

IIRC there's a link from the FastCGI web site to the CPAN module.

> SpeedyCGI and "pperl" on CPAN) (if they work) seem to be more
> transparent. They don't require a lot of change to the script (just
> the shebang line). They have options to automatically terminate after
> a number of executions, or amount of time. I've have code these tests
> into my fastcgi "accept" loop (which is already a significant
> modification to non-fastcgi processing.).

A few lines of change is not worth worrying about. Other matters should
decide which way you jump.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
Hi Silent

> thanks very much!
> that's works,
> and in t.fcgi:

Excellent.

> the line "$request -> Finish();" seems not needed.

True. But it's a good habit to get into...

> and in my opinion, mod_perl is powerfull, but Fastcgi is also very fast than
> CGI,
> and it is more easyer to find vhost surport fastcgi than mod_perl.

I doubt that! The mod_perl mailing list is /very/ active.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Mark Fuller
>  Curious. Still, reliable (software) technology doesn't have to be
>  updated. This topic blew up

Sorry. It just looked like nothing was happening with these various
tools. For example: The SpeedyCGI/PersistentPerl web site has binaries
for download which are ancient. The fastcgi site's FAQ has a "what is
fastcgi?" placeholder that hasn't been completed. Things like that
give the impression there isn't much user base. For example, if
someone heard of fastcgi how would they find the FCGI module? For the
life of me, I can't figure out how to find it on CPAN without already
knowing where it is. :) Taken as a sum I gather impressions. That's
all.

> in order to choose what
>  to abandon Windows in favour of. To say Ubuntu was a f***ing shambles
>  would be to glorify it. I posted a very long explanation on the Ubuntu
>  forum's installation survey at the time. I chose Debian. Case closed.

I've not had any problems with Ubuntu. But, I just use the server
distribution. I should probably use CentOS as a more serious server
distro. But, I like how Ubuntu has broad (fanatical?) user support. I
notice the speedyCGI package is in the Debian repository too. That
might be where Ubuntu got it. (wink).

I didn't realize you only tested fastcgi (not an active user).

SpeedyCGI and "pperl" on CPAN) (if they work) seem to be more
transparent. They don't require a lot of change to the script (just
the shebang line). They have options to automatically terminate after
a number of executions, or amount of time. I've have code these tests
into my fastcgi "accept" loop (which is already a significant
modification to non-fastcgi processing.).

Mark

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Silent
2008/2/23, Ron Savage <[EMAIL PROTECTED]>:
>
> On Thu, 2008-02-21 at 20:08 +0800, Silent wrote:
>
> Hi Silent
>
> Here's a demo:
> http://savage.net.au/Perl-modules/CGI-Application-Test-Dispatch-1.00.tgz
> Note: Test is used in the sense of testing my understanding of the
> dispatch style of app design in order to write an app, not in the sense
> of testing a pre-existing app. This module won't ever be on CPAN.
> --


thanks very much!
that's works,
and in t.fcgi:

the line "$request -> Finish();" seems not needed.


and in my opinion, mod_perl is powerfull, but Fastcgi is also very fast than
CGI,
and it is more easyer to find vhost surport fastcgi than mod_perl.

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
On Sat, 2008-02-23 at 10:01 -0700, Mark Fuller wrote:

Hi Mark

I see Michael Peters has already replied, and he know a great deal more
that I do about these topics. Nevertheless, a few comments follow...

> This might be better asked on Perlmonks, but do you have a feel for
> how widely used is fastcgi? I got the impression it's not because the

I have no idea how widely FastCGI is used, although I occassionally see
references to it (still being used). I tried it because I'd heard about
it and because I wanted to familiarize myself with
yet-another-way-of-doing-things.

> CPAN module isn't easy to find. Searching CPAN for "fcgi" returns a
> catalyst module (MojoMojo with a ridiculous version number) instead of
> the real FCGI module[1]. The module hasn't been updated since 2002.

Curious. Still, reliable (software) technology doesn't have to be
updated. This topic blew up - on this list - a couple of years ago, and
I responded /very/ briefly with a comment about Perl on Prozac, because
I got the distinct impression the OP was under pressure to fabricate the
false impression of the introduction of new software technology into the
marketplace by artifically creating new versions, or new names for old
packages, in order to give their employer a false but perceived
advantage (in the market). But things like CGI, HTML, HTTP, TCP/IP etc
don't need constant updating. We rely of them precisely because they can
be relied upon (which sounds like a circular argument, but then the
traffic flow from web client to web server and back is circular too!).

> Have you looked at any other persistence tools? I've seen references
> to speedyCGI (aka persistentPerl) and pperl (CPAN module). But, I get

Yes. IIRC I downloaded SpeedyCGI but could not compile it due to syntax
errors. In such a situation I immediately wrote it off, and that because
there are such good and working alternatives - FastCGI and mod_perl.

Note: These latter 2 technologies do not - to my way of thinking -
address the same issues, so I don't see them completing with each other.
Nevertheless they can have the same effect (as each other) by vastly
speeding up execution times by caching compiled code.

> the impression they're not widely used because they haven't been
> updated in awhile. (2003 and 2004 respectively.). I couldn't compile
> speedyCGI. (But, I noticed Ubuntu 7.10 has an installable module in
> its repository.). I haven't tried pperl yet. It looks like it was
> created because the author couldn't compile SpeedyCGI either.

Ubuntu - ha, ha, ha. 

Last year I installed FreeBSD twice, Ubuntu several times, Debian
several times, (and OpenBSD several years ago), in order to choose what
to abandon Windows in favour of. To say Ubuntu was a fucking shambles
would be to glorify it. I posted a very long explanation on the Ubuntu
forum's installation survey at the time. I chose Debian. Case closed.

> I'm just trying to understand what's commonly used. I feel like I'm
> missing something because I've heard it's desirable to use something
> other than mod_perl because 1) it's a bad idea to run Perl within the
> web server, and 2) web hosters may not make it available. But, looking
> around, looking around it's not clear to me what people are using.

Besides Michael's reply I can add:

o Re Apache's internal processing steps in constructing it's reply:
mod_perl offers the extreme example of allowing the programmer to
intervene in those steps. Hence it's the definitive tool if intervention
is appropriate. But is it always? Of course not. That's when FastCGI is
a reasonable alternative. My preference, however, is that since mod_perl
offers so much, there's no real need to use FastCGI at all. Even so, I'm
curious enough about FastCGI to study it, albeit briefly, so I can write
a little demo to satisfy myself, and then move up to mod_perl
permanently

o Yep, I decided, recently, to get a dedicated server too, although I
haven't actually done that yet. Bandwagons R Us! The other prompt was a
recent offer from my web hosting company (QuadraHosting via their
Australian office - recommended), of new shared and dedicated server
products. They run Centros as their OS, and call these services VPS:
Virtual Private Server. See:
http://www.quadrahosting.com.au/vps/linux-vps.html
for what we pay over here (shudder)

HTH.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Michael Peters
Mark Fuller wrote:

> I'm just trying to understand what's commonly used. I feel like I'm
> missing something because I've heard it's desirable to use something
> other than mod_perl because 

Well, I've heard... :)
Actually my opinions on this are actually based experience. I've been developing
and maintaining applications under mod_perl for at least 7 years.

> 1) it's a bad idea to run Perl within the
> web server, and 

Why? Embedding languages is a very common thing to do. Not just Perl in Apache
(or Python, Ruby, PHP, etc in Apache) but most Java application servers are the
same way.

> 2) web hosters may not make it available. 

Yes, it's true that a lot of simple web hosts don't allow mod_perl because it
means that you can actually mess up other people who are using mod_perl too in
the same server. But this is the same with mod_php too. It's not used very much
either.

But in all honesty, just buy a dedicated server. You can get a starter for
$30-50 a month and then you can put all the sites you want on it. And you won't
have to worry about asking the hosting provider to update some CPAN module or
install some library.

Sure you'll have to learn a few admin skills, but that's just more skills for
your resume (and even most dedicated servers come with a web admin panel). If I
had to pick between 2 people to hire who have similar skills and one has always
written apps that only run on shared servers but the other wrote for a dedicated
server. Guess which one I would hire?

-- 
Michael Peters
Plus Three, LP


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Mark Fuller
On Fri, Feb 22, 2008 at 5:04 PM, Ron Savage <[EMAIL PROTECTED]> wrote:
>  Here's a demo:

This might be better asked on Perlmonks, but do you have a feel for
how widely used is fastcgi? I got the impression it's not because the
CPAN module isn't easy to find. Searching CPAN for "fcgi" returns a
catalyst module (MojoMojo with a ridiculous version number) instead of
the real FCGI module[1]. The module hasn't been updated since 2002.

Have you looked at any other persistence tools? I've seen references
to speedyCGI (aka persistentPerl) and pperl (CPAN module). But, I get
the impression they're not widely used because they haven't been
updated in awhile. (2003 and 2004 respectively.). I couldn't compile
speedyCGI. (But, I noticed Ubuntu 7.10 has an installable module in
its repository.). I haven't tried pperl yet. It looks like it was
created because the author couldn't compile SpeedyCGI either.

I'm just trying to understand what's commonly used. I feel like I'm
missing something because I've heard it's desirable to use something
other than mod_perl because 1) it's a bad idea to run Perl within the
web server, and 2) web hosters may not make it available. But, looking
around, looking around it's not clear to me what people are using.

[1] http://search.cpan.org/~skimo/FCGI-0.67/FCGI.PL

Thanks,
Mark

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
On Thu, 2008-02-21 at 20:08 +0800, Silent wrote:

Hi Silent

Oops. I should mention the code has a few hard-coded paths
like /home/ron/... embedded here and there.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-23 Thread Ron Savage
On Thu, 2008-02-21 at 20:08 +0800, Silent wrote:

Hi Silent

Here's a demo:
http://savage.net.au/Perl-modules/CGI-Application-Test-Dispatch-1.00.tgz
Note: Test is used in the sense of testing my understanding of the
dispatch style of app design in order to write an app, not in the sense
of testing a pre-existing app. This module won't ever be on CPAN.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-21 Thread Silent
2008/2/21, David Steinbrunner <[EMAIL PROTECTED]>:
>
> Silent wrote:
>
> > has anyone use C-A-Dispatch with FastCGI ?
>
>
> 
>
>
> > 2. after search from google, I tryed:
> >
> >
> > #!/usr/bin/perl
> >
> > use lib ".";
> > use CGI::Fast qw(:standard);
> > use APP::Dispatch;
> > while (my $q = CGI::Fast ) {
> > APP::Dispatch->dispatch(
> > args_to_new => { QUERY => $q },
> >   );
> > }
>
>
> Looks comparable to code I have working with the exception of a new on the
> CGI::Fast call:
>
>   while ( my $q = CGI::Fast->new ) {
>
> I'm also sending a value in the default param of dispatch.  For you that
> value would likely be 'User'.
>
> Beyond those thoughts you might want to look into the debug param and work
> with it to see if any light can be shed on things.
>
> --
>
> David Steinbrunner
>
>
>

OMG, I am so careless,
thanks all !

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-21 Thread David Steinbrunner
Silent wrote:

> has anyone use C-A-Dispatch with FastCGI ?



> 2. after search from google, I tryed:
> 
> 
> #!/usr/bin/perl
> 
> use lib ".";
> use CGI::Fast qw(:standard);
> use APP::Dispatch;
> while (my $q = CGI::Fast ) {
> APP::Dispatch->dispatch(
> args_to_new => { QUERY => $q },
>   );
> }

Looks comparable to code I have working with the exception of a new on the
CGI::Fast call:

  while ( my $q = CGI::Fast->new ) {

I'm also sending a value in the default param of dispatch.  For you that
value would likely be 'User'.

Beyond those thoughts you might want to look into the debug param and work
with it to see if any light can be shed on things.

--
David Steinbrunner



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-21 Thread Ron Savage
On Thu, 2008-02-21 at 09:59 +0800, Silent wrote:

Hi Slient

> has anyone use C-A-Dispatch with FastCGI ?

I had no trouble using it. I can send my code it that helps.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




[cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-20 Thread Silent
Hi all,

has anyone use C-A-Dispatch with FastCGI ?
I can not make it work:

my code structure:
/APP/Base.pm   ### the base pm used by Admin/User
/APP/Admin.pm
/APP/User.pm
/APP/Dispatch.pm  ### the C-A-Dispatch table
app.fcgi

I have tryed "use base 'CGI::Application::FastCGI' "  in the Base.pm, but
the dispatch() not work, I always got the default app::run_mode

2. after search from google, I tryed:


#!/usr/bin/perl

use lib ".";
use CGI::Fast qw(:standard);
use APP::Dispatch;
while (my $q = CGI::Fast ) {
APP::Dispatch->dispatch(
args_to_new => { QUERY => $q },
  );
}

and use C-A in Base.pm
but the http header and run_mode output all dumped to apache error_log and
seems in a endless loop



needing help, thanks!

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####