Re: How to restart the root server from within modperl?

2003-08-14 Thread Dennis Stout
On a whim, I would try writing a second script to do the actual shutdown and restart of Apache. Then have your mod_perl program either run it in the background (with a &) or fork it into another process. Just a thought. Dennis S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshoot

Re: Variables

2003-07-21 Thread Dennis Stout
> > Is there a way I could get these variables populated on server start and never > > loaded again unless the database was changed? So in my subroutine for posting > > an event that changed it I could call "repopulate_queue_hash" and have it redo > > the hash, so changes still happened without a

Variables

2003-07-21 Thread Dennis Stout
In this project I'm making (database), I have several variables with a potential for a large amount of information to be held in them. They're all hashes. Some are hashes of hashes... There is a tech_list, which holds information about each technician. There is a queue_list which holds an ID and

Re: Values of an array..

2003-07-21 Thread Dennis Stout
> >"Dennis Stout" wrote ... > > my %user_list = get_users($where); > > > > foreach (keys %user_list) { > > my $user = $_; > > foreach (@{$user_list{$user}{DOMAIN}}) { > >

Re: Values of an array..

2003-07-21 Thread Dennis Stout
> shouldnt 'my $user' be outside the foreach loop? No, it's supposed to be changed each iteration through the loop. Basically it saves $_ to something else, so the next foreach loop doesn't overwrite it, since I need it's value as a key for the hash the next loop creates. Dennis

Values of an array..

2003-07-21 Thread Dennis Stout
I dunno if it's an array or a reference ot an array anymore, heh. Whats happening, is instead of this thing pulling all 3 of my domains from a database, it's pulling the first domain in the list as many times as I have domains for. So when I only had 2 domains in the db for myself, it listed hte

Re: does pnotes() work at all in 1.27?

2003-07-18 Thread Dennis Stout
> No progress yet. I just tested pnotes in the same handler and it works. > Tested it again by setting a value in the content handler and trying to > retreive it it my logging handler and no luck. It looks like I start work on finding out about your problem tonight instead of last night. Funny st

Re: does pnotes() work at all in 1.27?

2003-07-17 Thread Dennis Stout
> Has anyone gotten $r->pnotes() to work under Apache 1.3.27 and mod_perl > 1.27? A simple yes will do because then at least I'll know if it's my > mistake or a bug. I'll work on it when I get home again. weee, thursday, gotta have this project done monday.. *sigh* The good news, is that I run

Re: pnotes and notes not working from Apache::Registry to handler

2003-07-16 Thread Dennis Stout
> I'm trying to store data about a user who has authenticated in > $r->pnotes so that a perl logging phase handler can stick the user_id in > the db. I call $r->pnotes('keyname' => 'somevalue'); in an apache > registry script, and then call $r->pnotes('keyname') in the logging > handler later on du

Re: cookies

2003-07-16 Thread Dennis Stout
WOOO! I went to the ttms site, logged in, AND IT AUTHNTICATED ME AND GAVE ME PAGES!! :D Aight, is on me tonight :D I can't beleive it! 3 weeks on this bloody thing and I got it to finally Authenticat me =D Course, I had to disable things in order to get it

Re: cookies

2003-07-16 Thread Dennis Stout
> Cool dude. Now if you know why $r->pnotes() isn't working under > apache/modperl .27 you'll make my day! Got some source code to show me what you're doing with it? Otherwise I'll just have to cut and paste the mod_perl API book to you ;) hehehehe. Dennis

Re: cookies

2003-07-16 Thread Dennis Stout
the domain to something more sane again, like stout.dyndns.org. :P Dennis P.S. Does anyone else try to use Outlook Express like vi and get odd error messages after a days worth of coding? ----- Original Message - From: "Mark Maunder" <[EMAIL PROTECTED]> To: "Dennis Stout&

Re: cookies

2003-07-16 Thread Dennis Stout
kie as a value in and of itself, I've tried $cookie->{ttms_user} (the name of hte cookie is ttms_user), I've tried changing $cookie to %cookie and doing a $cookie{ttms_user} .. I might break down, declare this a bug, and use $ENV{HTTP_COOKIE} instead. Any ideas how to fix this to re

Re: cookies

2003-07-16 Thread Dennis Stout
hat the error was infact, in the dumbterminal called a win2k box I was using, and not in any actual code Dennis Stout - Original Message - From: "Dennis Stout" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 16, 2003 13 13 Subject: cookies

Re: cookies

2003-07-16 Thread Dennis Stout
> > One possibility: Check the -path option. It's supposed to set it to '/' > > by default if you dont specify it, but it doesn't. I discovered this > > about 20 minutes ago with a similar bug. So manually specify something > > like: > > my $cookie = Apache::Cookie->new($r, > >

cookies

2003-07-16 Thread Dennis Stout
Okay, so technically this isn't really "mod_perl" speific... but the cookie is being set with mod_perl and it's a huge mod_perl program being affected by this:) I have a cookie, the domain is set to .stout.dyndns.org (with the leading .). I set the cookie just fine now (thanks to those helping m

Re: [admin] please trim the quoted text in replies to a minimum

2003-07-14 Thread Dennis Stout
> Of course don't jump to the other exteme edge and overtrim. Use your common > sense as a guide to how much is enough to keep the sufficient context. I remember once upon a lot of bluemoons ago, in the days when FidoNet took place over phone line and 2400baud modems, when client readers would act

Re: must I use mod-perl

2003-07-13 Thread Dennis Stout
> > Install it if you have a lot of time. It took me week to config it and month > > for rewritting scripts. > > If you're using a system that has some sort of packages, then there are > probably mod_perl packages for it. Installing mod_perl on a Debian > GNU/Linux systems takes about as long as t

Re: mod_perl 2.0 and cookies

2003-07-11 Thread Dennis Stout
> So I've decided to dive headlong into 2.0. So far I like it but find the > documentation lacking and there seems to be a lot missing. I tried > Apache::Cookie with it, no dice. It gave an error to the effect that it > didn't know what "bootstrap" was (I think that was it). Apache::Cookie > made i

Re: select multiple

2003-07-10 Thread Dennis Stout
> >mod_perl and the methods available in the apache request object shuold beable > >to replace CGI.pm entirely, especially when you have a highly customized > >RequestHandler :/ > > > >Guess I'll see what happens, since I need cookie headers to work AND now > >multiple values for one param. > > Hav

Re: select multiple

2003-07-10 Thread Dennis Stout
aders to work AND now multiple values for one param. S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Message - From: "Chris Faust" <[EMAIL PROTECTED]> To: "Dennis Stout" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; &l

Fw: select multiple

2003-07-10 Thread Dennis Stout
This is the original email I sent out, regarding my multiple selects... S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Message - From: "Dennis Stout" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 10, 2003

Re: select multiple

2003-07-10 Thread Dennis Stout
> Because there is no way to create a delimiter that the potential data doesn't contain, the browser doesn't have the option to choose an arbitrary delimiter like a comma, or the like. So (though I can't speak for all browsers most will do the same) each value is passed with the same key, so your

Re: Apache config problem .. please help

2003-07-03 Thread Dennis Stout
> I made a simple mod_perl change to the config and when restarting Apache > I got this error: > (98)Address already in use: make_sock: could not bind to address > 0.0.0.0:2250 > no listening sockets available, shutting down > /usr/local/apache/bin/apachectl: line 87: 16512 Segmentation fault

Re: If (!$one_thing) {$other;}

2003-07-02 Thread Dennis Stout
> I think when I'm done and get this roled out, I'll work on making something > very similar but completely database driven. All the functions in the > dispatch table will be brought in through a single SQL statement called in an > eval context. This also means I can write a small subroutine to e

Re: If (!$one_thing) {$other;}

2003-07-02 Thread Dennis Stout
> On Wed, 2003-07-02 at 21:24, Dennis Stout wrote: > > > Okay, I put in some code to take the generated headers and enter them into > > the > > > body of the page. This had an odd effect. > > > > I bet I have a login problem. Whoops. logic problem. YA

Re: If (!$one_thing) {$other;}

2003-07-02 Thread Dennis Stout
> > Not likely. Your syntax looks okay to me. It probably isn't being > > called for some reason, or else $r is not what you think it is. Throw > > in some debug statements and find out what's actually happening there. > > > Okay, I put in some code to take the generated headers and enter them i

Re: If (!$one_thing) {$other;}

2003-07-02 Thread Dennis Stout
> Not likely. Your syntax looks okay to me. It probably isn't being > called for some reason, or else $r is not what you think it is. Throw > in some debug statements and find out what's actually happening there. Okay, I put in some code to take the generated headers and enter them into the bo

if (!$one_thing) { $other; }

2003-07-02 Thread Dennis Stout
I suppose the subroutine that makes the call to it would help too. I'll spare you all the dispatch routine as it's quite lengthy, but basically the DispatchTbl::* generates webpages dynamically depending on the uri caught by RequestHandler::handler();. sub post_login_form { my $state = sh

If (!$one_thing) {$other;}

2003-07-02 Thread Dennis Stout
This is irking me. $state preserves information about the request and so on. Now, $r->whatever_method works just fine.. EXCEPT for sending headers. When I visit my site, I get my nifty login page, and that is all. Always the login page. I telnetted into the thing to see what kinds of cookie st

Re: Please help newbie with Module problem.

2003-07-02 Thread Dennis Stout
You can send me- er, the "Help Dennis Move out of Alaska" charity money by giving your credit card number to *grin* Thank you, I'm sure Randy would agree when I say it's nice to be appreciated :) Dennis Stout S.T.O.U.T. = Synthetic Technician Optimized for Ult

Re: Please help newbie with Module problem.

2003-07-02 Thread Dennis Stout
> this, however the line $r->content-type('text/html'); seems to be > giving my compiler some problems. You could'nt just give me a hint on My mistake, shift key didn't get pressed hard enough =P $r->content_type('text/html'); Dennis

Re: Please help newbie with Module problem.

2003-07-02 Thread Dennis Stout
> however when I run the following code > > #!c:/perl/bin/perl -w > use Apache (); > use Apache::Request (); > use CGI::Carp qw(fatalsToBrowser); > my $r = Apache::Request->new(shift); > # my $apr = Apache::Request->new($r); > print "Content-type:text/html\n\n"; > print "Hello, World...\n"; > pri