Question...

2002-02-12 Thread Ron Beck


Hello all,
I need to know how to clear the $ENV variables.  For example, I use a
.htaccess file for specific directories which requires the user to enter
userID and password.  When they exit the page, I want them to have to
re-enter userID and passwd if they enter the page again.  Does anyone
know how this is accomplished?

TIA,
Ron



Re: Knowing if a apache server is compiled with mod_perl

2001-09-17 Thread Ron Beck

You want to parse through the info returned from...

httpd -l

For example, here's my httpd -l...

trex% httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_setenvif.c

Hope this helps!
Ron


Mat wrote:
 
 Hi everyone,
I'd like to know if there is a simple way to find if an apache server
 is compiled with mod_perl and with which version. My aim is to write a
 script which compile mod_perl if it is not installed.
For the moment I've found only two ways, launch the actual server and
 telnet it to parse the server signature. But it has the disadvantages of
 having the Apache server running and the server signature on.
The other way  would be to get the return of httpd -v, but I won't
 have the version and I think this won't work if the module is compiled
 in dso.
 
So is it possible from the Apache binary to check mod_perl ?
 
 Cheers,
Mat



Re: cgi-lib.pl

2001-07-24 Thread Ron Beck

John,
A number of good suggestions came by regarding this.  Here's mine, use
the following in place of your cgi-bin.pl include...

use CGI qw(:cgi-lib :standard -debug);

This will allow you to use CGI.pm and have it default to the cgi-lib
commands you're used to.  The -debug statement will allow you to run
your scripts via command line and enter in the variable=value pairs
that you would normally send via html form.

Good luck and I hope this helps,
Ron

John Buwa wrote:
 
 Hello,
 
 I have a huge system i wrote using the cgi-lib.pl as its core. I
 attempted to integrate mod-perl with my system and all my cgi-lib.pl
 which are used via a require in all scripts returns errors. My dont
 work, if they do the act very strange and unacceptable.
 
 My question is how do i use cgi-lib.pl and mod-perl together? Is
 anyone doing this? How can it be done.
 
 Here is a common error in my log:
 
 [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine
 Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar
 se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7.
 
 Any info would be appreciated!
 
 John



Re: Questions Concerning Large Web-Site

2001-06-11 Thread Ron Beck


Is there a good tutorial or book on the subject of constructing Perl
modules?  I too have done some of this and would like to create actual
modules instead of required subroutines.

Ron

John Armstrong wrote:
 
 I'd convert each 'module' into a real Perl module( YourPackage::Search.pm
 etc ) and then configure it at the directory level.
 
 Location /search
 SetHandler perl-script
 PerlHandler YourPackageSpace::Search
 /Location
 
 Or you can just take your script and throw it into a single module's
 handler() routine :
 
 Location /
 SetHandler perl-script
 PerlHandler YourPackageSpace::YourNewModule
 /Location
 
 Your modules will be pre-compiled and your source is much more manageable in
 the future for other people involved in the project. I find it best to
 'break' the boundary between CGI and ModPerl by generally _not_ writing
 '.pl' scripts and instead moving everything into pure modules. It just makes
 the conceptual jump between CGI and mod perl much easier for newbies who
 join the team. I'm sure it has performance and integration impacts that I am
 not to knowledgeable on though.
 
 John-
 
 On 6/11/01 10:28 AM, Purcell, Scott [EMAIL PROTECTED] wrote:
 
  Hello,
  I have a large asset-management system that is web-based. In the past I have
  always used cgi and perl. I need to rewrite it so that it works with
  mod-perl or PerlEx
  Anyway, I used to tie my site together with a main, and a ton of requires
  (which required pages of subroutines). I would use a hidden variable to do
  the navigation. So each time the user hit something, I directed them back to
  the main and used a hidden variable to go spawn a different subroutine. So
  it was basically a nested application. The site got large (a lot of perl
  code, over 20,000 lines), and it got slow because each user ended up
  recompiling the code for each submit.
 
  Lately as I am thinking about rebuilding the site, but not using a nested
  config, but just offering each page to be its own perl file. So when the
  user submits for a search, I just point them at the search.pl file. Sounds
  simple enough, but I work alone, and do not know how the world builds large
  sites. I was hoping to hear some simple input from people who have
  architected good, sound sites, and was hoping for some good feedback, or
  some old sample code that I can study and find out how the other half live.
 
  I hope this is not asking too much, Any input would be most helpful.
 
  Sincerely
 
  Scott Purcell
 
 



