Skip to content


Subversion checkout URL

You can clone with
Download ZIP
perl form parser cgi engine
Perl Perl6 HTML JavaScript CSS Shell
Tree: f2c89a19cf

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Perl forms parser.

Perl forms parser especially designed for easy creation of web applications 
working with relational databases. It take input form in any markup langage 
or text format with included pfp tags which control how get data from sql 
db and output it to client browser or stdout. Pfp can work as CGI or CLI 


Program need Perl and httpd (usaly apache) server installed on server.
Its need install additional Perl modules, take it from
    DBI, and any DBD::engine which you will use

For apache server the following config must be set:

    Setup cgi directory for pfp, you must enable rewrite engine in apache

	<Directory "/var/www/pfp">
	    SetEnv PFP_ROOT /var/www/hidden/
	    RewriteEngine on
	    RewriteBase /pfp
	    RewriteCond %{HTTP:Authorization} ^(.*)
	    RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]
	    AllowOverride All
	    Options ExecCGI FollowSymLinks
	    Order allow,deny
	    Allow from all

    Add script alias for service
	ScriptAliasMatch ^/pfp(\.[^\.]*)?($|\?.*) /var/www/pfp/nph-pfp$2
    You can setup universal match for all services, but I prefer use one line 
    for each service. So if you need add service under pfp, you must change 
    ^/pfp on your`s service name and add new line in config.
To be able to run parser under mod_perl need load mod_perl
    LoadModule perl_module /etc/httpd/modules/

and add to Directory directive two lines:
	    SetHandler perl-script
	    PerlResponseHandler ModPerl::Registry

Under mod_perl parser parse configs, forms and queryies only one time, or if 
files have been changed. Due this parser work faster and eats a lot of memory.
Conection to database is not persistents - each time parser proccess tags
it reconnects to db and reinitiates statements. 

Edit, set working directories in it

    WARNING. /var/www usaly is DocumentRoot for apache server, and placed separately 
    from ServerRoot. In the SERVER_ROOT mean ServerRoot directory of 
    apache. I usaly place ServerRoot in /var/www, and DocumentRoot in 
    /var/www/htdocs, remember this, or all your forms, template and sql queries 
    will be avalible directly through apache !

This way of installation program, and later projects under control of pfp, 
which use common structure of pfp directories, allows development of individual 
projects are not mixing them in a directory and keep these projects under git 
control, and allow commit that projects in git through the web for developers. 
You can see it in other pfp related projects (pfp::auth, pfp::common, pfp::ajax, 
later I will place this projects in github)

But you can setup pfp how you need, but it is on your own.

After install you can check its working at http://your server/pfp



This program is free software: you can redistribute it and/or modify it under 
the terms of the GNU General Public License as published by the Free Software 
Foundation, either version 2 of the License, or (at your option) any later 

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with 
this program If not, see
Something went wrong with that request. Please try again.