Re: Server side programming PHP Vs CGI Vs modPerl
Hello all, Thanks for all ur reponses. With all ur suggestions and comparisons, I have decided to use mod_perl and also wrote a sample program on it which worked fine. I have installed apache-1.3.27 and mod_perl-1.27. Now I tried authenticating the user, where I have to maintain separate session for each user. When I saw how to do session management in mod_perl a module called Apache::Session was told. But when I tried it, that module was missing in my mod_perl. So I want to know, whether I have to download this module separately, or what version of mod_perl will it be available? Thanks in advance, Devi
Re: Server side programming PHP Vs CGI Vs modPerl
Hi! On Fri, Feb 14, 2003 at 03:52:35PM +0530, Devi .M wrote: Now I tried authenticating the user, where I have to maintain separate session for each user. When I saw how to do session management in mod_perl a module called Apache::Session was told. But when I tried it, that module was missing in my mod_perl. So I want to know, whether I have to download this module separately, or what version of mod_perl will it be available? You'll have to download Apache::Session (and probably a lot of other usefull modules) seperatly from CPAN, http://www.cpan.org (though I prefer http://search.cpan.org) Or, use the CPAN-shell that comes with Perl (as root) % cpan or % perl -MCPAN -eshell cpan install Apache::Session -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}
Re: Server side programming PHP Vs CGI Vs modPerl
On Fri, 14 Feb 2003, Devi .M wrote: Now I tried authenticating the user, where I have to maintain separate session for each user. When I saw how to do session management in mod_perl a module called Apache::Session was told. But when I tried it, that module was missing in my mod_perl. So I want to know, whether I have to download this module separately, or what version of mod_perl will it be available? Apache::Session is not shipped with mod_perl, but it is available from CPAN (http://search.cpan.org) Ciao, Valerio Valerio Paolini, http://130.136.3.200/~paolini -- Linux, the Cheap Chic for Computer Fashionistas
Re: Server side programming PHP Vs CGI Vs modPerl
On Fri, 14 Feb 2003 15:52:35 +0530 (IST) Devi .M [EMAIL PROTECTED] wrote: Hello all, Thanks for all ur reponses. With all ur suggestions and comparisons, I have decided to use mod_perl [...] Good! ;-) Now I tried authenticating the user, where I have to maintain separate session for each user. When I saw how to do session management in mod_perl a module called Apache::Session was told. But when I tried it, that module was missing in my mod_perl. So I want to know, whether I have to download this module separately, or what version of mod_perl will it be available? As you've read, currently Apache::Session is not shipped with mod_perl and have to be installed separately. Apache::Session is a persistence framework for session data. He not handles web sessions for you. For a transparent management you can: 1. Use an existent application server mod_perl-based that offers this capability like Apache::ASP, Ax-Kit, HTML::Mason or HTML::Embperl, etc... 2. If you prefer to write your own mod_perl modules, you can use Apache::SessionManager, a mod_perl module that helps session management of a web application by creating session object and making it available to all other handlers transparenlty (you can found it on CPAN). It is a wrapper around Apache::Session. By - Enrico
Re: Server side programming PHP Vs CGI Vs modPerl
On Fri, 14 Feb 2003, Thomas Klausner wrote: You'll have to download Apache::Session (and probably a lot of other usefull modules) seperatly from CPAN, http://www.cpan.org (though I prefer http://search.cpan.org) Thanks, I was able to install the Apache::Session. Now I wrote a program for authenticating the user. After authentication I have to redirect to another page,if the user and passwd is right. I am able to view my HTML page also correctly but below the page the following message is displayed. When I checked the error.log , there was no error thrown in it. Can anyone help me how to overcome this --- HTTP/1.1 200 OK Date: Sat, 15 Feb 2003 06:46:02 GMT Server: Apache/1.3.27 (Unix) mod_perl/1.27 Connection: close Content-Type: text/html Embedded Perl version v5.6.1 for Apache/1.3.27 (Unix) mod_perl/1.27 process 1614, running since Sat Feb 15 11:49:25 2003 Perl Configuration Loaded Modules Inheritance Tree Enabled mod_perl Hooks Environment PerlRequire'd Files Signal Handlers Symbol Table Dump ISA Tree Compiled Registry Scripts --- Thanks in advance, Devi.
Re: Server side programming PHP Vs CGI Vs modPerl
Hi! On Sat, Feb 15, 2003 at 12:07:28PM +0530, Devi .M wrote: After authentication I have to redirect to another page,if the user and passwd is right. I am able to view my HTML page also correctly but below the page the following message is displayed. When I checked the error.log , there was no error thrown in it. Can anyone help me how to overcome this --- HTTP/1.1 200 OK Date: Sat, 15 Feb 2003 06:46:02 GMT Server: Apache/1.3.27 (Unix) mod_perl/1.27 Connection: close Content-Type: text/html Embedded Perl version v5.6.1 for Apache/1.3.27 (Unix) mod_perl/1.27 process 1614, running since Sat Feb 15 11:49:25 2003 Perl Configuration Loaded Modules Inheritance Tree Enabled mod_perl Hooks Environment PerlRequire'd Files Signal Handlers Symbol Table Dump ISA Tree Compiled Registry Scripts --- This looks like the output of Apache::Status. Without further information about your configuration etc, help is hardly possible. Please read the mod_perl documentation at http://perl.apache.org and take an even closer look at http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}
Re: Server side programming PHP Vs CGI Vs modPerl
-BEGIN PGP SIGNED MESSAGE- Hash: MD5 DM Hello All, DM We have a server running in a Linux machine, now we would like to DM present the data in a browser using HTML interface. Can anyone suggest me DM which is the best one (CGI or PHP or modperl) to develop for web DM programming and also their advantages and differences to choose them as DM the best mod_perl, obviously: you posted to a mod_perl users' list. You might wish to have a look at the case-studies pages of http://perl.apache.org, as well as http://www.perl.org. As for PHP, it's not perl, so forget it :) This, though, is really not a suitable place to ask such questions. - -- Cheers Leemailto:[EMAIL PROTECTED] $$=qw$808273788400074285838400657879847269820080698276007265677569820727$; $$=~s$(\d\d)$\$_.=chr(\$1+32)$ge;eval; -BEGIN PGP SIGNATURE- Version: 2.6 iQCVAwUAPktikKdrfekeF/QBAQEDTAP/WI4HszlQypOFpmtZi+RIUc17nNMXfkbJ T86PNN9fq9mXip6w1dBVYj/tjpcS8gJA32LdylhuOaMrSaQSp4+oVbQQes36LJ+A /mJ6jk19tK6zirDMWj/7H3kvG39gTdx7gBfXhUloUvLD8R3G0jqJ1MU5XKVrqsWz EA2uRDvO6LA= =QrwP -END PGP SIGNATURE-
Re: Server side programming PHP Vs CGI Vs modPerl
DM Hello All, DM We have a server running in a Linux machine, now we would like to DM present the data in a browser using HTML interface. Can anyone suggest me DM which is the best one (CGI or PHP or modperl) to develop for web DM programming and also their advantages and differences to choose them as DM the best Depends on your requirements, which are not very clearly stated. Here's my head-up: CGI - simple, slow, I wouldn't recommend under any circumstances PHP4 - simple, fast, easy to learn, not as fully featured language as Perl. easy to install, cookies, sessions etc all easy out-of-the box. only for dynamic web pages - dont use it for data processing. easy to share one Apache server, multiple developers MOD_PERL - complex, fast, difficult to master for non-Perl programmers. lots of folks have problems installing /building - try yourself. Perl is a more fully-featured language, more general purpose can share web / data-processing classes and code We use PHP for complex interactive websites. We use Perl for data-processing. We plan on building our next generation ASP websites using mod_perl so that we can share code/classes between data-processing and the interactive sites. We have build a suite of system admin tools using mod_perl - this was much harder than the PHP development, but we are pleased with the results. You should join the PHP lists and compare the questions with those asked here - gives you an idea about some of the differences in the communities. Also consider the number of PHP4 v MOD_PERL development resources available. From: Lee Goddard mod_perl, obviously: you posted to a mod_perl users' list. You might wish to have a look at the case-studies pages of http://perl.apache.org, as well as http://www.perl.org. As for PHP, it's not perl, so forget it :) Sometimes you just need a toothpick, rather than a swiss-army chainsaw! 8-) my $0.02 Regards Jeff
Server side programming PHP Vs CGI Vs modPerl
Hello All, We have a server running in a Linux machine, now we would like to present the data in a browser using HTML interface. Can anyone suggest me which is the best one (CGI or PHP or modperl) to develop for web programming and also their advantages and differences to choose them as the best Thanks in advance, Devi.
Re: .cgi with ModPerl
ebay == ebay Jeff writes: ebay I am setting up a server so that all my scripts have .cgi extentions. ebay It would be nice if I could just add some directives in the httpd.conf ebay that will have all my virtual hosts use modPerl for any files with ebay either a .pl or a .cgi extention. The reason I prefer this method is ebay that I have a couple scripts that I load in my httpdocs directory (the ebay site home page is a script) So this is what I did: ebay Commented out: AddHandler cgi-script .cgi ebay Added the following: ebay IfModule mod_perl.c ebay Files ~ (\.pl|\.cgi) ebay SetHandler perl-script ebay PerlHandler Apache::PerlRun ebay Options +ExecCGI ebay allow from all ebay PerlSendHeader On ebay /Files ebay /IfModule try FilesMatch instead and see if that works ebay What I found is that when I only had this code only outside of the ebay VirtualHost configurations, my test script indicated .pl was running in ebay modPerl but .cgi wasn't. I only could get .cgi to run in mod_Perl by ebay copying this code inside of each of the VirtualHost configurations. ebay Obviously I'm not an Apache config expert but one thing that also struck ebay me strange is that while this code clearly indicates how to handle .pl ebay and .cgi file extentions, prior to adding this, I could not find ebay anywhere in httpd.conf where it maps .cgi files in this same way. The ebay only code I could find is AddHandler cgi-script .cgi but shouldn't there ebay be some additional corresponding code like PerlHandler Appache::Mod_CGI, ebay Options +ExecCGI, etc.?? Also, how does appache know which module to ebay use for ScriptAlias directories? I left the ScriptAlias directives in ebay for the cgi-bin director and didn't change them to just Alias directives ebay and it works fine but I guess that means a filematch directive overrides ebay a ScriptAlias directive? ebay A bit confused. Anyway, is the above method for achieving what I want ebay an acceptable and secure/safe way to handle it? ebay Thanks -- XEmacs Advocate | I've seen things you people wouldnt believe. FreeBSD Devote | Attack ships on fire of the shores of orion ... Perl Hacker | All those moments will be lost in time, Apache God | like tears in the rain. Time to die.. roy batty - bladerunner
.cgi with ModPerl
Title: Message I am setting up a server so that all my scripts have .cgi extentions. It would be nice if I could just add some directives in the httpd.conf that will have all my virtual hosts use modPerl for any files with either a .pl or a .cgi extention. The reason I prefer this method is that I have a couple scripts that I load in my httpdocs directory (the site home page is a script) So this is what I did: Commented out: AddHandler cgi-script .cgi Added the following: IfModule mod_perl.c Files ~ (\.pl|\.cgi) SetHandler perl-script PerlHandler Apache::PerlRun Options +ExecCGI allow from all PerlSendHeader On /Files/IfModule What I found is that when I only had this code only outside of the VirtualHost configurations, my test script indicated .pl was running in modPerl but .cgi wasn't. I only could get .cgi to run in mod_Perl bycopying this code inside of each of the VirtualHost configurations. Obviously I'm not an Apache config expert but one thing that also struck me strange is that while this code clearly indicates how to handle .pl and .cgi file extentions, prior to adding this, I could not find anywhere in httpd.conf where it maps .cgi files in this same way. The only code I could find is AddHandler cgi-script .cgi but shouldn't there be some additional corresponding code like PerlHandler Appache::Mod_CGI, Options +ExecCGI, etc.?? Also, how does appache know which module to use for ScriptAlias directories? I left the ScriptAlias directives in for the cgi-bin director and didn't change them to just Alias directives and it works fine but I guess that means a filematch directive overrides a ScriptAlias directive? A bit confused. Anyway, is the above method for achieving what I want an acceptable and secure/safe way to handle it? Thanks