Re: XMas printing benchmark

2000-12-29 Thread Ron Beck

Since when???

I've always done...
print"end_o_doc";
form action="../scripts/pgr_req03.cgi" method="post"
table border="0" cellpadding="0" cellspacing="0" width="100%"
tr
  td colspan="4"
div align="left"
  font face="Arial" size="4" color="#80"
   strongIndividual Requesting the Service:/strong
  /font
  br
  font face="Arial" size="2" color="#ff"
   em(Person filling out this form)/em
  /font
/div
  /td
/tr
tr
  tdRequestor's Name/td
  tdinput type="text" name="req_name" 
 value="$ldap_requestor{'fullname'}"/td
  tdRequestor's Employee #/td
  tdinput type="text" name="req_empno" 
 value="$ldap_requestor{'uid'}"/td
/tr
tr
  tdRequestor's Phone/td
  tdinput type="text" name="req_phone" 
 value="$ldap_requestor{'telephonenumber'}"/td
  tdRequestor's E-mail Address/td
  tdinput type="text" name="req_email" 
 value="$ldap_requestor{'mail'}"/td
/tr
end_o_doc
;

which works quite nicely and provides a very neat and indented source
page.  It also allows me to use quotes without an escape character.

The only thing you _MUST_ have in column 1 is the "end_o_doc" indicating
the end of the text.

Problems with this???
Ron


"Alexander Farber (EED)" wrote:
 
 Perrin Harkins wrote:
  I know it's not the point, but I'd consider it poor style if I saw someone
  using anything other than a HERE doc for the job you're testing.
 
 Why? With HERE you can't indent your code:
 
   my @text = (
 "!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"\n",
 "HTML\n",
 "  HEAD\n",
 "TITLE\n",
 "  Test page\n",



Re: WindowsNT Explorer like look and feel??

2000-04-18 Thread Ron Beck

I do not have a perl or mod_perl example.  However in my "Javascript
Manual of Style", there is an example of a WindowsNT Explorer like
navigator.  The code is too lengthy to post and I don't have it loaded
myself.

However, if you go to...

http://www.he.net/~marcj/mos/ch5a.htm

you can see an example of the program to see if that's the type of thing
you're looking for. It's really a pretty neat procedure and makes
navigating something like a manual very easy.

You can also contact the author of the book (and code), Marc Johnson
at...

http://www.he.net/~marcj/index.html

Perhaps a mod_perl procedure to build the javascript page which displays
the navigational information?

In any event, I hope this helps.

Regards,
Ron



Newbie help - mod_perl use

2000-04-10 Thread Ron Beck


Hello all,
I have built Apache 1.3.12 and mod_perl 1.22 and everything seems to be
running fine.  I have verified that mod_perl.c shows up as one of the
compiled-in modules.  How can I test or verify that my perl cgi scripts
are actually running via mod_ perl rather than simply executing?  Is
there a section in some document you can point me to?

Thanks  regards,
Ron



Re: Newbie help - mod_perl use

2000-04-10 Thread Ron Beck

What does the following do for you...

IfModule mod_perl.c
  Files *.pl
  SetHandler perl-script
  PerlHandler Apache::Registry
  Options ExecCGI
  /Files
/IfModule

The "Porting CGI Scripts" recommended including this in my httpd.conf
file.  I assumed it was so I didn't have to put all my scripts into a
single directory.  Is this not correct?

Ron

"J. Horner" wrote:
 
 On Mon, 10 Apr 2000, Ron Beck wrote:
 
 
  Hello all,
  I have built Apache 1.3.12 and mod_perl 1.22 and everything seems to be
  running fine.  I have verified that mod_perl.c shows up as one of the
  compiled-in modules.  How can I test or verify that my perl cgi scripts
  are actually running via mod_ perl rather than simply executing?  Is
  there a section in some document you can point me to?
 
 
 In order for you to get full mod_perl speed, you will need to put all of
 your mod_perl enabled cgi scripts into a directory and tell mod_perl to
 interpret that directory and all perl scripts contained within.
 Otherwise, you are just taking advantage of the built-in interpreter.
 
 Jon
 
 J. J. Horner
 Linux, Apache, Perl, Unix, Stronghold
 [EMAIL PROTECTED] http://www.knoxlug.org
 System has been up: 9 days.