Having to restart browser to see changes to CGI

2004-07-25 Thread David Arnold
All, With the following entries in our httpd.conf, can anyone see any reason why we are having to close and reopen our browser to see any effect of the changes made to to /online_testing/perl/Quiz1Solns.cgi? # force reloading of modules # put use Apache::Reload in module you are developing PerlIn

Re: File Save As instead of context/plain

2004-07-24 Thread David Arnold
Randy, Good advice. Thanks. At 03:39 PM 7/24/04 -0500, Randy Kobes wrote: >On Sat, 24 Jul 2004, David Arnold wrote: > >> Randy, >> >> Changing the filename to junk.cgi worked. >> >> I definitely think that filenames *.pl are associated with something or >&g

Re: File Save As instead of context/plain

2004-07-24 Thread David Arnold
yellow ball. Does anyone know how I can search out this file association on Windows 95? At 03:06 PM 7/24/04 -0500, Randy Kobes wrote: >On Sat, 24 Jul 2004, David Arnold wrote: > >> All, >> >> I am battling the strangest behavior. I have been battling this off and o

Re: File Save As instead of context/plain

2004-07-24 Thread David Arnold
Jens, Nice idea. But it doesn't work. Same behavior. At 10:02 PM 7/24/04 +0200, Jens Gassmann wrote: >Hi Arnold, > > >Maybe delete the exit call at the end of you script. Read here why not >use exit under mod_perl > >Regards, >Jens > >http://perl.apache.org/docs/1.0/guide/porting.html#Terminatin

File Save As instead of context/plain

2004-07-24 Thread David Arnold
All, I am battling the strangest behavior. I have been battling this off and on every since I began experimenting with mod perl. I am currently working with: [Sat Jul 24 12:42:34 2004] [notice] SIGUSR1 received. Doing graceful restart [Sat Jul 24 12:42:34 2004] [notice] Apache/1.3.31 (Unix) mod_

Re: startup.pl file not working

2004-07-22 Thread David Arnold
;will not reload PerlRequire things. Maybe someone could correct me if >I'm wrong. >You could also test it using "apachectl configtest" and you should see >the output. > >Tom > >David Arnold wrote: >> All, >> >> I have this in conf/httpd.co

Adding more locations to INC in startup.pl

2004-07-22 Thread David Arnold
All, Is this OK? # File: startup.pl use lib qw(/home/darnold/modperl/); use lib qw(/usr/local/apache/module/); 1; Where I've mkdir the module directory in /usr/local/apache. Can't test at the moment until I figure out my last question. Thanks. -- Report problems: http://perl.apache.org/bugs

startup.pl file not working

2004-07-22 Thread David Arnold
All, I have this in conf/httpd.conf: # Startup File: PerlRequire /home/darnold/modperl/startup.pl And: [EMAIL PROTECTED] apache]# cat /home/darnold/modperl/startup.pl # File: startup.pl use lib qw(/home/darnold/modperl/); 1; However, I am getting this in my error log: Can't locate OnlineTest

multiple users on a single machine

2004-07-18 Thread David Arnold
All, We're writing a series of examinations that will be placed online. We anticipate that many students will use the computers in our academic support center (ASC) to take these examinations online. This means that it's possible that different students could enter our examination page from the sa

Re: Check boxes on and off

2004-07-14 Thread David Arnold
Ooops! Sorry all, wrong address. My apologies. At 11:31 AM 7/14/04 -0700, David Arnold wrote: >Don, Bruce, > >I adjusted the pdf and cgi. Now, when the form first comes up, a couple of >checkboxes are on. Then the cgi lights one up and turns one off. > >http://scinux.redwoods.

Check boxes on and off

2004-07-14 Thread David Arnold
Don, Bruce, I adjusted the pdf and cgi. Now, when the form first comes up, a couple of checkboxes are on. Then the cgi lights one up and turns one off. http://scinux.redwoods.edu/online_testing/GenerateFDF.pdf username: winnie password: thepooh The new cgi: #! /usr/local/bin/perl -w # File: Ge

Keeping username and password alive after authentication and authorization

2004-07-12 Thread David Arnold
All, Suppose that a user logs on (successfully) with username and password, where the logon process is handled by mod_perl. Now they open a page with a form, fill out the fields, then press the submit button. The form is handled by a second script. My question: How can the second script be made

httpd.conf secure?

2004-07-11 Thread David Arnold
All, Is httpd.conf secure? Would it be OK to store a password there? -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Re: Hmmmm....

2004-07-10 Thread David Arnold
t, I later concluded, with some help from Fred, it must be becuase of the line PerlModule ModPerl::Rules2 that I have in httpd.conf. At 10:51 PM 7/10/04 -0700, Stas Bekman wrote: >David Arnold wrote: > >did you actually look at the error message? > >> Can't use global $=

