[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifically, QUERY_STRING (WAS: RE: Pi3Perl - how to pass environment variables)



Toni Harbaugh-Blackford schrieb:
> 
> >
> > Toni Harbaugh-Blackford schrieb:
> > >
> > > Folks-
> > >
> > > I just picked the 'development' versions of Pi3Web and Pi3Perl, and
> > > implemented the sample hello.pl program to test the basic setup.  But
> > ^^^^
> > Hi, first a question (Sorry): Is there a sample configuration file shipped
> > with Pi3Perl? I just started with it and in vain looked for a working sample
> > configuration. Did I overlook something?
> 
> No, I was not clear.  I just read the top of hello.pl and tried the suggestion
> to add a 'Handle Pi3WebPerl...' line.  I had to modify it with a 'Condition',
> though, otherwise *all* my files ended up saying 'Hello, World'.  ;-D
> 
^^^^ Thanks, now I know. I'll make a handler object for this and I'll make it in
way to use both Pi3Perl and standard Perl scripts.

> >
> > > now I would like to be able to access a Pi3Perl script's environment
> > > via %ENV, and with the sample setup no environment variables are passed.
> > ^^^^
> > I'm also very new with Pi3Perl. So far as I know the embedded Perl interpreter
> > means that you can access the PIAPI's directly. But I think that you can use
> > the example how to access  server-variables (the common CGI-environment is just
> > copy of selected server variables). When you look into the auth.pl example,
> > you'll find how to lookup the field "Authorization" in the request-database.
> > Some more additional info you'll find in the server documentation too
> > (http://localhost/pidocs/)
> >
> 
> Ok, but how do I get the equivalent of the CGI 'QUERY_STRING' variable from
> the request-database?  I am not familiar with the format of the HTTP request
> header; which header line contains this information?  Basically, what string
> do I pass to PIDB_lookup instead of "Authorization"?
^^^^
I'll make a list of what I've found out ASAP. Then I'll call you back.
Look at the auth.pl once more. Compare the call of it from the config and the
script-variables. You can see some variables are read from database but other
global values like $AuthFile are set from corresponding config entries!
Sorry, must hurry now to be not to late at work.
> 
> > >
> > > Does someone have a Config file example for passing the environment to a
> > > Pi3Perl script?  If not, does the 'Pi3WebPerl' object support parameters
> > > like "IncludeParentsEnvironment", "EnvironmentSize", "Variable", etc.,
> > > as in the 'StandardCGI' object description?
> > ^^^^
> >Don't know the configuration of the Pi3WebPerl-object at this time, sorry.
> >But I think this is not your current problem. I think Pi3Perl needs another
> >approach than you got used to with standard CGI. (Correct English?)
> 
> Ok, I think I understand now.  Can someone point me to a good description
> of how to bread down HTTP request-headers in terms of CGI?
> 
> >
> > > I am new to Pi3Web Config file modification, so any help is appreciated.
> > ^^^^
> > Ask me again later. But from my point of view I can't see a configuration
> > problem on your side now. At the moment I have one.
> >--
> >with regards
> >Holger
> 
> Thanks, Holger
> 
> Toni Harbaugh-Blackford
> harbaugh@ncifcrf.gov


-- 
with regards
Holger

---------------------------------------------------------
Holger 'Zimpel' Zimmermann    Contact me:
---------------------------------------------------------
Wendishain                    tel./fax company: on demand
Germany                       tel./fax private: on demand
---------------------------------------------------------
homepage: http://home.t-online.de/home/zimpel/
web server: surf to it from my homepage (online every
            Sunday 20:00-24:00 GMT, start shifted again)
e-Mail:     zimpel@t-online.de
--------------------------------------------------------