
To enable FastCGI, add the following rules to your .htaccess file:
<files ~ "\.cgim$">
sethandler fcgid-script
</files>
<files ~ "news_article\.cgi$">
sethandler fcgid-script
</files>
To change the number of iterations your scripts run for before terminating, set $Library_global::fcgi_max_iterations in your local.cnf file. The default is 100 iterations. This number should be less than or equal to the maximum number of iterations as set in your httpd.conf.
To convert an old CGI script to work with FastCGI, do the following:
&main(%params); with:
&Library_global::fcgi_main(sub {
&main(%params, fcgi_var=>$_[0]);
});
my ($exit); to the top of your main function.handle_cookies_sessions with:
$exit = &Library_global::handle_cookies_sessions(...);
if ($exit > 0) {
return;
}
login_user with:
$exit = &Library_global::login_user(...);
if ($exit > 0) {
return;
}
fcgi_object=>$params{'fcgi_var'} as a parameter to get_form_hash.exit; in main with return;.LunpaCMS supports profiling for both compilation time and page request runtime. To use this feature, set $Library_global::cgi_profiling = 1; in your local.cnf. To add profiling support to other scripts, use the code below.
&Library_global::fcgi_main(sub {
&Library_global::profile_compile(database=>$Library_phw::database, my_cnf=>$Library_phw::my_cnf);
&Library_global::profile_main(database=>$Library_phw::database, my_cnf=>$Library_phw::my_cnf, sub {
&main(admin=>0, force_ssl=>0, fcgi_var=>$_[0]);
});
});
|
Copyright © 2025 Peregrine Computer Consultants Corp. All rights reserved.
About Lunpa, our mascot. Her mother was a hamster and her father was an ill-tempered Chilean M00se. Oddly, neither smelt of elderberries. The artist is Jennifer Lomax. |
|
Add Your Comment