Re: Need a little help with this one

2004-07-10 Thread David Arnold
Fred et al, The FDFToolkit and reference is available at: http://partners.adobe.com/asn/acrobat/forms.jsp The documentation is sparse, to say the least, but: NextFieldName Gets the next field name. The difficulty, I believe, occurs before the program gets to NextFiledName, as if I make this ad

Need a little help with this one

2004-07-10 Thread David Arnold
All, I have a file /var/www/cgi-bin/tryit.cgi: #! /usr/local/bin/perl # tryit.pl use Acrobat::FDF; $inFDF=new Acrobat::FDF('-',$ENV{'CONTENT_LENGTH'}); my $currentField; my $currentValue; print("Content-type: text/plain\n\n"); $currentField=$inFDF->NextFieldName(""); while($currentField) {

Time and day based authorization

2004-07-10 Thread David Arnold
All, I have a sequence of files (maybe 40) that I want to serve. Each file must be served no earlier than a certain time and no later than a certain time. Each of these time-day restrictions will be unique for each file. I am curious if the members of this group could suggest an authorization str

Hmmmm....

2004-07-10 Thread David Arnold
All, I am not used to seeing this behavior, so I thought I'd ask. I make a change to my httpd.conf: PerlModule ModPerl::Rules2 SetHandler perl-script PerlHandler ModPerl::Rules2 PerlSendHeader On Then I try to restart server: [EMAIL PROTECTED] apache]# bin/apachectl gr

mutex

