[Catalyst] possible to get uri fragment?
see, for example I have some code like $c-log-debug(Dumper(\$c-req-uri)); in index sub, then I visit it as http://localhost:3000/#test what I can see in the debug console is $VAR1 = \bless( do{\(my $o = 'http://localhost:3000/')}, 'URI::http' ); so, is it possible to get 'test' in the URL? (it's mainly for some ajax using, jQuery address changes the things after # and we want to show page depends on things after # after sharing) Thanks -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: possible to get uri fragment?
hmm, it seems server can't get #fragment because the browser doesn't send it to server? so leave it. Thanks On Tue, Jun 15, 2010 at 4:47 PM, Fayland Lam fayl...@gmail.com wrote: see, for example I have some code like $c-log-debug(Dumper(\$c-req-uri)); in index sub, then I visit it as http://localhost:3000/#test what I can see in the debug console is $VAR1 = \bless( do{\(my $o = 'http://localhost:3000/')}, 'URI::http' ); so, is it possible to get 'test' in the URL? (it's mainly for some ajax using, jQuery address changes the things after # and we want to show page depends on things after # after sharing) Thanks -- Fayland Lam // http://www.fayland.org/ -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: Language selection in URLs
why shouldn't you use domain as the part of the language? like en.example.com, cn.example.com and something like that? Thanks. Octavian Râsnita wrote: From: Bill Moseley mose...@hank.org What's your preferred approach to specifying a language tag in a URL? Is there strong argument for one over the other? http://example.com/en_us/path/to/some/index.html # language prefix http://example.com/path/to/some/index.html?lang=en_us I prefer the former way because the URL looks nicer. (Not a very strong argument:) Are pages in different languages different resources or different versions of the same resource? In most cases I think it is the same content with a different presentation style, language... Obviously, the prefix is easier if you use relative URLs, but uri_for makes adding the query parameter easy. Although, probably could argue that the prefix approach is more efficient than wrapping uri_for for every generated link. There is an example on the Catalyst wiki for overriding prepare_path() in order to use urls like /en/path/to/another/file.html without needing to change all controllers. Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Catalyst benchmark 5.7 VS 5.8
I'm wondering if someone here did a benchmark between Catalyst 5.7 and 5.8 here is the result from our server: http://scsys.co.uk:8001/34323 the background is Catalyst 5.7011 VS Catalyst 5.80013 CPU: Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz RAM: 4G OS: Centos5 from the top, each httpd takes 20M more RAM in 5.8 compared with 5.7 5.7 PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 22979 apache16 0 167m 142m 4248 S 17.0 3.5 0:06.07 httpd 5.8 PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 24813 apache15 0 190m 165m 4000 S 15.6 4.1 0:02.56 httpd in this case, I really can't let my boss agree me to upgrade the Catalyst. is it normal? any thoughts? Thanks. -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: Catalyst benchmark 5.7 VS 5.8
Tomas Doran wrote: Fayland Lam wrote: from the top, each httpd takes 20M more RAM in 5.8 compared with 5.7 No, that'll be 20Mb of RAM _in total_, as all of those pages should be shared between your apache processes (given that you're preloading your application in the parent process). top totally doesn't show how much RAM is shared by copy on write at all, and so is misleading you here. do you know how to do a real benchmark? the siege result shows 5.7 is better under pressure. Thanks. Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: Catalyst benchmark 5.7 VS 5.8
Toby Corkindale wrote: (Apologies for top-posting.. have momentarily lost the option to change quoting styles it seems..) Fayland, I was looking at the benchmarks that you linked, and was just wondering which version of Perl you're running against? (CentOS 5 was one of the operating systems that came with the badly-patched Perl with the slow bless performance.. although I'm sure it's been patched by now? ie. http://blog.vipul.net/2008/08/24/redhat-perl-what-a-tragedy/ ) Thanks for your update. but it doesn't help on the benchmark since they are run on the same condition. so 5.7 is really better than 5.8 under siege. Thanks. Cheers, Toby - Original Message - From: Fayland Lam fayl...@gmail.com To: catalyst@lists.scsys.co.uk Sent: Mon, 28 Sep 2009 15:56:36 +1000 (EST) Subject: [Catalyst] Catalyst benchmark 5.7 VS 5.8 I'm wondering if someone here did a benchmark between Catalyst 5.7 and 5.8 here is the result from our server: http://scsys.co.uk:8001/34323 the background is Catalyst 5.7011 VS Catalyst 5.80013 CPU: Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz RAM: 4G OS: Centos5 from the top, each httpd takes 20M more RAM in 5.8 compared with 5.7 5.7 PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 22979 apache16 0 167m 142m 4248 S 17.0 3.5 0:06.07 httpd 5.8 PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 24813 apache15 0 190m 165m 4000 S 15.6 4.1 0:02.56 httpd in this case, I really can't let my boss agree me to upgrade the Catalyst. is it normal? any thoughts? Thanks. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: Catalyst benchmark 5.7 VS 5.8
Thanks for that. (Toby Corkindale too) I'll do more research and update you later. Thanks. Andrew Rodland wrote: On Monday 28 September 2009 12:56:36 am Fayland Lam wrote: I'm wondering if someone here did a benchmark between Catalyst 5.7 and 5.8 Benchmark, as requested. View this message at http://p3m.org/pfn/3499 if your mailer is too high-tech for fixed-width text. The Setup: Linux 2.6 OpenVZ, on Quad 2.2GHz Opteron. Perl 5.10.0 + debian patches. FastCGI via Apache 2.2, mpm_event, mod_fastcgi. The two test instances were running on the same machine, with the same perl and the same checkout of the app, but different local::lib directories. FastCGI was set to 10 processes. The page I was hitting was from a real checkout of a real production app, however it was the front page of the site, which is fairly light on dynamic content. I figured this was appropriate since it would better show any differences in Catalyst rather than spending a lot of time in the backend. The code still hits several models, 3 actions, and a view, but perhaps it was a little too fast since, as you'll see below, my throughput was ultimately limited by the number of running processes. Each instance was given a warmup run (the results of which were discarded) before the following tests were run. My tool collects statistics on the return status, but for all tests the returns were all 200 (success) so I've left out that row. || 20 requests/second (20 threads) for 60s | Metric|| Catalyst 5.7010 || Catalyst 5.8011 |===||==||== | Hits || 1200 || 1200 | Throughput|| 20.00 req/s || 20.00 req/s | Latency (mean)|| 0.072s || 0.074s | Latency (SD) || 0.013s || 0.017s | Latency (Q1-Q3) || 0.064 - 0.078s || 0.066 - 0.080s || 40 requests/second (40 threads) for 60s | Metric|| Catalyst 5.7010 || Catalyst 5.8011 |===||==||== | Hits || 2400 || 2400 | Throughput|| 40.00 req/s || 40.00 req/s | Latency (mean)|| 0.083s || 0.088s | Latency (SD) || 0.020s || 0.024s | Latency (Q1-Q3) || 0.069 - 0.095s || 0.072 - 0.100s || 80 requests/second (80 threads) for 60s | Metric|| Catalyst 5.7010 || Catalyst 5.8011 |===||==||== | Hits || 4675 || 4637 | Throughput|| 77.92 req/s || 77.28 req/s | Latency (mean)|| 0.688s || 0.708s | Latency (SD) || 0.178s || 0.187s | Latency (Q1-Q3) || 0.617 - 0.800s || 0.726 - 0.811s The difference between 5.7 and 5.8 in these results is consistently in favor of 5.7, but by a margin of between 0% and 5% which is not a whole lot in my book. By my unscientific measure (i.e. looking at top) of memory usage, 5.7 used 138MB of RAM (for fcgi-pm + 10x fcgi children) whereas 5.8 used 184MB, so that's a 33% expansion, which is a more significant issue. I have a feeling that most of that is shared, and so the difference wouldn't increase much with an increase in the number of processes, but I haven't investigated that yet. Questions? Andrew hobbs Rodland ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: How to clear off request parameter element
kakim...@tpg.com.au wrote: hi all I have an app with a listing method in the controller. It goes a little like this: sub list { # get object from model based on $c-request-param('id'); IF (object) { return; } ELSE { return all objects belonging to the current user; } return 1; } then , i have a deletion method which will delete a given object (by ID specific in a form via POST method) and list out all objects belonging to the current user. sub delete { # get specific object based on ID ($c-request-param('id');) #delete object $c-forward( 'list' ); } The problem here is that sub list will always call the $c-request-param('id'); which is no longer valid once an object has been deleted. What is the best way to delete the 'id' attribute off $c-request-param?? http://search.cpan.org/~mramberg/Catalyst-Runtime-5.71000/lib/Catalyst/Request.pm#$req-%3Eparam maybe you need $c-req-param('id', 0); Thanks. thank you. K. akimoto ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] about req.param
code as follows: sub test : Local { my ($self, $c) = @_; my $test = { a = $c-req-param('a'), b = $c-req-param('b'), c = $c-req-param('c'), }; $c-res-body(Dumper(\$test)); } when visit as test?b=1 it shows $VAR1 = \{ '1' = 'c', 'a' = 'b' }; hmm, a trap I think. need use $c-req-param('a') || ''. something not so good. -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: problem on $c-res-body(*STDOUT);
Matt Lawrence wrote: Fayland Lam wrote: sub test_body : Local { my ($self, $c) = @_; $c-res-body(*STDOUT); print a\n; print b\n; } Have you tried passing the glob as a reference? $c-res-body(\*STDOUT); It looks like that's at least part of your problem. I suspect that using filehandles in this way is not going to work as you expect and may have engine-specific problems, have you considered using $c-res-write as a substitute for print? mainly I want to use Benchmark in Catalyst Controller. so I guess I can't use res-write in this case. BTW, Thanks very much. \* is working perfect! Matt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] problem on $c-res-body(*STDOUT);
sub test_body : Local { my ($self, $c) = @_; $c-res-body(*STDOUT); print a\n; print b\n; } I get: a b HTTP/1.0 200 OK Cache-Control: no-cache, must-revalidate, max-age=0 Connection: keep-alive Date: Fri, 14 Mar 2008 02:58:50 GMT Pragma: no-cache Content-Length: 31 Set-Cookie: zorpia_session=6ef8f841a6f678e09621936e10c52f33eb442f57; path=/ Status: 200 X-Catalyst: 5.7012 *Catalyst::Engine::HTTP::Remote how to get the correct stuff. I tried to call $c-finalize_headers(); before -body, no help. Thanks. -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] looking for suggestion on both cron and pm
generally I do have several corn scripts. so I want to get $user both in MyApp and cron scripts. what I tried to do is soemthing like that: the first is a base module which contains schema cache and tt2 and others. package Foorum::Adaptor::Base; sub new { my $self = shift; my $params = {}; return bless $params = $self; } sub config { my $self = shift; return $self-{config} if ($self-{config}); my $config = LoadFile($path/../../../foorum.yml); my $extra_config = LoadFile($path/../../../foorum_local.yml); $config = { %$config, %$extra_config }; $self-{config} = $config; return $self-{config}; } sub schema { my $self = shift; return $self-{schema} if ($self-{schema}); my $config = $self-config(); $self-{schema} = Foorum::Schema-connect( $config-{dsn}, $config-{dsn_user}, $config-{dsn_pwd}, { AutoCommit = 1, RaiseError = 1, PrintError = 1 }, ); return $self-{schema}; } ... Check Attachment for more details. then a User adaptor module: package Foorum::Adaptor::User; use strict; use warnings; use base 'Foorum::Adaptor::Base'; sub get { my ( $c, $cond ) = @_; my $cache_key = 'user|' . Object::Signature::signature($cond); my $cache_val = $c-cache-get($cache_key); if ($cache_val) { return $cache_val; } $cache_val = get_user_from_db( $c, $cond ); return unless ($cache_val); $c-cache-set( $cache_key, $cache_val, 7200 );# two hours return $cache_val; } and others. more see attachment. at last: package Foorum::Model::User; use strict; use warnings; use base 'Catalyst::Model::Adaptor'; __PACKAGE__-config( class = 'Foorum::Adaptor::User' ); 1; so that we can do in MyApp: my $user = $c-model('User')-get( { username = $username } ); or cron script: use Foorum::Adaptor::User; my $user_model = new Foorum::Adaptor::User(); my $user = $user_model-get( { user_id = 1 } ); is those code correct? or there is another way to do it? Thanks. -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ package Foorum::Adaptor::Base; use strict; use warnings; use YAML qw/LoadFile/;# config use Foorum::Schema; # schema use TheSchwartz; # theschwartz use Template; # template use Template::Stash::XS; use File::Spec; use Cwd qw/abs_path/; my ( undef, $path ) = File::Spec-splitpath(__FILE__); sub new { my $self = shift; my $params = {}; return bless $params = $self; } sub base_path { my $self = shift; return $self-{path} if ( $self-{path} ); $self-{path} = abs_path($path/../../../); return $self-{path}; } sub config { my $self = shift; return $self-{config} if ($self-{config}); my $config = LoadFile($path/../../../foorum.yml); my $extra_config = LoadFile($path/../../../foorum_local.yml); $config = { %$config, %$extra_config }; $self-{config} = $config; return $self-{config}; } sub schema { my $self = shift; return $self-{schema} if ($self-{schema}); my $config = $self-config(); $self-{schema} = Foorum::Schema-connect( $config-{dsn}, $config-{dsn_user}, $config-{dsn_pwd}, { AutoCommit = 1, RaiseError = 1, PrintError = 1 }, ); return $self-{schema}; } *default_cache_backend = \cache; sub cache { my $self = shift; return $self-{cache} if ($self-{cache}); my $config = $self-config(); my %params = %{ $config-{cache}{backends}{default} }; my $class = delete $params{class}; eval(use $class;);## no critic (ProhibitStringyEval) unless ($@) { $self-{cache} = $class-new( \%params ); } return $self-{cache}; } sub theschwartz { my $self = shift; return $self-{theschwartz} if ($self-{theschwartz}); my $config = $self-config(); $self-{theschwartz} = TheSchwartz-new( databases = [ { dsn = $config-{theschwartz_dsn}, user = $config-{theschwartz_user} || $config-{dsn_user}, pass = $config-{theschwartz_pwd} || $config-{dsn_pwd}, } ], verbose = 0, ); return $self-{theschwartz}; } sub tt2 { my $self = shift; return $self-{tt2} if ($self-{tt2}); my $config = $self-config(); $self-{tt2} = Template-new( { INCLUDE_PATH = [$path/../../../templates], PRE_CHOMP= 1, POST_CHOMP = 1, STASH= Template::Stash::XS-new, } ); return $self-{tt2}; } sub error_log { my ( $self, $level, $text ) = @_; return unless ($text); my $schema = $self-schema(); $schema-resultset('LogError')-create( { level = $level || 'debug', text = $text, time = \'NOW()',#' } ); } 1; __END__ =pod =head1 NAME Foorum::Adaptor::Base - base module =head2 AUTHOR Fayland Lam fayland at gmail.com =cut package Foorum::Adaptor::User; use strict; use
[Catalyst] two Catalyst flaws
please don't blame me if I'm wrong here. just point it out and I'll apologize :-) the first is to load all modules at beginning. I want to ask why? for $c-forward()? I think $c-model() can load when called. why I hate this is because it eats too many memory. one of my App has 80+ pm then it takes 150+M. I can't afford that! the second one is hard to use model in cron pl. I know we can do something like my $c = MyApp-prepare(); or Catalyst::Model::Adaptor (trust me, that's not so easy or fast) why I can't get a simple $c without function forward, without req, without res. just get $c-model and $c-cache like? I don't want this $c to load any Controller modules or View modules. anyway, Catalyst is a great framework. it ease our development a lot. Thanks for all your work, Catalyst Team! -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: [RFC] Loading Plugins from lib/MyApp/Plugins
Christopher H. Laco wrote: Christopher Laco wrote: I know I've been down this thread before. When writing a framework that generates customized Catalyst apps, it would be a whole lot easier (well, more proper) to add plugins in lib/MyApp/Plugins, just like we do with controllers/models/view, than it is to molest the MyApp.pm 'use Catalyst' line to include custom plugins. I'm assuming that it's just a matter of tweaking the Module::Pluggable search paths at the appropriate time when Cat is starting up. Is this a planned feature for 5.8? Could it be? Yes, I'll volunteer to put some tuits on it if need be. -=Chris Just to keep the conversation rolling, let's put aside the Plugins directory for the moment. If you wanted to load plugins from config, what would you like to see? What would you need? 1. Load all plugins specifically from config, ignoring what's in MyApp.pm when specified? plugins: - ConfigLoader - Session - Session::State::Cookie - Session::Store::File - +MyApp::Plugin::Frobnisicate - Static::Simple ++; but ConfigLoader need to load config? generally we can do something like: # MyApp.pm use Catalyst qw/ConfigLoader/; __PACKAGE__-setup(); # this would load __PACKAGE__-config; if ( __PACKAGE__-config-{plugins} ) { __PACKAGE__-setup_plugins( __PACKAGE__-config-{plugins} ); } that's it I think. 2. Load plugins from a location? plugins: path: __path_to(lib, MyApp, Plugins) 3. Prepend/Append plugins to be loaded around MyApp.pm? plugins: prepend: - Debug append: - Static::Simple - +MyApp::Plugin::Foo -=Chris ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: Dreamhost help
damn it! I run perl dispatch.fcgi -d -l ~/foorumbbs.com/foorum.sock then I can visit my homepage NOW! Ashley Pond V wrote: You have to enable fastcgi in their panel, not in the .htaccess. Did you do that? Also, I learned the hard way. Always name your app script dispatch.fcgi. They are much more aggressive about killing long running processes with other names. Executables should be in 755 or better. IIRC DreamHost will not let any CGIs run (don't know about FCGIs) with anything more permissive than that. -Ashley On Dec 13, 2007, at 10:25 PM, Fayland Lam wrote: I run catalyst.pl TestApp then vim .htaccess AddHandler fastcgi-script .fcgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_URI} !^/?TestApp/script/testapp_fastcgi.fcgi RewriteRule ^(.*)$ TestApp/script/testapp_fastcgi.fcgi/$1 [PT,L] ~ I changed filename to fcgi and chmod 0777 it. then I get [Thu Dec 13 22:24:00 2007] [error] [client 123.14.76.87] FastCGI: comm with (dynamic) server /home/faylandfoorum/foorumbbs.com/TestApp/script/testapp_fastcgi.fcgi aborted: (first read) idle timeout (60 sec) [Thu Dec 13 22:24:00 2007] [error] [client 123.14.76.87] FastCGI: incomplete headers (0 bytes) received from server /home/faylandfoorum/foorumbbs.com/TestApp/script/testapp_fastcgi.fcgi any tips? anyone use dreamhost? -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: Dreamhost help
Ashley Pond V wrote: You have to enable fastcgi in their panel, not in the .htaccess. Did you do that? Also, I learned the hard way. Always name your app script dispatch.fcgi. They are much more aggressive about killing long running processes with other names. Executables should be in 755 or better. IIRC DreamHost will not let any CGIs run (don't know about FCGIs) with anything more permissive than that. -Ashley thanks for your reply. truly I did what u said. [spyro]$ ls -ls TestApp/script/ 4 -rwxr-xr-x 1 user group 1816 2007-12-13 23:27 dispatch.fcgi and then http://www.foorumbbs.com/test.fcgi is running so FastCGI is enabled. hmm. I have no idea what I should do with it. I just catalyst.pl TestApp, then change filename of fastcgi.pl. Any more help is appreciated. Thanks. On Dec 13, 2007, at 10:25 PM, Fayland Lam wrote: I run catalyst.pl TestApp then vim .htaccess AddHandler fastcgi-script .fcgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_URI} !^/?TestApp/script/testapp_fastcgi.fcgi RewriteRule ^(.*)$ TestApp/script/testapp_fastcgi.fcgi/$1 [PT,L] ~ I changed filename to fcgi and chmod 0777 it. then I get [Thu Dec 13 22:24:00 2007] [error] [client 123.14.76.87] FastCGI: comm with (dynamic) server /home/faylandfoorum/foorumbbs.com/TestApp/script/testapp_fastcgi.fcgi aborted: (first read) idle timeout (60 sec) [Thu Dec 13 22:24:00 2007] [error] [client 123.14.76.87] FastCGI: incomplete headers (0 bytes) received from server /home/faylandfoorum/foorumbbs.com/TestApp/script/testapp_fastcgi.fcgi any tips? anyone use dreamhost? -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] [OT] Search Solution
Sorry for a bit off topic. I just wonder how to build a search engine for a heavy traffic site? use KinoSearch or Plunce? or just get result from MySQL? how those big sites build their search engine? like facebook, hi5, digg? use SQL to get results instead of build a file index like KinoSearch? anyone have any idea? Thanks. -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: [OT] Search Solution
David Morel wrote: Le 8 nov. 07 à 10:25, Felix Antonius Wilhelm Ostmann a écrit : Other solution is Xapian Catalyst::Model::Xapian There was a discussion on this topic not so long ago. I suggest to have a look at the list archive, some interesting discussion went on at that time I searched http://lists.scsys.co.uk/pipermail/catalyst/, but don't find anything. could u tell me which month is it talked? Thanks. David Morel ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ -- Fayland Lam // http://www.fayland.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/