2004-07-10 Thread David Arnold
All, After installing Apache 1.3.31 and modperl 1.29 and starting the server, I have this in my error logs: [Sat Jul 10 13:46:53 2004] [notice] SIGHUP received. Attempting to restart [Sat Jul 10 13:46:54 2004] [notice] Apache/1.3.31 (Unix) mod_perl/1.29 configured -- resuming normal operations [

Re: My::Utils

2004-07-10 Thread David Arnold
Randy, Andy, et al, Thanks. At 02:09 PM 7/10/04 -0500, Randy Kobes wrote: >On Sat, 10 Jul 2004, David Arnold wrote: > >> Andy et al, >> >> That's what I thought, but I've searched the index and TOC >> and I simply cannot find a reference to authenticate

Re: My::Utils

2004-07-10 Thread David Arnold
Andy Armstrong wrote: >David Arnold wrote: > >> All, >> >> I've skipped to Recipe 13.3 on page 418 of the "Cookbook." >> >> Where can I find My::Utils and what does it do? Is it a previous package >> defined in the Cookbook? Or what? > &

My::Utils

2004-07-10 Thread David Arnold
All, I've skipped to Recipe 13.3 on page 418 of the "Cookbook." Where can I find My::Utils and what does it do? Is it a previous package defined in the Cookbook? Or what? Thanks. -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List

One and Two (followup)

2004-07-09 Thread David Arnold
All, Just a followup. I followed Stas's directions, and did this: % su % cd /usr/local/src % tar -zvxf apache_1.3.31.tar.gz % tar -zvxf mod_perl-1.29.tar.gz % cd mod_perl-1.29 % perl Makefile.PL APACHE_SRC=../apache_1.3.31/src \ DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 % make

One and Two again.

2004-07-09 Thread David Arnold
All, My apologies to Stas for again forgetting to "Reply All." Senior moments, I guess. Meanwhile, I have a successful installation of the latest apache and modperl2. I would like to install modperl1 for the purposes of practicing with the the excellent books by Stas, Geoffrey Young, and Lincoln

One and Two

2004-07-08 Thread David Arnold
All, Is it possible to install both versions of ModPerl (one and Two) on the same machine, accompanying versions of Apache? I'd like to experiment with both on Linux. I have the most recent version of apache running in /usr/local/apache2. Can I install the older version in /usr/local/apache? A

Windows Installation

2004-07-06 Thread David Arnold
All, I've got Apache and ModPerl running on a linux server at school, but I'd like to give both them a try on a windows machine (XP) at home. I've read a bit of the documentation on the modperl and apache site and have discovered all-in-one packages, etc, but I'd still like to ask advice. I have

mysql

2004-07-03 Thread David Arnold
All, What should I be reading if I want to learn how to use modperl 2.0 with mysql? -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Apache::File again

2004-07-03 Thread David Arnold
All, I tried to follow an earlier suggestion (http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__File_), but failed to figure out what to do. I have this: use Apache::File; And later this: my $fh=Apache::File->new($r->filename); unless($fh) { $log->warn("Cannot

Declaring constant

2004-07-03 Thread David Arnold
All, I don't believe I've seen this syntax before? use constant SECRET_LENGTH => 14; Anyone have any pointers to an explanation of this syntax? -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/m

Re: On-the-Fly

2004-07-03 Thread David Arnold
Stas et al, OK. Gave this a try: file:MyApache/BlockByIP.pm -- package MyApache::BlockByIP; use strict; use warnings; use Apache::RequestRec (); use Apache::Connection (); use Apache::Const -compile => qw(FORBIDDEN OK); my %bad_ips = map {$_

Re: On-the-Fly

2004-07-03 Thread David Arnold
Stas, Here's a little report to answer your questions below about my error_log: With: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

On-the-Fly

2004-07-03 Thread David Arnold
All, Tried this in my httpd.conf: PerlAccessHandler 'sub { return Apache::Constants::FORBIDDEN unless shift->connection->remote_ip=~m/^\Q10.3.4./; }' But got this error when I tried to resta

Apache::File

2004-07-03 Thread David Arnold
All, In modperl 2.0, what should I use in place of Apache::File? -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Cookbook Question

2004-07-02 Thread David Arnold
All, I am working on Recipe 3.4. I have the following saved as cgi-perl/try.pl: #! /usr/bin/perl -w # file: try.pl use strict; use Apache::Const qw(:common); my $r=shift; # Grab all of the headers at once my %headers_in=$r->headers_in; # or get a specific header and do something with it my $g

Re: Strange

2004-07-02 Thread David Arnold
Stas, >Again, do not test your modperl code w/o running modperl, which you accomplish >with help of Apache-Test. I did a little searching and saw very little on Apache-Test. Is it a current CVS project? If so, I've never participated or downloaded such a thing. However, you seem to think it wou

Re: Strange

2004-07-02 Thread David Arnold
Stas, >> package Apache::AuthAnon; >> # file: Apache/AuthAnon.pm >> >> use strict; >> use Apache::Constants qw(:common); >> >> my $email_pat='[EMAIL PROTECTED]'; >> my $anon_id="anonymous"; >> >> sub handler { >> my $r=shift; >> >> my($res,$sent_pwd)=$r->get_basic_auth_pw; >> retur

Strange

2004-07-02 Thread David Arnold
All, I get so confused keeping track of everything. I've got some modules that I swear checked for syntax a few days ago. Here's one that starts: package Apache::AuthAnon; # file: Apache/AuthAnon.pm use strict; use Apache::Constants qw(:common); my $email_pat='[EMAIL PROTECTED]'; my $anon_id="a

Anonymous login with Stein

2004-07-01 Thread David Arnold
All, I have this in my httpd.conf: PerlOptions +GlobalRequest AuthName Anonymous AuthType Basic PerlAuthenHandler Apache::AuthAnon require valid-user PerlSetVar Anonymous anonymous|anybody Here is the handler: package Apache::AuthAnon; # file: A

Re: Rocks.pm

2004-06-19 Thread David Arnold
intro/start_fast.html Thanks for everyone's help. At 06:51 PM 6/19/04 -0500, michael wrote: >David Arnold wrote: > > >> Stas, >> >> See my comment below, following yours. >> >[snip] >> >> It seems like I am following all of the directions.

Re: Adjustments for older Mod Perl

2004-06-19 Thread David Arnold
Stas et al, I got this to work today. Yesterday I updated Apache and Mod_perl and consequently I am having more success. At 11:36 PM 6/19/04 +0300, Stas Bekman wrote: >David Arnold wrote: >> All, >> >> I am working through: http://perl.apache.org/docs/1.0/guide/porting.h

Re: Rocks.pm

2004-06-19 Thread David Arnold
Stas, See my comment below, following yours. At 11:31 PM 6/19/04 +0300, Stas Bekman wrote: >David Arnold wrote: >> I wrote the file Rocks.pm as on >> http://perl.apache.org/docs/2.0/user/intro/start_fast.html. I put it here >> with these permissions. >> >>

Rocks.pm

2004-06-19 Thread David Arnold
I wrote the file Rocks.pm as on http://perl.apache.org/docs/2.0/user/intro/start_fast.html. I put it here with these permissions. [EMAIL PROTECTED] MyApache]$pwd /home/darnold/httpd/httpd-2.0/perl/MyApache [EMAIL PROTECTED] MyApache]$ll total 4 -rwxr-xr-x1 darnold darnold 296 Jun 19 11

Developer's Cookbook

2004-06-19 Thread David Arnold
All, After read section 2.2, pages 47-51, of "Mod_Perl, Developer's Cookbok," I set this in httpd.conf: PerlModule ModPerl::Registry Alias /cgi-perl/ "/usr/local/apache2/cgi-perl/" SetHandler perl-script PerlHandler ModPerl::Registry Options +ExecCGI PerlSendHe

Permissions and owner

2004-06-19 Thread David Arnold
All, I do this in httpd.conf: # David Arnold added these, 6/18/04, 11:33 pm LoadModule perl_module modules/mod_perl.so PerlModule Apache2 PerlModule Apache::compat # More changes by David Arnold, 6/19, 12:17 am PerlModule ModPerl::PerlRun Alias /cgi-perl/ "/usr/local/apache2/cgi

Yahoo!

2004-06-18 Thread David Arnold
All, Congrats to me! [EMAIL PROTECTED] logs]# cat error_log [Fri Jun 18 23:35:31 2004] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Fri Jun 18 23:35:34 2004] [notice] Digest: generating secret for digest authentication ... [Fri Jun 18 23:35:34 2004] [notice] Digest: done

Adjustments for older Mod Perl

2004-06-18 Thread David Arnold
All, I am working through: http://perl.apache.org/docs/1.0/guide/porting.html Under "The First Mystery" is the directive: Modify the httpd.conf file in the following way: PerlSetEnv PERLDB_OPTS "NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2" PerlModule Apache::DB PerlFixupHandle

Installation tomorrow

2004-06-17 Thread David Arnold
All, Tomorrow morning we will try to install SSL, MySQL, Apache, and Mod_Perl on a Red Hat 7.3 machine. If anyone has done this before and has some directions they saved that could serve as a guide, it would be much appreciated. Thanks. -- Report problems: http://perl.apache.org/bugs/ Mail lis

Re: A CGI.pm script

2004-06-14 Thread David Arnold
Larry, That was it. By setting STATE_DIR to the absolute path, the script now runs. Can folks on this list perhaps share a little discussion about methods I could use to "chdir to the right directory at script startup." It would help to see a sampling of idea. Thanks. :-) At 11:57 PM 6/14/04 -

A CGI.pm script

2004-06-14 Thread David Arnold
All, Running: [EMAIL PROTECTED] cgi-perl]# /usr/sbin/apachectl -v Server version: Apache/2.0.40 Server built: Nov 27 2003 11:04:06 MOD_PERL=mod_perl/1.99_07-dev I've added these changes to httpd.conf: ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" AllowOverride None Options None Ord

Updating Apache and Mod_Perl

2004-06-14 Thread David Arnold
All, I've been encouraged on this list to update my versions of Apache and mod_perl, which I think a good suggestion. However, I am no operating system guru (just a math teacher), so I get quite fearful with these updates. Still, I do have an office machine that is quite behind the times, operatin

Re: Refreshing

2004-06-14 Thread David Arnold
Ah, What is described in the link is exactly what I was doing, working on a module. Thanks. At 11:18 AM 6/14/04 +0300, you wrote: >William McKee wrote: >> On Sun, Jun 13, 2004 at 03:44:22PM -0700, David Arnold wrote: >> >>>When I am working on a cgi-script, sometim

Refreshing

2004-06-13 Thread David Arnold
All, When I am working on a cgi-script, sometimes I make a change, then "refresh" the script in my browser, only to not see the changes I made in the script. Is there some sort of "caching" going on with Apache? I've found that if I restart Apache my changes become visible on the next "refresh."

Re: Configuration problems

2004-06-11 Thread David Arnold
Stas, Oooh! that's easy. Just change one line of rocks.pl. That is, change print "Content-type: text/plain\n\n"; to print "Content-type: text/html\n\n"; And all is well. At 08:27 PM 6/11/04 -0700, you wrote: >David Arnold wrote: >[...] >>>>I plac

Re: Configuration problems

2004-06-11 Thread David Arnold
Stas, At 07:18 AM 6/11/04 -0700, you wrote: >David Arnold wrote: >> Neil, >> >> >>>Hello Sir >>>Don't know if you sort your problem out or not. >>>I had the same issue just yesterday our time ;-) >>>If you follow this: >

Re: Configuration problems

2004-06-10 Thread David Arnold
Neil, >Hello Sir >Don't know if you sort your problem out or not. >I had the same issue just yesterday our time ;-) >If you follow this: http://apache.perl.org/docs/2.0/user/intro/start_fast.html#Configuration > >Not the installation part and try the example scripts and Handler example then it wil

Configuration problems

2004-06-09 Thread David Arnold
Hi, I've spent quite a bit of time experimenting and reading, but I am unable to make progress with configuring mod_perl on our server. Please bear with me, as I am a mathemtaics teacher, not a system guru by any means. I am reading Paul Dubois's MySQL and Perl for the Web and I am stuck on page