Re: Attempt to free unreferenced scalar

2000-04-03 Thread Cliff Rayman

check out these previous posts:
http://www.geocrawler.com/search/?config=182&words=unreferenced+scalar

cliff rayman
genwax.com

Bill Moseley wrote:

> This message shows its ugly head now and then.
>
> I'm not sure what happens but every once in a while after sending a SIGUSR1
> or SIGHUP the "Attempt to free unreferenced scalar" messages start to fill
> up the error_log.
>
> The only way to stop them is to really SIGTERM the server and then restart it.
>
> I'm only assuming that this is mod_perl related.  The archives mentioned
> that this is probably caused by some problem in a xs module.  If that's
> true I can't imagine how to track it down in all the modules that are
> running on this mod_perl server.
>
> Does the fact that it takes really killing the server to make it stop and
> that a simple restart or graceful tends to start it happening give any
> hints to where the problem might be?
>
> BTW - does SIGTERM do a graceful shutdown?  We have been rotating with
> SIGUSR1, but then we sometimes find the error_log full of these messages in
> the morning.  We could rotate by killing the server and restarting, but I'd
> rather gracefully kill the server.
>
> Apache/1.3.9 (Unix) mod_perl/1.21 Perl 5.005_03
>
> Bill Moseley
> mailto:[EMAIL PROTECTED]




Re: How to keep "Connection: Keep-Alive"

2000-03-31 Thread Cliff Rayman

how are you sending your headers?
$r->send_cgi_header OR $r->send_http_header('text/html');

is the child that serves the request surviving or is it
dying directly after?

cliff rayman
genwax.com

Jaime Teng wrote:

> At 05:05 PM 3/31/00 -0800, Cliff Rayman wrote:
> >these are all generated thru embperl.
> >
> >cliff
> >
> >
>
> I guess i'll have to install HTML::Embperl to see if it solves my problem.
>
> Unless anyone can show me a solution using Apache::Registry
>
> i prefer to use strict perl program to generate the HTML pages.
> I grew accustomed to it already.
>
> jaime




Re: How to keep "Connection: Keep-Alive"

2000-03-31 Thread Cliff Rayman

these are all generated thru embperl.

cliff

Jaime Teng wrote:

> At 04:48 PM 3/31/00 -0800, Cliff Rayman wrote:
> >my pages end in '.htm' but they are
> >dynamically generated.
>
> ps.
>
> are these ".htm" generated by perl?
>
> you mentioned embperl... I dont use embperl.
> I strictly use a ".pl" file there must be an
> execution difference there making your situation
> different from mine.
>
> >
> >cliff rayman
> >genwax.com
> >
> >Jaime Teng wrote:
> >




Re: How to keep "Connection: Keep-Alive"

2000-03-31 Thread Cliff Rayman

here are my relevant httpd.conf settings
--- snip ---
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 50
MaxRequestsPerChild 300
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0


  
SetHandler  perl-script
PerlHandler HTML::Embperl
Options ExecCGI
  


PerlRequire conf/startup.pl
--- snip ---

cliff rayman
genwax.com


Jaime Teng wrote:

> At 04:48 PM 3/31/00 -0800, Cliff Rayman wrote:
> >my pages end in '.htm' but they are
> >dynamically generated.
>
> how'd you do it?
>
> can you send me a copy of your http.conf file?
> at least the ones that deals with the ".htm" file extensions
> and the server config group.
>
> what I have is:
>
> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 30
> MinSpareServers 3
> MaxSpareServers 5
> StartServers 3
> MaxClients 150
>
> 
> SetHandler perl-script
> PerlHandler Apache::Registry
> Options ExecCGI
> PerlSendHeader Off
>     PerlModule Apache::DBI
> 
>
> >
> >cliff rayman
> >genwax.com
> >
> >Jaime Teng wrote:
> >
> >> At 04:05 PM 3/31/00 -0800, Cliff Rayman wrote:
> >> >I just tested my keep-alive via telnet as you suggested.
> >> >I am using embperl and mod_perl.
> >> >I was able to make three separate requests on the same connection
> >> >without a problem.
> >> >
> >> >Here is a copy of one of the headers:
> >> >HTTP/1.1 200 OK
> >> >Date: Fri, 31 Mar 2000 23:59:53 GMT
> >> >Server: Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.8 OpenSSL/0.9.4
> >> >Set-Cookie: GWCUID=ad912cb7a7e771d1; domain=.genwax.com; path=/;
> >> expires=Friday,
> >> >31-Dec-2010 14:00:00 GMT
> >> >Content-Length: 26413
> >> >Keep-Alive: timeout=15, max=100
> >> >Connection: Keep-Alive
> >> >Content-Type: text/html; charset=iso-8859-1
> >> >
> >> >does yours come back with:
> >> >200 OK
> >> >Connection: Keep-Alive
> >> >Keep-Alive: timeout etc..  ??
> >>
> >> what were you fetching above? an html static page or a dynamic
> >> perl generated page? My problem is making connection keep-alive
> >> on perl generated pages.
> >>
> >> for static web pages yes i get same one like that
> >> but for dynamic perl generated pages (with PerlSendHeader On) I get:
> >> 200 OK
> >> Connection: Closed
> >>
> >> Of course I have to make my  wn http header when I set
> >> "PerlSendHeader Off" but with same effect
> >> connection is closed on dynamic perl generated pages.
> >>
> >> also, im sure the perl pages are executed as mod_perl as evident
> >> by the existence of the "my() subroutine problem" assosiated with
> >> Apache::Registry
> >>
> >> >
> >> >cliff rayman
> >> >genwax.com
> >> >
> >> >Jaime Teng wrote:
> >> >
> >> >> >Keep-Alive is a function of the web-server. There are no script changes
> >> >> >involved to keep a connection alive. All you have to do on the
> server side
> >> >> >is to enable Keep-Alive. See
> http://www.apache.org/docs/keepalive.html for
> >> >> >an explanation.
> >> >>
> >> >> The web servers (apache, IIS) already have the Keepalive setting on and
> >> >> properly keeps connection alive. The web server keeps the connection
> alive
> >> >> when the browser is fetching static HTML pages.
> >> >>
> >> >> Proof: telnet to fetch static document will remain open, ie, i can
> >> >> fetch as many static pages from one single telnet session without
> >> >> getting "connection to host lost" so long I specify
> >> >> "Connection: Keep-Alive" in the telnet session.
> >> >>
> >> >> BUT the connection dies when the browser is fetching dynamic mod_perl
> >> pages.
> >> >> This is where I would like to know if this is a perl/modperl issue or an
> >> >> apache/IIS issue.
> >> >>
> >> >> Proof: telnet to fetch the perl script will be closed after perl
> >> >> finished running the script, ie, I get "connection to host lost"
> >> >> immediately after the script finishes.
> >> >>
> >> >> is this a perl/modperl issue? where can i get docs to solve this?
> >> >>
> >> >> jaime
> >> >
> >




Re: How to keep "Connection: Keep-Alive"

2000-03-31 Thread Cliff Rayman

my pages end in '.htm' but they are
dynamically generated.

cliff rayman
genwax.com

Jaime Teng wrote:

> At 04:05 PM 3/31/00 -0800, Cliff Rayman wrote:
> >I just tested my keep-alive via telnet as you suggested.
> >I am using embperl and mod_perl.
> >I was able to make three separate requests on the same connection
> >without a problem.
> >
> >Here is a copy of one of the headers:
> >HTTP/1.1 200 OK
> >Date: Fri, 31 Mar 2000 23:59:53 GMT
> >Server: Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.8 OpenSSL/0.9.4
> >Set-Cookie: GWCUID=ad912cb7a7e771d1; domain=.genwax.com; path=/;
> expires=Friday,
> >31-Dec-2010 14:00:00 GMT
> >Content-Length: 26413
> >Keep-Alive: timeout=15, max=100
> >Connection: Keep-Alive
> >Content-Type: text/html; charset=iso-8859-1
> >
> >does yours come back with:
> >200 OK
> >Connection: Keep-Alive
> >Keep-Alive: timeout etc..  ??
>
> what were you fetching above? an html static page or a dynamic
> perl generated page? My problem is making connection keep-alive
> on perl generated pages.
>
> for static web pages yes i get same one like that
> but for dynamic perl generated pages (with PerlSendHeader On) I get:
> 200 OK
> Connection: Closed
>
> Of course I have to make my  wn http header when I set
> "PerlSendHeader Off" but with same effect
> connection is closed on dynamic perl generated pages.
>
> also, im sure the perl pages are executed as mod_perl as evident
> by the existence of the "my() subroutine problem" assosiated with
> Apache::Registry
>
> >
> >cliff rayman
> >genwax.com
> >
> >Jaime Teng wrote:
> >
> >> >Keep-Alive is a function of the web-server. There are no script changes
> >> >involved to keep a connection alive. All you have to do on the server side
> >> >is to enable Keep-Alive. See http://www.apache.org/docs/keepalive.html for
> >> >an explanation.
> >>
> >> The web servers (apache, IIS) already have the Keepalive setting on and
> >> properly keeps connection alive. The web server keeps the connection alive
> >> when the browser is fetching static HTML pages.
> >>
> >> Proof: telnet to fetch static document will remain open, ie, i can
> >> fetch as many static pages from one single telnet session without
> >> getting "connection to host lost" so long I specify
> >> "Connection: Keep-Alive" in the telnet session.
> >>
> >> BUT the connection dies when the browser is fetching dynamic mod_perl
> pages.
> >> This is where I would like to know if this is a perl/modperl issue or an
> >> apache/IIS issue.
> >>
> >> Proof: telnet to fetch the perl script will be closed after perl
> >> finished running the script, ie, I get "connection to host lost"
> >> immediately after the script finishes.
> >>
> >> is this a perl/modperl issue? where can i get docs to solve this?
> >>
> >> jaime
> >




Re: How to keep "Connection: Keep-Alive"

2000-03-31 Thread Cliff Rayman

I just tested my keep-alive via telnet as you suggested.
I am using embperl and mod_perl.
I was able to make three separate requests on the same connection
without a problem.

Here is a copy of one of the headers:
HTTP/1.1 200 OK
Date: Fri, 31 Mar 2000 23:59:53 GMT
Server: Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.8 OpenSSL/0.9.4
Set-Cookie: GWCUID=ad912cb7a7e771d1; domain=.genwax.com; path=/; expires=Friday,
31-Dec-2010 14:00:00 GMT
Content-Length: 26413
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

does yours come back with:
200 OK
Connection: Keep-Alive
Keep-Alive: timeout etc..  ??

cliff rayman
genwax.com

Jaime Teng wrote:

> >Keep-Alive is a function of the web-server. There are no script changes
> >involved to keep a connection alive. All you have to do on the server side
> >is to enable Keep-Alive. See http://www.apache.org/docs/keepalive.html for
> >an explanation.
>
> The web servers (apache, IIS) already have the Keepalive setting on and
> properly keeps connection alive. The web server keeps the connection alive
> when the browser is fetching static HTML pages.
>
> Proof: telnet to fetch static document will remain open, ie, i can
> fetch as many static pages from one single telnet session without
> getting "connection to host lost" so long I specify
> "Connection: Keep-Alive" in the telnet session.
>
> BUT the connection dies when the browser is fetching dynamic mod_perl pages.
> This is where I would like to know if this is a perl/modperl issue or an
> apache/IIS issue.
>
> Proof: telnet to fetch the perl script will be closed after perl
> finished running the script, ie, I get "connection to host lost"
> immediately after the script finishes.
>
> is this a perl/modperl issue? where can i get docs to solve this?
>
> jaime




Re: httpd coredumps

2000-03-31 Thread Cliff Rayman

was everything compiled from scratch with the same compiler?

cliff rayman
genwax.com

Tobias Brox wrote:

> I've installed perl 5.6.0 + Apache 1.3.12 + modperl 1.22.
>
> An arbitrary request causes the httpd to core dump:
>
> $ telnet localhost 80
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET / HTTP/1.0
>
> Connection closed by foreign host.
>
> This gets into the error log:
> [Fri Mar 31 16:23:31 2000] [notice] child pid 19804 exit signal Segmentation fault 
>(11)
>
> pid 19804 belonged to an httpd-instance.
>
> This happens with a clean installation, so it can't be in any of my
> scripts.  I've tried building without any other modules than mod_perl,
> and I've tried building with all the modules I want except mod_perl.
> Turning on and off the "AddModule mod_perl.c" line also affects this
> issue ... so it must be a mod_perl issue as far as I can see.
>
> Any suggestions?  I've been fighting with this issue for several days
> now, if I can't resolve this one fairly quick I'll go for fastcgi
> instead...
>
> --
> Tobias Brox (alias TobiX) - sysguy - +4722925871 - http://www.funcom.com/
> If an _urgent_ email is not acted upon within 10 minutes, you might try
> a _short_ mail to [EMAIL PROTECTED]




Re: Conditional compilation

2000-03-31 Thread Cliff Rayman

how about:

require Module;

cliff

Shevek wrote:

> I run a server with a lot of modules, each of which defines a handler for
> one file type, processor or output type.
>
> Loading all of these immediately any new child starts is not cheap. Is
> there any way to do a conditional 'use' on demand of these modules, as I
> may serve a lot of requests without using any given module.
>
> Currently I just 'use' everything at the top of my main handler script,
> which is always invoked for any request.
>
> Ta.
>
> S.
>
> --
> Shevek
> GM/CS/MU -d+ H+>++ s+: !g p2 au0 !a w+++ v-(---) C$ UL$ UB+
> US+++$ UI+++$ P++> L$ 3+ E--- N K- !W(-) M(-) !V -po+ Y+
> t+ 5++ !j !R G' !tv b+++ D++ B--- e+ u+* h++ f? r++ n y?
> Recent UH+>++ UO+ UC++ U?+++ UV++ and collecting.




Re: [RFC] holding a mod_perl conference

2000-03-31 Thread Cliff Rayman

Easy to get people to pay to be tutored by gurus.
add Gerald Richter to the list since i use embperl at my
place.

sign me up right now if you can get their participation.



"J. Horner" wrote:

> On Fri, 31 Mar 2000, Bill Jones wrote:
>
> > How about calling it 'WebDev Scripting Conference' ?
>
> That doesn't mean it is a server-side centric conference.  Under that
> title, JavaScript and ActiveX fit.
>
> > Cover these key technologies:  mod_perl, php, expect (tcl-lets),
> > python (these four primarily) - then maybe some smaller side tracks
> > with general perl, basic java, etc.  We wouldn't want the main
> > corporate sponsors clouding the conference theme with 'what else'
> > are they were doing - other than what this conference was about...
>
> I agree.  The big names (Sun, Microsoft, whoever) could really crowd the
> issues with stuff like new Windows Scripting hosts, or Solaris' ability
> with Javascript, or even a Win2krap banner.
>
> > I feel this would a great idea, especially since the Apache
> > conference struck me as being attended by a lot of
> > more advanced users than I expected, for one, and they were
> > asking a few questions the conference speakers either couldn't
> > answer or choose not to answer.  I feel a more direct technology
> > oriented conference covering a main track of Server-side
> > Scripting and application development dynamics.
>
> If all things were equal, I would want just a 1 week session in some hotel
> somewhere with Stein, MacEachern, Schwartz, or Wall in a kind of
> beer-pizza coding session binge.  Get about 50 or so together with a
> big screen, some computers, and a few web servers and let us choose from
> some projects ("Developing handlers for the life cycle stages for custom
> webserver design", or "Using mod_perl to create a more secure web server",
> etc).  Those are the kind of things I'm interested in.  I want real world
> examples focused on things in which I am interested.  I don't want a "3
> lines to 'Hello World'" feel.  In short, I want in depth coverage of
> mod_perl.  I couldn't attend the ApacheCon, but I think I can convince my
> boss to pay for this one.
>
> > I myself would be interested in some 'boot cap' courses in
> > scripting combat design - in the trenches - how to take a
> > CGI-based application and effectively and quickly transform it
> > into a mod_cgi based application; something covering more concrete
> > real world designs and pitfalls, plus maybe a porting shop session where
> > people (attendees) can bring in their "I have this, it's a CGI, but I would
> > like it to be a mo_perl centric application..."
>
> I agree.  The shops are an interesting idea.  One on one with some good
> minds always fits the bill.
>
> J. J. Horner
> Linux, Apache, Perl, Unix, Stronghold
> [EMAIL PROTECTED] http://www.knoxlug.org
> System has been up: 8 days.




Re: [RFC] holding a mod_perl conference

2000-03-30 Thread Cliff Rayman

if you bring in all sorts of other technologies,
how is this different than being part of apacheCon
or Perl Conference?

at least when I go to those (if i have time), almost
everything else at the conference has some interest for
me.  i have only a modicum of interest in python, cold fusion
and the like.

either make a mod_perl ONLY conference or stay attached to ApacheCon
or the Perl Conference.

cliff rayman
genwax.com

"J. Horner" wrote:

> On Thu, 30 Mar 2000, Stas Bekman wrote:
>
> > First of all, why holding yet another conference, the answer is
> > simple, we want mod_perl to be in the center of the event and not a
> > side project. Think about Perl Conference -- mod_perl is just a little
> > part of the Apache track. Think about ApacheCon -- mod_perl is again
> > just a drop in a ocean.
> >
> 
> >
> > The rest are full tracks dedicated for each technology, so if I want
> > to learn mod_perl I'd spend all the days listening to mod_perl
> > speakers so when the conference is over I'll go back with a bag full
> > of tricks and a very good push to get me going when I'll start coding
> > myself. Having a dedicated track will allow to provide all the
> > information that generally being skipped due to the lack of time.
> >
>
> I like the idea of mod_perl being the center of attention.  There are
> aspects of mod_perl in which I am very weak.  I'm wondering if this will
> fit the bill, though.
>
> In this scenario, we will have a conference with only partial interest in
> mod_perl.  With all of these other technologies, we will be able to bring
> in funding and support from some big names (possibly Sun, Allaire, etc),
> but we still only have a small piece of the pie.  We will have, in effect,
> a cluster of conferences.  Also, we will need space for each and every
> faction attending (a mod_perl conference room, a Cold Fusion conference
> room, a Java area, etc).
>
> Is this feasible?  Will this solve the problem?  I don't imagine a large
> amount of cooperation from competing vendors.
>
> Rebuttal?
>
> J. J. Horner
> Linux, Apache, Perl, Unix, Stronghold
> [EMAIL PROTECTED] http://www.knoxlug.org
> System has been up: 8 days.




Re: performance mongers: since when is using CGI.pm or Apache::Registry dishonorable?

2000-03-29 Thread Cliff Rayman

i think anyone who is not writing their own custom kernel in direct machine code

to handle all requests directly from the NIC is a lamer.  but that's just mee.

sorry for the extra e on the end of mee but 0111 is too many switches to
throw
just to get a backspace. :-)

cliff rayman
genwax.com

Matt Arnold wrote:

> Many messages on this list perpetuate the notion that usage of CGI.pm and
> Apache::Registry is for beginners.  Popular opinion is that you're not a
> leet mod_perl h@x0r until you wean yourself from CGI.pm and Apache::Registry
> and "graduate" to the Apache API.  With this in mind, there have been many
> messages over the years making blanket statements along the lines of "CGI.pm
> is evil" and/or "Apache::Registry sux".  I'm trying to identify the source
> of this disatisfaction.  While it may seem that my intent is to start the
> ultimate, end-all CGI.pm/Apache::Registry flame war, please be assured that
> I am interested in ferreting out the real issues.  :-)
>
> Anyway, in hope of generating some debate, I'll make some (potentially
> inflammatory) assertions:
>
> 1. An Apache handler doesn't mean CGI.pm *ISN'T* in use
>
> The "Apache::Registry sux" crowd claims I should forgo Apache::Registry and
> write handlers instead.  Okay, here's my handler:
>
>   # in httpd.conf
>   
> SetHandler perl-script
> PerlHandler Apache::Foo
>   
>
>   package Apache::Foo;
>   use strict;
>   use CGI ();
>   sub handler {
> my $q = CGI->new;
> print $q->header;
> print "Hello World\n";
> 200;
>   }
>   1;
>
> Satisfied?  No Apache::Registry in use here.  Am I a l33t h@x0r now?  No?
> Why not?  Oh, so when the zealots say, "Apache::Registry sux, write handlers
> instead" they really mean I should be using the Apache API instead of
> CGI.pm.  I see.
>
> I have another beef with the "CGI emulation sux, avoid Apache::Registry"
> crowd.  And that is:
>
> 2. Just because you don't use Apache::Registry doesn't mean you're not doing
> CGI emulation (*gasp*)
>
> What exactly is this "evil, bloated, slow CGI emulation" that everyone's
> trying to avoid?  Is it the overheard of setting up all the environment
> variables?  Well, gee whiz, regular handlers do this too unless you tell
> them not to.  Try the following exercise:
>
>   
> #PerlSetupEnv Off  # try first without; then try with PerlSetupEnv Off
> SetHandler perl-script
> PerlHandler Apache::Env
>   
>
>   package Apache::Env;
>   use strict;
>   use Data::Dumper qw(Dumper);
>   sub handler {
> my $r = shift;
> $r->content_type('text/plain');
> $r->send_http_header;
> $r->print(Dumper(\%ENV));
> 200;
>   }
>   1;
>
> So let's not be so quick to curse Apache::Registry for it's "slow" CGI
> emulation.  Your "fast" handlers are probably doing the same thing
> unbeknownst to you.
>
> Another assertion:
>
> 3. Using Apache::Registry doesn't necessarily mean CGI.pm is at use
>
> It seems the "Apache::Registry sux" crowd dislikes Apache::Registry because
> it implies that CGI.pm is in use.  Perhaps their real gripe is one should
> use the Apache API instead of CGI.pm's methods.  So how would they feel
> about this:
>
>   # in httpd.conf
>   
> PerlSetupEnv Off  # we don't need no stinking ENV
> SetHandler perl-script
> PerlHandler Apache::Registry  # or Apache::RegistryNG->handler
> Options +ExecCGI
>   
>
>   #!/usr/local/bin/perl -w
>   use strict;
>   my $r = Apache->request;
>   $r->content_type("text/html");
>   $r->send_http_header;
>   $r->print("Hi There!");
>
> Does this count?  Am I a l33t h@x0r because I used the Apache API?  Or am I
> still a lamer for using Apache::Registry?
>
> I can hear the hordes out there crying, "Why use Apache::Registry if you're
> not using CGI.pm?"  Well, perhaps I have a couple hundred scripts and don't
> want to maintain several hundred  directives in httpd.conf.  Maybe
> I like Apache::Registry's convenient way of grabbing my script, wrapping it
> into a handler on-the-fly, and serving it up.  Isn't this one of the handier
> features of Apache::Registry?  (Note: I'd like to hear of alternatives to
> Apache::Registry[BB|NG] for doing this.)
>
> So maybe Apache::Registry isn't pure evil after all.  So perhaps the zealots
> clarify their mantra to be simply "CGI.pm sux".  That leads us to the next
> assertion.
>
> 4. Using CG

Re: getting mod_perl working

2000-03-29 Thread Cliff Rayman

Anything in the error_log?

cliff rayman
genwax.com

Quadrilateral I was wrote:

> I've been trying to get ePerl installed on a redhat system, and I seem to
> have narrowed it down to a problem with mod_perl and/or apache. Whenever I
> add a PerlModule statement to httpd.conf and try to restart httpd, it won't
> run. Doesn't give me any error messages--it just refuses to work. I've
> tried it with both 'PerlModule Apache::Status' and 'PerlModule
> Apache::ePerl', and I've also tried it on two different systems--both
> running apache 1.3.9 and mod_perl 1.21, freshly installed. Any idea what I
> could be doing wrong?
>
> Joel Young  .  . . .::.: * .  . .We're all mad here.
> <[EMAIL PROTECTED]>   *   **  '  'I'm mad.
> <http://lo.res.cmu.edu/reverie/> '   You're mad.




Re: Embperl configuration problem

2000-02-14 Thread Cliff Rayman

Your root Location directives are overriding your cgi-bin Location.
You set your embperl to skip all files but the ehtml, but that means
it does nothing with the .pl files.

Try this instead for the root Location.


   
SetHandler perl-script
PerlHandler HTML::Embperl
Options ExecCGI
   


cliff rayman
genwax.com

Jasper Wong wrote:

>
> ...
> Alias /cgi-bin/ "/abc/cgi-bin/"
> 
> SetHandler perl-script
> PerlHandler Apache::Registry
> Options ExecCGI
> PerlSendHeader On
> 
> 
> SetHandler perl-script
> PerlHandler HTML::Embperl
> PerlSetEnv EMBPERL_FILESMATCH "\.ehtml"
> Options ExecCGI
> 
> ...
> ...
>
> Here's the problem: this setup works fine for my embperl pages, but the
> perl files (*.pl)  in /cgi-bin fail to run and return as text files
> to the web browser.
> If I comment out the embperl section (comment out the whole )
> then the perl files in /cgi-bin work fine. What am I doing wrong?
> Comments are greatly appreciated. Thanks in advance.
>
> Best Regards,
> Jasper
>
> [EMAIL PROTECTED]



Re: [HTML::Embperl] It's late and I'm getting a very odd error

2000-02-10 Thread Cliff Rayman

try:
[! use Apache::StoreFront; !]

notice the semicolon.
gerald has written about this before so you can
find more details in the archives.

cliff rayman
genwax.com

Jason Bodnar wrote:

> I'm losing it. I've written applications like this countless times but I'm
> doing something wrong.
>
> I've got a module called Apache::StoreFront. Right now it consists of:
>
> package Apache::StoreFront;
>
> 1;
>
> There's more to it but I've cut it out to simplify things. It's in
> /$SERVER_ROOT/lib/perl/Apache
>
> I have an embperl page that consists of:
>
> [# MODULES #]
> [! use Apache::StoreFront !]
>
> 
> 
> Hello World!
> 
> 
>
> When I go to the page I get the following error:
>
> [5602]ERR: 24: Line 2: Error in Perl code: syntax error at
> /opt/apache/dw3.tivoli.com/81/lib/perl/Apache/StoreFront.pm line 1, near
> "package
> Apache::StoreFront"
> BEGIN failed--compilation aborted (in cleanup) syntax error at
> /opt/apache/dw3.tivoli.com/81/lib/perl/Apache/StoreFront.pm line 1, near
> "package Apache::StoreFront"
> BEGIN failed--compilation aborted at
> /opt/apache/dw3.tivoli.com/81/htdocs/home/people/orgchart/test.phtml line 2.
>
> Apache is configured correctly because other embperl stuff works so please
> point out some incredibly stupid mistake so I can shoot myself and then finish
> this project.
>
> Oh yeah, if all goes well and management doesn't hassle me, mod_perl will have
> a shopping cart system for use with embedded perl languages.
>
> Thanks for your help.
> ---
> Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems
>
> That boy wouldn't know the difference between the Internet and a hair net. --
> Jason Bodnar



Re: [HTML::Embperl] last and next with [$ while $]?

2000-02-08 Thread Cliff Rayman

you cannot use 'last' with embperl's meta commands.

try:

[* while($i != 10) { *]
   [- $i++]
   [* last if $i == 5 *]
[* } * ]

cliff rayman
genwax.com

Jason Bodnar wrote:

> Is there a way to use last or next when using Embperl's built in loops and
> blocks.
>
> For example, I've tried something like this:
>
> [$ while $i != 10 $]
>  [- $i++; last if $i == 5 -]
> [$ endwhile $]
>
> (I know it's a dumb example)
>
> But I get the following error:
>
> Can't "last" outside block.
>
> ---
> Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems
>
> I strive for greatness but will settle for mediocrity. -- Jason Bodnar



Re: Pattern Matching kills loops?

2000-02-08 Thread Cliff Rayman

check the archives.
some people were having a problem with
the entire file being processed as one line
instead of line by line.

cliff rayman
genwax.com

Steven Clark wrote:

>
>
> I open the file needed for reading and then inside the loop whenever the
> first match occurs the loop is for some reason the loop stops??? Now I know
> the code works perfectly since I have run it from a normal script and it
> does exactly what it is supposed to but yet under modperl for some reason
> it stops after the first successful match...
>
> Code in question is this
>
> unless ($fh = Apache::File->new($file)){
> print STDERR "Couldn't open $file because: $!\n";
> return undef;
> }
> while( <$fh> ){
> next if /^#/;   # Skip comments
> next if /^$/;   # Skip blank lines
>
> m/(\d+):([0-9,]*):(.*)/;
> $id = $1;
> $temp = $2;
> $name = $3;
>
> $CAT{$id}{"name"} = $name;
> }
> close $fh;
>
>
> Any ideas?
>
> Steve



Re: Apache::AuthCookie with multiple 'require' directives?

2000-01-27 Thread Cliff Rayman

'c' code in mod_auth seems to work similar as the perl code below.

- snip -
for (x = 0; x < reqs_arr->nelts; x++) {

if (!(reqs[x].method_mask & (1 << m)))
continue;

method_restricted = 1;

t = reqs[x].requirement;
w = ap_getword_white(r->pool, &t);
if (!strcmp(w, "valid-user"))
return OK;
if (!strcmp(w, "user")) {
while (t[0]) {
w = ap_getword_conf(r->pool, &t);
if (!strcmp(user, w))
return OK;
}
}
else if (!strcmp(w, "group")) {
if (!grpstatus)
return DECLINED;/* DBM group?  Something else? */

while (t[0]) {
w = ap_getword_conf(r->pool, &t);
if (ap_table_get(grpstatus, w))
return OK;
}
} else if (sec->auth_authoritative) {
/* if we aren't authoritative, any require directive could be
 * valid even if we don't grok it.  However, if we are
 * authoritative, we can warn the user they did something wrong.
 * That something could be a missing "AuthAuthoritative off", but
 * more likely is a typo in the require directive.
 */
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
"access to %s failed, reason: unknown require directive:"
"\"%s\"", r->uri, reqs[x].requirement);
}
}

if (!method_restricted)
return OK;

if (!(sec->auth_authoritative))
return DECLINED;

ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
"access to %s failed, reason: user %s not allowed access",
r->uri, user);

ap_note_basic_auth_failure(r);
return AUTH_REQUIRED;
}
- snip -

cliff rayman
genwax.com

Ken Williams wrote:

> Hi,
>
> I'm looking at the AuthCookie code, getting ready to release a new version to
> CPAN.  It looks to me like currently only the first 'require' directive will be
> processed and obeyed.  Here's the code from the old authz():
>
> 
>   foreach $reqs (@$reqs_arr) {
> ($requirement, $args) = split /\s+/, $reqs->{requirement}, 2;
> $args = "" unless defined $args;
> $r->log_error("requirement := $requirement, $args") if ($debug >= 2);
>
> if ($requirement eq "valid-user") {
>   return OK;
> } elsif ($requirement eq "user") {
>   return OK if ($args =~ m/\b$user\b/);
> } else {
>   my $ret_val = $auth_type->$requirement($r, $args);
>   $r->log_error("$auth_type->$requirement returned $ret_val")
> if $debug >= 3;
>   return OK if $ret_val == OK;
> }
> $restricted++;
>   }
>
>   return OK unless $restricted;
>   return FORBIDDEN;
> 
>
> Is anyone actually using this with multiple "require' directives?  Or would
> anyone like to?
>
>   ------
>   Ken Williams Last Bastion of Euclidity
>   [EMAIL PROTECTED]The Math Forum



Re: Apache::AuthCookie with multiple 'require' directives?

2000-01-27 Thread Cliff Rayman

looks to me like it is using an OR approach.
first successful match returns OK.

Ken Williams wrote:

> Hi,
>
> I'm looking at the AuthCookie code, getting ready to release a new version to
> CPAN.  It looks to me like currently only the first 'require' directive will be
> processed and obeyed.  Here's the code from the old authz():
>
> 
>   foreach $reqs (@$reqs_arr) {
> ($requirement, $args) = split /\s+/, $reqs->{requirement}, 2;
> $args = "" unless defined $args;
> $r->log_error("requirement := $requirement, $args") if ($debug >= 2);
>
> if ($requirement eq "valid-user") {
>   return OK;
> } elsif ($requirement eq "user") {
>   return OK if ($args =~ m/\b$user\b/);
> } else {
>   my $ret_val = $auth_type->$requirement($r, $args);
>   $r->log_error("$auth_type->$requirement returned $ret_val")
> if $debug >= 3;
>   return OK if $ret_val == OK;
> }
> $restricted++;
>   }
>
>   return OK unless $restricted;
>   return FORBIDDEN;
> 
>
> Is anyone actually using this with multiple "require' directives?  Or would
> anyone like to?
>
>   ------
>   Ken Williams Last Bastion of Euclidity
>   [EMAIL PROTECTED]The Math Forum



Re: efficiency questions (templates, regexes, db calls)

2000-01-26 Thread Cliff Rayman

did you check out?
http://search.cpan.org/search?dist=HTML-Template

this might do most of what you need, and handle some things
you haven't thought of yet.

cliff rayman
genwax.com

Steven Champeon wrote:

> Hi, gang. I'm working on my first serious mod_perl app, and have a few
> questions regarding efficiency -- basically looking for traps I may not
> have internalized after reading the mod_perl_traps page and so forth.
>
> I'm developing a site that will use MySQL on the backend to store some
> info related to goofy timewasting projects (e.g., name, url, contributor,
> date last updated, description, etc.) The idea is that there really needs
> to be a site where I can list all my goofy timewasting projects, and I
> want other people to submit their stuff, too. Sort of a freshmeat for the
> random non-commercial stuff that abounds on the 'Net, but which seems to
> be neglected in this weblog age, or doesn't get much notice unless it's an
> Open Source [tm] project with millions of contributors. :)
>
> Anyway. I have been designing the templates for each class of page on the
> site (main project list, individual project detail, admin forms, and so
> forth). I want to populate each template with data from the db.  I don't
> particularly want to use EmbPerl; I'd rather read the templates at init
> time and parse in the db data when the page is to be returned.  Are there
> any traps I should be aware of? I only have four or five relatively small
> templates, so memory consumption shouldn't be a big deal. From what I
> understand from reading the Guide, these vars will likely be shared,
> anyway, right, if I make the vars global and populate them at startup?
>
> I figure I'll put the actual perl modules in lib/perl/, and put the
> templates I'm going to use in directories under docroot that correspond
> to the handler I've defined, just for sanity's sake. So,
>
> 
>  SetHandler perl-script
>  PerlHandler Apache::Hello
> 
>
> would use templates found in $docroot/hello, and so on. But the actual
> templates would be loaded at httpd init time, and kept around, then
> I'll perform substitutions on them based on user input or database info.
>
> I know about using /o to compile a regex. The embedded tokens in the
> templates won't change, so this will probably work fine, right?
>
> (e.g.:
>
>  
>
> can be replaced by the variable's value on the fly, without hitting
> the disk to open the template file:
>
>  my $variable = "something I got from a form or db";
>  my @lines = split($GLOBAL_VAR_CONTAINING_TEMPLATE_GUTS);
>  while(@lines) {
>s//$variable/o;
>print;
>  }
>
> I know to use persistent db connections and pre-load DBI. I know to
> tweak Max* to maximize performance. I'm just wondering if there's any
> other obvious traps that come to mind. Thanks in advance.
>
> Steve



OT: Not to be ignored :-) WAS Re: TEST: ignore

2000-01-25 Thread Cliff Rayman

not looking to be completely ignored, or removed from
the mailing list, but thanks for the kind thought  :-(

sorry for the off-topic test messages.

my problem has been solved.
turns out my isp had a routing problem.
i could communicate with most of the internet without
a problem, but i noticed that i was not getting any
modperl traffic and i could not get to www.apache.org.

I originally assumed that something was going on with
the apache servers, and that is why i sent the original TEST message.
i eventually figured out it had something to
do with my ISP.  of course it took me some time and some yelling
to find someone at my tier-1 ISP that actually understood networking
well enough to solve my problem.  Of couse, this was really a
routing problem at their end which was effecting a portion of
their other customers.

i always thought i could set-up monitoring from remote
locations so that i would be 100% assured that my site was
up and working.  now i realize, i could have 10 monitoring
stations around the net all telling me everything was working
perfectly, but a big population of the net could still not reach me
and there would be no way for me to know or hear about it in a timely
manner.

cliff rayman
genwax.com

"Frank D. Cringle" wrote:

> Cliff Rayman <[EMAIL PROTECTED]> writes:
> > this is a test.
> >
> >
> > cliff rayman
> > genwax.com
>
> Maybe it would assist Cliff in his efforts to be ignored if you
> removed him from the modperl mailing list.
>
> --
> Frank Cringle,  [EMAIL PROTECTED]
> voice: (+49 2304) 467101; fax: 943357



TEST: ignore

2000-01-25 Thread Cliff Rayman

this is a test.


cliff rayman
genwax.com



TEST

2000-01-24 Thread Cliff Rayman

test - i have not received much traffic today.
just testing the system.

cliff rayman
genwax.com



Re: problem

2000-01-20 Thread Cliff Rayman

unfortunately PERL_STACKED_HANDLERS used to be
experimental and therefore EVERYTHING includes just
about EVERYTHING except PERL_STACKED_HANDLERS.

i think you need to add PERL_STACKED_HANDLERS=1 to
your long list of Makefile.PL parameters.

this has been discussed in the mail archives so you can search
there and you'll find the original message from Doug.

cliff rayman
genwax.com

Etienne Pelaprat wrote:

> Hi All,
>
> I've hit a problem that I can't seem to rectify.  I compile
> mod_perl with EVERYTHING=1, but in one of my modules, I get the error:
>
> [Wed Jan 19 20:30:05 2000] null: Rebuild with -DPERL_STACKED_HANDLERS
> to $r->push_handlers at /usr/local/apache/lib/perl/Apache/BOSCIndex.pm
> line 37.
>
> This is that module that I wrote:
>
> package Apache::BOSCIndex;
>
> # use
> use strict;
> use Audrey;
> use Audrey::Display;
> use Audrey::News;
> use CGI qw(:standard);
> use Apache::Constants qw(OK DECLINED);
>
> my $q = CGI->new;
> my $Audrey = Audrey->new;
> my $Display = Audrey::Display->new;
> my $News = Audrey::News->new;
>
> sub handler {
> my $r = shift;
>
> # PerlTransHandler
> return DECLINED unless $r->uri eq "/";
> $r->handler( "perl-script" );
> $r->push_handlers( PerlHandler => sub {
> my $user_id = $Audrey->get_user_id( $r );
> $Display->update_stats( $user_id, "Front_Page" );
>
> # print the header
> $r->content_type('text/html');
> $r->send_http_header;
>
> # load the profile
> $Display->load_user( $user_id );
>
> # now print the html
> $Display->pre_main( $r, $user_id, "BeOSCentral - always" );
> $News->print_news_items( $r );
> $Display->post_main( $r, $user_id );
> });
>
> return OK;
> }
>
> # return true
> 1;
>
> I use a PerlTransHandler because that module is address to the root of
> my site, and so whenever an img src points to root, it would try and
> call this module.  But when I do this I get the above error.  I asked
> Randal Schwartz and he thought that rebuilding mod_perl with EVERYTHING
> =1 would fix it, but it hasn't.  Do you have any suggestions?
>
> How do I rebuild with -DPERL_STACKED_HANDLERS on?
>
> Thanks in advance,
>
> Etienne



Re: horrible memory consumption

2000-01-19 Thread Cliff Rayman

check out the following sections in the guide:

http://perl.apache.org/guide/performance.html#Memory_leakage
http://perl.apache.org/guide/debug.html#How_can_I_find_if_my_mod_perl_sc
http://perl.apache.org/guide/performance.html#Limiting_the_resources_used_by_h
http://perl.apache.org/guide/performance.html#Tuning_the_Apache_s_configuratio

this ought to get you off to a good start.

cliff rayman
genwax.com



Jason Terry wrote:

> Is there a way I can tell where my memory usage is going in an Apache child?
>
> I have a server that starts with acceptable numbers, but after a while it
> turns into this
>
> Server Version: Apache/1.3.9 (Unix) mod_perl/1.21 PHP/3.0.12 mod_ssl/2.4.4
> OpenSSL/0.9.4
> Redhat Linux: 2.2.13
>
> PID   USER PRI  NI   SIZE   RSS SHARE LC STAT %CPU %MEM   TIME  COMMAND
> 9666 nobody-1-1   38900  37M  67681S <   0.07.5
> 6:57/usr/local/apache/bin/httpd
> 9665 nobody-1-1   35728  34M  62401S <   0.06.9
> 5:57/usr/local/apache/bin/httpd
> 9663 nobody-1-1   35312  34M  64121S <   0.06.8
> 6:11/usr/local/apache/bin/httpd
>
> Now I examined these children using /server-status and they had all recieved
> more than 7000 accesses for each child.
>
> Is there a way I can find out where all this RAM is being used.  Or does
> anyone have any suggestions (besides limiting the MaxRequestsPerChild)



Patent-VirtualSellers.org-Tame-Embedded Languages

2000-01-19 Thread Cliff Rayman

Sorry - there will be no data for at least 18 months.

cliff rayman
genwax.com

WWW Account wrote:

> As I said, we don't publish them -- in any form. They are confidential by
> US law. That will change somewhat when we begin publishing some
> applications 18-months after filing, according to the new law just
> passed.
>
> -- PTO Database Webmaster
>
> On Tue, 18 Jan 2000, Cliff Rayman wrote:
>
> > Is there any way to lookup patent applications, in
> > another database perhaps or is that purposely not
> > published for legal reasons?
> >
> > thanks in advance for all the help,
> >
> > cliff
> >
> >
> >
> > WWW Account wrote:
> >
> > > We don't publish patent applications. Try searching in the ISD field
> > > (Issue Date), not APD (Application Date).
> > >
> > > -- PTO Database Webmaster
> > >
> > > On Tue, 11 Jan 2000, Cliff Rayman wrote:
> > >
> > > > there are no patent applications since jan 1 2000?
> > > > seems unlikely in light of the fact that the database says
> > > > it is updated to 1/11/2000 and yesterday it was only up
> > > > to 1/4/2000.
> > > >
> > > > cliff rayman
> > > > genwax.com
> > > > Searching 1999-2000...
> > > >
> > > >  [Search Summary]
> > > >  Results of Search in 1999-2000 for:
> > > >  APD/21*: 0 patents.
> > > >
> > > >  No patents have matched your query
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >  Search Summary
> > > >  APD/21*: 0 occurrences in 0 patents.
> > > >
> > > >
> > > > Search Time: 0.15 seconds.
> > > >
> > > >
> >



Re: how come httpd doesn't start even though startup.pl is fine?(fwd)

2000-01-18 Thread Cliff Rayman

i don't think he is saying that the module is "bad",
he is saying that modules that use XS, with apache
mod_perl have caused  problems with startup and restarts.
based on the running posts regarding
 dlopen and dlclose, i'd say he was correct.

cliff rayman
genwax.com

Ricardo Kleemann wrote:

> Hmmm :-(
>
> On 14 Jan 2000, Frank D. Cringle wrote:
>
> >
> > Without having checked your list, I'll wager that the "good" modules
> > are all pure perl and the "bad" ones use machine-language XS
> > extensions.
>
> So typical modules like MD5 and MIME::Body are "bad" modules?
>
> Ricardo



Re: APACHE_ROOT

2000-01-14 Thread Cliff Rayman

i believe the APACHE_SRC is the location
of the actual source tree.
the perl code is taking this APACHE_SRC variable
and stripping the /src from the end to get the
directory APACHE_ROOT.  The APACHE_ROOT
is the directory that you unpacked the archive into. It contains
some config info and stuff that is not a part of the source 'proper'.

i.e. on my system
APACHE_SRC is /usr/local/src/apache_1.3.3/src
APACHE_ROOT is /usr/local/src/apache_1.3.3

hope this helps,

cliff rayman
genwax.com

"William P. McGonigle" wrote:

> Can someone explain what APACHE_ROOT is meant to be?  I'm assuming it's somehow
> different thatn APACHE_SRC (which I'm defining).
>
> I found this in Makefile.PL:
>
> ($APACHE_ROOT = $APACHE_SRC) =~ s,/src/?$,,;
> last if $NO_HTTPD; # or $USE_APACI;
>
> But although I code alot of perl, I'm abyssmal at trying to figure out these
> constructs, and my books are at home...
>
> Anyway, it's getting set to blank when I run Makefile.PL.
>
> Thanks,
> -Bill



Re: Embperl + Apache::Session

2000-01-13 Thread Cliff Rayman

how about trying something simple like.



testing

This is my counter:
[+ $udat{COUNTER}++ +]




use your browser to view the page.
keep hitting reload - counter should increase.

cliff rayman
genwax.com

Andre Landwehr wrote:

> On Wed, Jan 12, 2000 at 11:12:53AM -0800, Cliff Rayman wrote:
> > i am using embperl with cookies.
> > i also have this set in httpd.conf
> >
> > PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com
> > PerlSetEnv EMBPERL_COOKIE_PATH /
> > PerlSetEnv EMBPERL_COOKIE_EXPIRES 'Friday, 31-Dec-2010 14:00:00 GMT'
> >
> > how are you checking to make sure cookies are sent?
> >
> > lwp-request -e 'http://www.domain.com/path/to/page/with/embperl|less
> >
> > You should see a SET-COOKIE header.
>
> I inserted those lines above into my httpd.conf, and did the
> lwp-request. All headers I do see are the following:
> 
> Connection: close
> Date: Thu, 13 Jan 2000 14:39:53 GMT
> Server: Apache/1.3.9 (Unix) mod_perl/1.21 PHP/3.0.12
> Content-Type: text/html
> Client-Date: Thu, 13 Jan 2000 14:39:53 GMT
> Client-Peer: 145.228.112.103:80
> Title: sessiontest 1
> 
>
> Can you please send me a simple testpage for this, maybe I do
> something wrong in my embperl code... I have only begun with perl
> 6 weeks ago or so and I still have not understood all mystiques
> ;-)
>
> Take care,
> Andre



Re: Embperl + Apache::Session

2000-01-12 Thread Cliff Rayman

i am using embperl with cookies.
i also have this set in httpd.conf

PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com
PerlSetEnv EMBPERL_COOKIE_PATH /
PerlSetEnv EMBPERL_COOKIE_EXPIRES 'Friday, 31-Dec-2010 14:00:00 GMT'

how are you checking to make sure cookies are sent?
either telnet directly to the port and do a get

telnet www.domain.com 80
GET /path/to/page/with/embperl HTTP/1.0


that is two returns above,

or better

lwp-request -e 'http://www.domain.com/path/to/page/with/embperl|less

You should see a SET-COOKIE header.

cliff rayman
genwax.com

Andre Landwehr wrote:

> Hi,
> I am trying to use sessionmanagement via Apache::Session together
> with HTML::Embperl. As I understand from  the documentation I
> just need to configure a storing and a locking mechanism in
> httpd.conf to do so. After that I should be able to use the %udat
> hash to store session related data, HTML::Embperl::Session is
> supposed to do everything from creating a unique session-id to
> storing it in a cookie or retrieving that cookie again
> automatically.
> Unfortunately setting the cookie does not work for me. When I use
> %udat for the first time a session-id is created (which I checked
> with a simple "print %udat;"), but the cookie is not sent (and:
> yes, my Netscape is cookie-enabled...). This is the embperl
> related stuff from my httpd.conf:
>
> --
> AddType text/html .epl
> SetEnv EMBPERL_DEBUG 10477
> SetEnv EMBPERL_VIRTLOG /perldebug
> SetEnv EMBPERL_ESCMODE 0
> # optRawInput + optRedirectStdout
> SetEnv EMBPERL_OPTIONS 16914
>
> # Session management
> PerlSetEnv EMBPERL_SESSION_CLASSES "MemoryStore NullLocker"
> PerlModule HTML::Embperl
>
> 
> SetHandler perl-script
> PerlHandler HTML::Embperl
> Options ExecCGI
> 
> 
> SetHandler perl-script
> PerlHandler HTML::Embperl
> Options ExecCGI
> 
> ---
>
> I use the following versions:
> Apache_1.3.9
> Apache-Session-1.04
> HTML-Embperl-1.2.1
> libwww-perl-5.43
> URI-1.02
> HTML-Parser-2.23
>
> I would be happy if someone could help me with that since I have tried
> for two days everytime with the same result, which gets quite
> depressing by now ;-)
>
> Btw: To my mind Embperl is really great! I ported a site from PHP to
> Embperl recently and gained about 80% speed with that, due to
> faster database access
>
> Take care,
> Andre
>
>   
>Part 1.2Type: application/pgp-signature



Re: VirtualSellers.com TAME patent

2000-01-10 Thread Cliff Rayman


I forgot about Micro$oft and ASP, they could squash a patent
like a bug.
I tried to look up the patent but the database is only current
through Jan 4th.  I will check it out and report back when
the actual patent is available.
cliff rayman
genwax.com
Gerald Richter wrote:
> I brought it up.  I guess I should have been
more clear, but I
> did it specifically for the authors of embedded perl/tag
> packages such as Embperl, ASP, Mason and HTML::Template.
>
I am not sure if they want to pantent embbedding a programming language
in
HTML, or just their language (They later won't touch us):
"VirtualSellers.com Inc. (OTC BB:VDOT) Friday announced that it has
submitted an application with the United States Patent and Trademark
Office
to obtain patent protection for its proprietary programming language,
TAME(R) (Tag Activated Markup Enhancer)" (from
http://www.businesswire.com/cgi-bin/f_headline.cgi?day3/200071089&ticker=vdo
t)



Re: VirtualSellers.com TAME patent

2000-01-10 Thread Cliff Rayman

I brought it up.  I guess I should have been more clear, but I
did it specifically for the authors of embedded perl/tag
packages such as Embperl, ASP, Mason and HTML::Template.

I intended for the authors of the packages to get "up in arms" and
send the patent office documentation on prior art so they could
nip this patent process in the bud.  Once it becomes patented, it
is much more expensive to fight than before a patent is issued.

If Embperl gets taken out of circulation because of patent infringement,

I have a lot of work to do in order to replace it.

cliff rayman
genwax.com

"Jeffrey W. Baker" wrote:

> Vivek Khera wrote:
> >
> > >>>>> "JB" == Jason Bodnar <[EMAIL PROTECTED]> writes:
> >
> > JB> Actually, prior art prohibits something from being patented. If
> > JB> somebody can demonstrate that the pantented concept is not new
due
> > JB> to prior art then the patent office will not issue the patent.
> >
> > So, to all of you, what does this have to do with mod_perl?  This
> > certainly is not a patent-reform mailing list.  Please take this
> > discussion somewhere more appropriate.  Thanks.
>
> Oh be serious.  A patent on a programming language embedded in a
markup
> langauge would have a serious effect on the mod_perl community.  There

> are several such languages which work with mod_perl, and at least two
of
> them are supported directly on this list.
>
> -jwb



Re: VirtualSellers.com TAME patent

2000-01-10 Thread Cliff Rayman

docs for the embedded language

http://shop1.virtualsellers.com/4xdoc

I had not included the original article because it came from individual.com
and you have to have an account to access it.  I was able to dig up the
original
source. I am not sure how long this link will be valid for:

http://www.businesswire.com/cgi-bin/f_headline.cgi?day3/200071089&ticker=vdot

cliff rayman
genwax.com


Bill wrote:

>Got the actual links for these? I'm interested in forwarding them to a
> colleague...
>
> - Bill
>
> Cliff Rayman wrote:
> >
> > looks like they submitted a patent for an embedded mark-up language.
> > the language can actually be embedded inside an html page (what
> > a concept!).
> >
> > see virtualsellers.com  and the TAME language section.
> > patent filing info was on business wire.
> >
> > 
> > These patents scare me since the patent granters seem not to understand
> > software very well - and it seems like it is diametrically opposed
> > to what the open software movement stands for.
> > 
> >
> > cliff rayman
> > genwax.com



VirtualSellers.com TAME patent

2000-01-10 Thread Cliff Rayman

looks like they submitted a patent for an embedded mark-up language.
the language can actually be embedded inside an html page (what
a concept!).

see virtualsellers.com  and the TAME language section.
patent filing info was on business wire.


These patents scare me since the patent granters seem not to understand
software very well - and it seems like it is diametrically opposed
to what the open software movement stands for.


cliff rayman
genwax.com



Re: Mason + Apache::Session .. strange problems.

2000-01-10 Thread Cliff Rayman

Are you using the same domain name throughout your site?
How is the path part of the cookie being set and what is it
being set to?  (sorry i have never used mason).

The browser will not send the cookie
back if the domain does not match or the path that the
page is GETting or POSTing to is not an exact match
or a subdirectory of the path set in the cookie.

Here is the cookie set-up for my site:
Set-Cookie: GWCUID=6e4a4f798906217e; domain=.genwax.com; path=/; expires=Friday,
31-Dec-2010 14:00:00 GMT

this cookie will be returned to all pages at genwax.com since my path is set to
root.

hope this helps,

cliff rayman
genwax.com

Ian Mahuron wrote:

> This will be posted to both the mod_perl and mason mailing lists.
>
> I'm tearing my hair out here.  I'm using Apache::Session with Mason (snippet
> of calls to Apache::Session below).  For some reason, when I hit certain
> pages with java applets (opencube scroller), and then do a browser "refresh"
> (IE5 and NS4.5) Apache::Session die()'s and posts:
>
> [Mon Jan 10 12:27:43 2000] [error] Object does not exist in the data store
> at /usr/local/lib/perl5/site_perl/5.005/Apache/Session/DBIStore.pm line 192.
>
> Which typically happens when you request a session id that's not in the
> store.  A quick query reveals that the session is still there:
>
> mysql> SELECT id, length FROM sessions WHERE id='48434f27feea873a';
> +--++
> | id   | length |
> +--++
> | 48434f27feea873a | 41 |
> +--++
> 1 row in set (0.00 sec)
>
> Jumping to a page that pulls the cookie from the browser and spits it out
> shows that the cookie holds a new value (ie. bc7d790fa9f76185).  Another
> query shows that it exists as well:
>
> mysql> SELECT id, length FROM sessions WHERE id='bc7d790fa9f76185';
> +--++
> | id   | length |
> +--++
> | bc7d790fa9f76185 | 41 |
> +--++
> 1 row in set (0.00 sec)
>
> >From what I've found so far, I can query $session for my _session_id.. then
> if I request the cookie containing my session ID, I find that it is unset!
> So naturally, another session ID is set and I loose all the old data.
>
> So I have a couple questions here:  How is my cookie getting "unset" /
> mangled?  How can I tell which "Object does not exist in the data store"
> (ie. logging the session id in the error log)?  What's the best way to debug
> this?
>
> ### Setting up sessions for mason
> my %session;
> my $cookie = $r->header_in('Cookie');
> $cookie =~ s/SESSION_ID=(\w*)/$1/;
>
> tie %session, 'Apache::Session::DBI', $cookie, {
> DataSource => 'dbi:mysql:mydb',
> UserName   => 'username',
> Password   => 'password'
> };
> $r->header_out("Set-Cookie" => "SESSION_ID=$session{_session_id};") if
>  !$cookie );
> local *HTML::Mason::Commands::session = \%session;
>
> $ah->handle_request($r);
>
> untie %HTML::Mason::Commands::session;



Re: mod_perl as a DSO and creating a developer environment questions

2000-01-05 Thread Cliff Rayman

Additionally, one thing that is not clear, is how much memory
would actually be saved by building it as DSO.

It will not be used by any non-apache binaries, and when built
statically, most of it ends up in shared memory in any case.


cliff rayman
genwax.com

"Frank D. Cringle" wrote:

> Jeff Macdonald <[EMAIL PROTECTED]> writes:
> > Hi,
> > I've read the archives, and from what I can tell, mod_perl sometimes
> > works as a DSO, and other times doesn't. I've seen Frank Cringle say it
> > works, then later to link static. I've seen Doug say it should work.
> > I've seen other say it works, but you can't load other DSO's (like PHP).
>
> I don't think there is a single answer to the question "does mod_perl
> work as a DSO?".  No one seems to have analysed an instance of the
> problem in sufficient detail to give a statement-by-statement account
> of exactly what goes wrong and why.  There may be more than one
> failure mechanism on different operating systems and versions of libc
> / perl / apache / mod_perl / 'used' modules / whatever.  The analysis is
> non-trivial and requires someone with time and a good understanding of
> shared-libraries and the guts of apache and perl.
>
> The best pragmatic advice at the moment is: if you have problems using
> mod_perl as a DSO, recompile apache and link mod_perl statically.
>
> --
> Frank Cringle,  [EMAIL PROTECTED]
> voice: (+49 2304) 467101; fax: 943357



Re: Comparing arrays

2000-01-05 Thread Cliff Rayman

I didn't read the original post but based on your spec of:
"find me keys that are not in both hashes"

I think the boilerplate code should  be:

foreach (keys %hash_one) {
  push(@here_not_there, $_) unless exists $hash_two{$_};
}

foreach (keys %hash_two){
  push(@here_not_there, $_) unless exists $hash_one{$_};
}

cliff rayman
genwax.com
Ed Phillips wrote:

> Really Dheeraj,
>
> This is not a mod_perl specific question, and I don't know the all important context 
>into which this boilerplate code you are seeking to elicit from the list is to be 
>dropped.
>
> here is a boilerplate "find me keys that are not in both hashes":
>
> foreach (keys %hash_one) {
>   push(@here_not_there, $_) unless exists $hash_two{$_};
> }
>
> shame on you. To expiate your sins, read perldoc pages for two hours
> everyday for two weeks.
>
> ed



Re: Tieing $q to $r

2000-01-04 Thread Cliff Rayman

I don't think that the my($r) is going to work out too well here.  I
don't
use apache registry but I don't think you want to freeze the
Apache->request
and CGI::Apache objects to what they are when the program is compiled.
These
usually need to be modified by apache for each request.

check out:
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S

cliff rayman
genwax.com





"Arthur M. Kang" wrote:

> Trying to tie $q to $r so I can just pass around a single variable to
> subs.  Not working too well...  Getting frustrated...  Getting ready
to
> punch computer...  :)
>
> using Registry:
>
> my($r) = Apache->request;
> my($q) = new CGI::Apache;
> $r->notes('q',$q);
>
> &test($r);
>
> sub test {
>   my($r) = shift;
>   my($q) = $r->notes('q');
>
>   print $q->param('test');
> }
>
> I'm trying to pass my $q in a fashion like the above example, but
can't
> get it to work.  If anyone has any insights or can provide some help,
> I'd really appreciate it.  I've tried sending it as a reference, and
all
> (ie: $r->notes('q',\$q))...Can't get it.
>
> Arthur



redhat 6.1 rpm for apache

1999-12-30 Thread Cliff Rayman

thought this might be of interest to the group.


-
Red Hat, Inc. Bug Fix Advisory

 Synopsis:   Apache bugfix release available for Red Hat Linux
6.1
 Advisory ID:RHBA-1999:062-01
 Issue date: 1999-12-30
 Updated on: 1999-12-30
 Keywords:   apache suexec docroot manual httpd.conf apxs
logrotate
 Cross references:   N-A
 -

 1. Topic:

 A bugfix release of Apache is available which corrects problems with
 httpd.conf default values, fixes building third party modules with
 apxs, and performs other general cleanups.  Anyone who has had
 problems building third party modules is encouraged to upgrade.

 2. Relevant releases/architectures:

 Red Hat Linux 6.x - intel alpha sparc

 3. Problem description:

 APXS-- the utility used for building apache modules as DSOs-- had
 problems as shipped in 6.1.  In addition, we intended to ship a
 unified httpd.conf default configuration file with our apache included
 in Red Hat Linux 6.1, but this did not make it into the final release;
 this has been corrected.  The apache manual is now a subpackage in its
 own right, so you may choose to install it or leave it out if you
 wish.  The logrotate script complained if httpd was not running, and
 this has been fixed. suexec is no longer suid by default, and while no
 security hole in suexec has been identified, it was determined that it
 was safer to leave this choice up to the system administrator.

 4. Solution:

 For each RPM for your particular architecture, run:

 rpm -Uvh [filename]

 where filename is the name of the RPM.

 5. Bug IDs fixed (http://bugzilla.redhat.com/bugzilla for more info):

 5256  -  manual should be on a subpackage
 5367  -  small cleanup of default conf files (1.3.9-4) (patch to
follow)
 5650  -  1.3.9 apache-devel breaks PHP
 6115  -  httpd.conf didn't upgrade with
 6655  -  incorrect pointers to module documentation in conf files
 7074  -  /etc/logrotate.d/apache gives error if apache isn't running

 6. Obsoleted by:

 N-A

 7. Conflicts with:

 N-A

 8. RPMs required:

 Red Hat Linux 6.1:

 Intel:
   ftp://updates.redhat.com/6.1/i386/apache-1.3.9-8.i386.rpm
   ftp://updates.redhat.com/6.1/i386/apache-devel-1.3.9-8.i386.rpm
   ftp://updates.redhat.com/6.1/i386/apache-manual-1.3.9-8.i386.rpm

 Alpha:
   ftp://updates.redhat.com/6.1/alpha/apache-1.3.9-8.alpha.rpm
   ftp://updates.redhat.com/6.1/alpha/apache-devel-1.3.9-8.alpha.rpm
   ftp://updates.redhat.com/6.1/alpha/apache-manual-1.3.9-8.alpha.rpm

 Sparc:
   ftp://updates.redhat.com/6.1/sparc/apache-1.3.9-8.sparc.rpm
   ftp://updates.redhat.com/6.1/sparc/apache-devel-1.3.9-8.sparc.rpm
   ftp://updates.redhat.com/6.1/sparc/apache-manual-1.3.9-8.sparc.rpm

 Source packages:
   ftp://updates.redhat.com/6.1/SRPMS/apache-1.3.9-8.src.rpm

 9. Verification:

 MD5 sum   Package Name
 --

 f92653f5d5c79ac02e60e811fc36833c  i386/apache-1.3.9-8.i386.rpm
 5288eba941e074ebcdb21952615766e4  i386/apache-devel-1.3.9-8.i386.rpm
 4c1f0520ec6debcab4484eab4b3cace7  i386/apache-manual-1.3.9-8.i386.rpm
 26fd3e0d8bb6bdeca36727e5fc839826  alpha/apache-1.3.9-8.alpha.rpm
 2f08af6da3bb5b4e248d30347c28b523  alpha/apache-devel-1.3.9-8.alpha.rpm
 2b470f06cbe4ea632f1e98568cd66b53  alpha/apache-manual-1.3.9-8.alpha.rpm

 c597fb29ad7effbe3bebe2e8d2926dd8  sparc/apache-1.3.9-8.sparc.rpm
 c516cf46a00a9f0ef6aef3d9b5107d9d  sparc/apache-devel-1.3.9-8.sparc.rpm
 1041b5c625c8a8bacd29642e832fea0a  sparc/apache-manual-1.3.9-8.sparc.rpm

 e2445d530aaa17b4b6cf44ae5d413599  SRPMS/apache-1.3.9-8.src.rpm


 These packages are GPG signed by Red Hat, Inc. for security.  Our key
 is available at:
 http://www.redhat.com/corp/contact.html

 You can verify each package with the following command:
 rpm --checksig

 If you only wish to verify that each package has not been corrupted or
 tampered with, examine only the md5sum with the following command:
 rpm --checksig --nogpg

 10. References:

 N-A

---
  Preston Brown
  Red Hat, Inc.
  [EMAIL PROTECTED]



Re: Broken image appearance

1999-12-28 Thread Cliff Rayman

You put the gif in the filesmatch.
Does Apache::AddrMunge know what to do with a gif file?

If not, then just have


and it will only handle the html files and leave the gif alone.
That is the whole idea of having the FilesMatch directive under
the Directory directive.

cliff rayman
genwax.com

nagaraj wrote:

> This message was sent from Geocrawler.com by "nagaraj" <[EMAIL PROTECTED]>
>
> Thanks Rayman,
> I added following script into httpd.conf :
>
> 
> 
>   SetHandler perl-script
>   PerlHandler Apache::AddrMunge
> 
>   
>
> But still it shows broken gif.
> Following is the error I get when i execute the
> script or try to open my gif file MY_GIF.gif file
>
> [date] [error] Unrecognised character 342 at
> /home/httpd/cgi-bin/MY_BBS/MY_GIF.gif line 1.
>
> Do U have any suggestion ?.
> Regards,
> Nagaraj S.B.
>
> ---
> welcome to the list.  most of your the answers to
> your questions
> can be found by looking in the mod_perl guide
> and/or by searching
> the archive for this mailing list.  both can be
> navigated to by
> first going to http://perl.apache.org
>
> the answer to this particular problem can be found
> at the following:
> http://perl.apache.org/guide/config.html#Logical_g
> rouping_of_Location_Di
>
> good luck,
>
> cliff rayman
> genwax.com
>
> nagaraj wrote:
>
> > This message was sent from Geocrawler.com by
> "nagaraj" <[EMAIL PROTECTED]>
> > Be sure to reply to that address.
> >
> > Hi all,
> > This is my first mail to this list. When I run
> my
> > script it is not showing the image(it shows
> broken
> > image) even though syntex is correct. I think
> > httpd is intepreting this gif file as a perl
> > script!. How to over come this problem when I
> have
> > script and gifs residing in the same directory.
> >
> > Thanks in advance,
> > Nagaraj S.B.
> >
> > Geocrawler.com - The Knowledge Archive
>
>
>
> Geocrawler.com - The Knowledge Archive



Re: Broken image appearance

1999-12-27 Thread Cliff Rayman

welcome to the list.  most of your the answers to your questions
can be found by looking in the mod_perl guide and/or by searching
the archive for this mailing list.  both can be navigated to by
first going to http://perl.apache.org

the answer to this particular problem can be found at the following:
http://perl.apache.org/guide/config.html#Logical_grouping_of_Location_Di

good luck,

cliff rayman
genwax.com

nagaraj wrote:

> This message was sent from Geocrawler.com by "nagaraj" <[EMAIL PROTECTED]>
> Be sure to reply to that address.
>
> Hi all,
> This is my first mail to this list. When I run my
> script it is not showing the image(it shows broken
> image) even though syntex is correct. I think
> httpd is intepreting this gif file as a perl
> script!. How to over come this problem when I have
> script and gifs residing in the same directory.
>
> Thanks in advance,
> Nagaraj S.B.
>
> Geocrawler.com - The Knowledge Archive



Re: embperl and html in sql problems (fixed msg)

1999-12-21 Thread Cliff Rayman

check out the following two links:

http://perl.apache.org/embperl/Embperl.pod.2.html#EMBPERL_OPTIONS
http://perl.apache.org/embperl/Embperl.pod.5.html#_escmode

i think the options you need to set are in there.  I have not tried them myself
yet.

cliff rayman
genwax.com

Reid Sutherland wrote:

> I'm trying to display a scalar [+ $var +], now the row in the database has
> HTML code in it but the HTML doesn't get rendered by the browser. What am I
> doing wrong? I read about < > and \< but it's not helping.
>
> Thanks
>
> Reid



Re: Embperl problem (newbie question?)

1999-12-20 Thread Cliff Rayman

$tabmode = 1

End table looping when any one of the expressions in the table row
using the $row subscript returns undefined
OR when $row equals the definable $maxrow variable (which
defaults to 100). The row containing the undefined expression is
not displayed. Only those expressions in the table row which use the
$row
subscript are evaluated for definedness to determine when to end
looping
for that table row.

use similar language with all the other applicable $tabmode values : 2, 16 and
32

Gerald Richter wrote:

> > Just trying out Embperl, and I discovered that (in my test of dynamic
> > tables) the $maxrow and $maxcol variables are being set to
> > defaults of 100
> > and 10 respectively and then obeyed, even though the $tabmode variable is
> > set to 17.  According to the documentation, these variables
> > should only be
> > obeyed when tabmode contains bits in the 64 and 4 position.
> >
> > My test called for 209 rows and 11 columns, and I was flummoxed for a bit
> > until I started playing around with these variables.
> >
> > Am I missing something, or is it just a documentation inconsistancy?
> >
>
> The docs says:
>
> $maxrow, $maxcol
>
> Maxium number of rows or columns to display in a table. To prevent endless
> loops, $maxrow defaults to 100 and $maxcol to 10.
>
> This is true regardless of the value of $tabmode. Maybe the docs of $tabmode
> not clear enought. If you have a suggestion how to write it in a better way,
> just send it to me.
>
> Gerald



Re: Killing a child process

1999-12-17 Thread Cliff Rayman

How about closing it after you have reaped the child?

local $SIG{CHLD}= sub {my $child=wait ; close PROG or log_message("close
failed for program and $child $!");};

you'll need to check in your docs for the appropriate way to reap on your
system.

cliff rayman
genwax.com

Bill Moseley wrote:

> If running a program with a fork/exec within a mod_perl handler (not the
> best thing to do in mod_perl) with the following code:
>
>  my $pid = open( PROG, "-|" );
>
>  if ($pid) {
>  while () {
>  [..]
>  }
>  close( PROG ) or log_message( "failed close on program $! $?");
>
> What's the proper way to close/kill PROG _early_ before PROG has finished
> with it's output.  I keep getting SIGPIPE errors ($? = 13) returned if I
> close before PROG is finished.
>
> I could kill( 'HUP', $pid ), instead of calling close() but then would I
> leak file handles?  Calling kill doesn't seem like a the best solution.
>
> Thanks,
>
> Bill Moseley
> mailto:[EMAIL PROTECTED]



Re: mod_perl license?

1999-12-17 Thread Cliff Rayman

i couldn't find one specifically in the directory structure either.
but,
in the top of the source files is the standard apache header.
check out top of $MOD_PERL_SRC_DIR/src/perl/mod_perl.c

cliff rayman
genwax.com

Bill wrote:

>I was just reading up on the FastCGI mod_fastcgi license--it's sort
> of evil-sounding...check this out:
>
> --
> ...
> Open Market permits you to use, copy, modify, distribute, and license
> this Software and the Documentation solely for the purpose of
> implementing the FastCGI specification defined by Open Market or
> derivative specifications publicly endorsed by Open Market and
> promulgated by an open standards organization and for no other
> purpose, provided that existing copyright notices are retained in all
> copies and that this notice is included verbatim in any distributions.
> ...
> --
>
>...and I was wondering how mod_perl was licensed. I actually
> couldn't find a License file in the mod_perl tar file...is there
> one? And I'm assuming (and hoping) that mod_perl is the standard
> Artistic License/GPL deal, like most Perl modules, but I wanted
> to make sure. Doug? :)
>
> - Bill
>
> P.S. - FastCGI seems to have complimentary features  when compared
> with mod_perl (meaning mod_perl is good at things that it isn't,
> and vice versa). Anyone use both at the same time?



Re: mod_perl + DSO + solaris problems

1999-12-16 Thread Cliff Rayman

check out the mail archive.
there is alot of discussion on compiling solaris with DSO support.

http://www.geocrawler.com/search/?config=182&words=solaris+DSO

cliff rayman
genwax.com

"Schlottke, Mirko (ARD-aktuell)" wrote:

> Hi!
>
> I've got some problems here in compiling mod_perl with DSO support on a
> solaris server.
> I always get a "relocation error: ... :symbol main: referenced symbol not
> found"
>
> Anybody could help me with this ?
>
> -- Mirko



Re: IPC::SysV make test fails with 'test program seems to have generated a core'

1999-12-16 Thread Cliff Rayman

What is Apache-DBILogin-1.5 using IPC for?
if it is semaphores - it is not going to work.
looks like there is a bad arg length.  I don't
use that package so I am not sure what is in line 135
of Semaphore.pm but you might be able to modify it
to work with Solaris.

cliff rayman
genwax.com

"Brian S. Craigie" wrote:

> Hi, on Solaris 7/Sparc, I'm trying to get Apache-DBILogin-1.5 to work
> and apparently it needs IPC-SysV for some reason.  IPC-SysV-1.03 make'd
> ok, but make test fails on t/sem as below.
>
> Is this test failure anything to worry about anybody?
>
> IPC-SysV-1.03 [ 178 ]> make test
> PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
> -I/usr/local/lib/perl5/sun4-solaris/5.00404 -I/usr/local/lib/perl5 -e
> 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;'
> t/*.t
> t/msg...ok
> t/sem...Use of uninitialized value at
> blib/lib/IPC/Semaphore.pm line 134.
> Use of uninitialized value at blib/lib/IPC/Semaphore.pm line 134.
> Bad arg length for semctl, is 6, should be 8 at
> blib/lib/IPC/Semaphore.pm line 135.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> Attempt to free unreferenced scalar.
> dubious
> Test returned status 0 (wstat 139, 0x8b)
> test program seems to have generated a core
> Failed Test  Status Wstat Total Fail  Failed  List of failed
> ---
> t/sem.t   0   139??   ??   %  ??
> Failed 1/2 test scripts, 50.00% okay. 0/9 subtests failed, 100.00% okay.
> *** Error code 2
> make: Fatal error: Command failed for target `test_dynamic'
>
> Thanks in advance :-)
>
> --
>
> Best Regards,
>
> Brian S. Craigie
> Unix Sysadmin
> NEC Semiconductors (UK) Ltd



Re: Apache::URI choking

1999-12-16 Thread Cliff Rayman

Looks like you did not build mod perl with Apache::URI.
Your Apache::WebSQL is attempting to dynamically load it, but
the module is not available.

You probably need to rebuild mod_perl with EVERYTHING. see
the faq or the perl.apache.org/guide.

cliff rayman
genwax.com

Joe Ryan wrote:

> I am getting the following error when trying to
>
> use Apache::URI
>
> ---
> [Thu Dec 16 11:52:28 1999] [error] Apache::WebSQL: `Can't locate loadable object for 
>module Apache::URI in @INC (@INC contains: . /sysdev/web/apache/lib 
>/usr/local/lib/perl5/sun4-solaris/5.00404 /usr/local/lib/perl5 
>/usr/local/lib/perl5/site_perl/sun4-solaris /usr/local/lib/perl5/site_perl 
>/sysdev/web/apache/ /sysdev/web/apache/lib/perl) at 
>/usr/local/lib/perl5/site_perl/mod_perl.pm line 16
> ---
>
> here are the lines in mod_perl.pm causing problems
>
> ---
>  14 if ($ENV{MOD_PERL}) {
>  15 (defined &{$class.'::bootstrap'} ?
>  16  \&{$class.'::bootstrap'} :
>  17  \&DynaLoader::bootstrap)->
>  18  ($class, $version);
>  19 }
> ---
>
> Any ideas?
> Thanks very much for any help!
>
> Joe
> --
> Joseph Ryan
> Programmer
> National Human Genome Research Institute



Re: Core dump on graceful restart.

1999-12-14 Thread Cliff Rayman

not sure, but this may be relevant:

http://perl.apache.org/guide/troubleshooting.html#Evil_things_might_happen_when_us

cliff rayman
genwax.com

"C. R. Oldham" wrote:

> Greetings,
>
> My Apache core dumps on graceful restart.  I've noticed that it only
> happens after mod_perl pages are accessed, and it seems to have
> something to do with Mysql access as well.  A backtrace from gdb
> indicated the problem was in do_obj_cleanup (maybe a spelling error
> there--I had the core file but it disappeared from my /tmp directory
> after an unexpected reboot).  This is on Debian Linux (Potato) with a
> 2.2.13 kernel.
>
> I thought the problem was caused because I was running mod_perl as a
> DSO, but after rebuilding Apache so perl was statically linked the
> problem did not go away.  Mysql access via perl is through DBI 1.13 and
> the Perl Msql-Mysql-DBD 1.2210.  Perl is at 5.005_03, from the Debian
> package.
>
> I also have some PHP scripts that access Mysql, but if I run Apache and
> never touch mod_perl pages it does not core after accessing the
> PHP/Mysql stuff.
>
> Has anyone seen this?  Should I care that Apache segfaults on graceful
> restart?
>
> --
> | Charles R. (C. R.) Oldham | NCA Commission on Schools|
> | [EMAIL PROTECTED]   | Arizona St. Univ., PO Box 873011,|
> | V:480/965-8700 F:480/965-9423 | Tempe, AZ 85287-3011   _ |
> | "I like it!"--Citizen G'Kar   | #includeX_>|



Re: Win32+modperl+EmbPerl - some questions ...

1999-12-13 Thread Cliff Rayman

I use it from linux without a problem.
I think the problem had to do with dynamic libraries.
It is probably in the faq.

cliff rayman
genwax.com

"Eric L. Brine" wrote:

> > 'use HTML::Embperl' ( startup.pl) both don't work!
> > Is this a special "Win32-behaviour"?
>
> I might be wrong, but I thought Embperl should never be loaded in startup.pl,
> even in UNIX.
>
> ELB
>
> --
> Eric L. Brine  |  Chicken: The egg's way of making more eggs.
> [EMAIL PROTECTED]  |  Do you always hit the nail on the thumb?
> ICQ# 4629314   |  An optimist thinks thorn bushes have roses.



Re: Embperl, input type=image, and binary output

1999-12-13 Thread Cliff Rayman


Jech Bernard wrote:

> > For now the output functions of Embperl can't handle binary data. What
> you
> > can do is, set optEarlyHttpHeader (must be set in your httpd.conf), so
> the
> > headers are send, before the page is generated. Now you are able to use
> > mod_perl's output function. You can simply use print (not [+ ... +]) to
> > output your binary data.
>
> > Another possibility is to write a small Apache::Registry script which
> > handles the request and does the output, since there seems nothing todo
> for
> > Embperl in this case, as far as I see.
>
>
>
> It looks like the output function stops at the first null character
> (C-style strings problem??).
>

i bet you are correct.

>
> Let's be honest about this. It is a bug and it can be fixed. It would
> make Embperl much more useful than it is now. If it can't be done,
> which I doubt, I recommend everybody switching to PHP3. It is more
> consistent, and it does not suffer from this kind of mysterious
> problems.
>

you've got to be kidding.  php3 is not 1/2 as powerful as embperl.
so it has a bug - if it is a bug - along with every other piece of
software on the planet.  embperl allow you to use direct modperl
calls to do anything you want.  these restrictions just need to be more well
documented, and the work arounds provided as part of the
documentation.

cliff rayman
genwax.com




Re: silent failure when I try to use PerlRequire in httpd.conf

1999-12-13 Thread Cliff Rayman

I am using PerlRequire successfully on both:

Server: Apache/1.3.3 (Unix) mod_perl/1.16 mod_ssl/2.1.2 SSLeay/0.9.0b
AND
Server: Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.8 OpenSSL/0.9.4

both on linux Linux Redhat 5.2 - kernal - 2.0.36
perl, version 5.005_02 built for i686-linux

Are perl and apache/modperl all compiled with the same compiler and version?
I am running RedHat 5.2 but I compiled perl/apache/modperl/openssl all from
scratch using clean source trees from their respective web sites.

Are you PerlRequire(ing) things that perhaps should be loaded dynamically
from the children?

cliff rayman
genwax.com

Bill Marrs wrote:

> I tried "set args -X" in gdb, and the result was that the server worked fine.
> So, I guess the problem is related to starting the child servers.
>
> Prakash Kailasa's reply talks about what is probably the same thing that is
> happening to me.
>
> He said:
> >I started apache with strace and the output shoed me that apache is
> >blowing up when mod_perl is trying to load the first shared object
> >(.so file), which in my case happened to be IO.so. This only happens
> >in the first forked child process. The root apache process loads
> >everything just fine. But I think when the root process gets a
> >signal that the child has died, it is also dying silently.
>
> I believe that this is the same thing that is happening to me.
>
> Cliff - are you using PerlRequire successfully?  What version of Apache and
> mod_perl are you using?
>



Re: silent failure when I try to use PerlRequire in httpd.conf

1999-12-13 Thread Cliff Rayman

are you sure that there are no other webservers
currently running and on port 80?

do the 'set args' gdb command with at least the -X parameter
before executing run.

when you start apache and it blows up, is apache using any
other command line arguments such as -DSSL?
if so, make sure you use that on the set args line as well
so you are running the program with the same enviroment
in gdb as when you run with apachectl.

cliff rayman
genwax.com

Bill Marrs wrote:

> At 10:14 AM 12/11/99 -0800, Cliff Rayman wrote:
>
> >Stas Bekman wrote:
> >
> > > On Sat, 11 Dec 1999, Bill Marrs wrote:
> > >
> > > > Hi,
> > > >
> > > > I've been using mod_perl successfully albeit minimally for a couple
> > months
> > > > now.
> > > > I'm trying to tune performance and memory usage by consolidating some
> > > > common Perl "use" directives in a PerlRequire statement.  However, when I
> > > > add this line to my Apache config file (/etc/httpd/conf/httpd.conf), the
> > > > server fails to come up - and also give no indication that I can find
> > of a
> > > > problem.  So, I don't know what's going wrong.
> > > >
> > > > Here's what I'm adding to my httpd.conf file:
> > > >
> > > > PerlRequire /home/ugtz/startup.pl
> > > >
> > > >
> > > > I have the usual stuff in my /home/ugtz/startup.pl file, actually I tried
> > > > commenting everything but the #!/usr/local/bin/perl and the "1;" at the
> > > > end, and it still failed.  So, I don't think the contents of the file are
> > > > at fault.
> > > >
> > > > My httpd error log doesn't say anything is wrong, it actually doesn't log
> > > > anything - like it never got that far...
> >
> >make sure no server is running on port 80 or use an alternate config with
> >an alternate port if you are on a production server.
> >cd /usr/local/apache/bin  # where ever your binary is
> >gdb httpd
> >set args -X -f /path/to/alternate/serverconfig_ifneeded.conf
> >run
> >
> >it should blow up!
> >then,
> >bt
> >
> >this will show you a backtrace of what was happening when it blew up.
> >post that to the list and we may be able to come up with some better
> >guesses as to the problem.  make sure to include versions of apache,
> >mod perl and perl.
>
> I tried this, but the server is just happily and quietly exiting - no blow
> up, no indication of why it's failing (unless I don't know where to look).
>
> [root@ugtz /root]# cd /usr/sbin/
> [root@ugtz sbin]# gdb httpd
> GNU gdb 4.17.0.11 with Linux support
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux"...
> (no debugging symbols found)...
> (gdb) run
> Starting program: /usr/sbin/httpd
>
> Program exited normally.
> (gdb) quit
>
> # httpd -V
> Server version: Apache/1.3.9 (Unix)  (Red Hat/Linux)
> Server built:   Sep 21 1999 10:46:27
> Server's Module Magic Number: 19990320:6
> Server compiled with
>   -D HAVE_MMAP
>   -D HAVE_SHMGET
>   -D USE_SHMGET_SCOREBOARD
>   -D USE_MMAP_FILES
>   -D USE_FCNTL_SERIALIZED_ACCEPT
>   -D HTTPD_ROOT="/usr"
>   -D SUEXEC_BIN="/usr/sbin/suexec"
>   -D DEFAULT_PIDLOG="/var/run/httpd.pid"
>   -D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard"
>   -D DEFAULT_LOCKFILE="/var/run/httpd.lock"
>   -D DEFAULT_XFERLOG="/var/log/httpd/access_log"
>   -D DEFAULT_ERRORLOG="/var/log/httpd/error_log"
>   -D TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
>   -D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"
>   -D ACCESS_CONFIG_FILE="/etc/httpd/conf/access.conf"
>   -D RESOURCE_CONFIG_FILE="/etc/httpd/conf/srm.conf"
>
> I believe the mod_perl version I'm running is:
>
> mod_perl/1.21
>
> (I'm not sure how to officially get this info)
>
> # httpd -l
> Compiled-in modules:
>http_core.c
>mod_so.c



modification to the guide

1999-12-11 Thread Cliff Rayman

found this while looking through the guide:
quot guide>>Safe Code Updates on a Live Production Server

-- snip --
think I'm ready I do:

% cd /home/httpd/perl
% mv rel old; mv beta rel; stop; sleep 3; restart; err

<


Re: silent failure when I try to use PerlRequire in httpd.conf

1999-12-11 Thread Cliff Rayman



Stas Bekman wrote:

> On Sat, 11 Dec 1999, Bill Marrs wrote:
>
> > Hi,
> >
> > I've been using mod_perl successfully albeit minimally for a couple months
> > now.
> > I'm trying to tune performance and memory usage by consolidating some
> > common Perl "use" directives in a PerlRequire statement.  However, when I
> > add this line to my Apache config file (/etc/httpd/conf/httpd.conf), the
> > server fails to come up - and also give no indication that I can find of a
> > problem.  So, I don't know what's going wrong.
> >
> > Here's what I'm adding to my httpd.conf file:
> >
> > PerlRequire /home/ugtz/startup.pl
> >
> >
> > I have the usual stuff in my /home/ugtz/startup.pl file, actually I tried
> > commenting everything but the #!/usr/local/bin/perl and the "1;" at the
> > end, and it still failed.  So, I don't think the contents of the file are
> > at fault.
> >
> > My httpd error log doesn't say anything is wrong, it actually doesn't log
> > anything - like it never got that far...

make sure no server is running on port 80 or use an alternate config with
an alternate port if you are on a production server.
cd /usr/local/apache/bin  # where ever your binary is
gdb httpd
set args -X -f /path/to/alternate/serverconfig_ifneeded.conf
run

it should blow up!
then,
bt

this will show you a backtrace of what was happening when it blew up.
post that to the list and we may be able to come up with some better
guesses as to the problem.  make sure to include versions of apache,
mod perl and perl.

hope this helps,

cliff rayman
genwax.com

p.s. stas - I thought I learned this procedure from the guide - now I cannot
find it.  could be that I am tired.




Re: Configuring Apache with Problems

1999-12-10 Thread Cliff Rayman

i don't think that:
$FilesMatch{'"^.*\.pl$"'}
should work - it is asking to match a url with quotes around it.

i believe that:
$FilesMatch{'^.*\.pl$'}
is what you are looking for.

if not, then I don't understand the regexp library that apache uses.
if I am wrong - can someone point me to the manual section that
contains the regex rules that the library does use.

cliff rayman
genwax.com

Ken Williams wrote:

> I had similar problems and discovered that bugs had been fixed in the latest
> CVS version, and those fixes fixed my problems.  Might be worth a shot.
>
> [EMAIL PROTECTED] (Sam Tregar) wrote:
> >Hello all.  Two questions:
> >
> >1) These two *look* equivalent:
> >
> >
> >$FilesMatch{'"^.*\.pl$"'} =
> >  {
> >SetHandler => 'perl-script',
> >PerlHandler => 'Apache::Registry',
> >Options => '+ExecCGI'
> >  };
> >
> >
> >
> >  SetHandler perl-script
> >  PerlHandler Apache::Registry
> >  Options +ExecCGI
> >
> >
> >but the second one works and the first doesn't.  When I try to use the
> >first one I get .pl files returned as text, as though the directive were
> >being ignored.  The second one works as expected - *.pl files are handled
> >by Apache::Registry.  Any ideas?
> >
> >2) Is there any way to get the same warning/error messages from mistakes
> >in a  block that you do from "normal" configuration?  I'm thinking
> >particularily of the warnings you get from setting *SpareServers to
> >innapropriate values.
> >
> >I'm working on a server that says "mod_perl/1.15 Red Hat Secure/2.0 (Unix)
> >mod_perl/1.15 mod_ssl/2.0.7 SSLeay/0.9.0b", in case that helps.
>
>   ------
>   Ken Williams Last Bastion of Euclidity
>   [EMAIL PROTECTED]The Math Forum



Re: ASP Cookieless Sessions (WAS Re: Apache::ASP)

1999-12-10 Thread Cliff Rayman

sorry - you peaked my interest so I have to jump the gun a little.
are you basing it on unique host names which are resolved by
some type of dns delegation?

if so, only problem is with SSL pages. the host name has to
match the one in the certificate otherwise the browser will
give a warning.  in this case we would have to rely on the
first HTTP_REFERER from a non SSL page,
and then back to mangled URL's or hidden fields
(we know we are using a form or we wouldn't need SSL).

cliff rayman
genwax.com

"Randal L. Schwartz" wrote:

> >>>>> "Serge" == Serge Sozonoff <[EMAIL PROTECTED]> writes:
>
> Serge> Hello,
> >> It will work fine, but the problem still remains that the
> >> incoming page URL has the session-id in it, so that when you go
> >> offsite, the referer header sent by the client has the client's
> >> session id in it still, and the unethical webmaster could easily
> >> then access the users sessions by looking at the referer logs.
>
> Serge> There is a little article about cookie-less sessions at:
>
> Serge> www.webdevelopersjournal.com/columns/stateful.html
>
> And this method requires client-side javascript enabled (mine is not,
> thank you), *and* frames your entire site, so bookmarking is useless.
>
> Nope, I wouldn't put it into the "useful robust" category.
> You're still back to:
>
> cookies (maybe disabled)
> hidden fields (only with form submissions)
> mangled URLs (all pages must be dynamic generated)
> auth (like BasicAuth where you "log in")
>
> And one *new* one that I pondered recently, that can be used as long
> as you presume HTTP/1.1...
>
> I don't have time to write it up here, but it permits:
>
> 1) bookmarking of sessions
> 2) no rewriting of URLs for static pages, even if they have links
> 3) access to session ID even by mod_cgi scripts
> 4) new sessions are started by a simple external redirect
> 5) one simplePerlTransHandler could provide the master session-start for any URL
>
> downside: you must have access to a UDP port 53 somewhere and DNS delegation
>
> I'll write up more after I've done some testing.
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Error in make test

1999-12-10 Thread Cliff Rayman

this is a good idea.
i had the same one. i thought it would be easy to test out a new release, and
if i could not get things working - change the link back to the old one.
i did have problems which i believe were related to the softlink.
i have since gone back to hardlinks for the apache server directory.

i'd be interested to see if this produces good results in a production
environment.

cliff rayman
genwax.com

"G.W. Haywood" wrote:

> Greetings,
>
> On Thu, 9 Dec 1999, Sakuji Toyama wrote:
>
> > I have compiled mod_perl-1.21 with apache_1.3.9 under Solaris2.5 machine.
> > ...
> > "--prefix=/usr/local/etc/httpd"
>
> I think this is your problem.  Something similar happened to me.
>
> Try putting everything in   /usr/local/apache_1.3.9
> with a soft link/usr/local/apache -> /usr/local/apache_1.3.9
> and use --prefix=/usr/local/apache
> put mod_perl in /usr/local/mod_perl-1.21
> with a soft link/usr/local/mod_perl -> /usr/local/mod_perl-1.21
>
> Delete the original apache installation and start again with a fresh
> set of files from the distribution.
>
> Please tell me if this works for you.
>
> Kind regards,
> Ged Haywood.



Re: simple xml parsing within html

1999-12-09 Thread Cliff Rayman

The HTML::Parser is written by Gisle Aas.
I think he is more than well aware of the ABC's of programming
as you laid them out here - the ones that made sense anyways.
|| ;--(())

cliff rayman
genwax.com

"G.W. Haywood" wrote:

> Hi all,
>
> On Wed, 8 Dec 1999, Alex Menendez wrote in the mod_perl list:
>
> > I currently have developed a dynamic content engine in mod_perl
> > I initially tried to do this by subclassing HTML::Parser and over-riding
> > the usual methods. However, this was painfully slow
> >
> > any suggestions on making HTML::Parser work faster
>
> Performance is a real issue in mod_perl systems, so I've put some work
> into this.  Maybe it will spawn a thread.
>
> Here are a couple of suggestions for speeding up HTML::Parser.
>

> ---SNIP---

liberally snipped for Tom Christiansen.


> --- SNIP

> Ged.



Re: simple xml parsing within html

1999-12-08 Thread Cliff Rayman

I read either on this list or another that the author of HTML::Parser
was rewriting it to gain additional speed.

There may be a beta version somewhere you can try.  Check CPAN.

cliff rayman
genwax.com

Alex Menendez wrote:

> hello, all
>
> I currently have developed a dynamic content engine in mod_perl that
> parses html files on the fly for
> proprietary xml tags then replaces these tag trees with db content.
>
> I initially tried to do this by subclassing HTML::Parser and over-riding
> the usual methods. However, this
> was painfully slow.even after chunking the files line by line. I got
> better performance by writing my own module that specifically parsed the
> file for my tags. However, the performance is still not that great and
> my module is not exactly robust.
>
> any suggestions on making HTML::Parser work fasteror on another
> module that can parse XML within a tree of non xml compliant tagsie
> HTML?
>
> -amen



Re: Redirect While Maintaining Environment?

1999-12-08 Thread Cliff Rayman

Pass the user a cookie which contains a key to a session object.
Write the data to the session object using the cookie's key from your mod perl
process.  Read back the session data using the key passed to you from the cookie
in the cgi process.
When you set the cookies PATH information, make sure it is high enough up the
directory tree so
it is accessible from both scripts.

The session data can be stored in a flat file, in a database, or in shared
memory.
If it is very sensitive make sure sessions are in a directory writable only by
the apache 'user', and make sure that 'user' cannot use any other means to get
data from your server i.e. telnet, ftp etc..

I am not sure which of the standard session packages are usable from both
modperl and cgi,
since I use modperl exclusively, but it would be easy to write a down and dirty
session package
if you had to.

hope this helps,

cliff rayman
genwax.com

Jason Simms wrote:

> Thanks for the advice, and this brings up another question...  Honestly, if
> I were using an internal redirect, I wouldn't need to bother with these
> environment variables at all.  The problem is that many times before I do
> this redirect, I also need to set a cookie.  Am I correct in assuming that
> an internal redirect does NOT have the ability to set a cookie?
>
> The entire reason I have to do this is that I need to pass sensitive values
> to the CGI script from the module.  I do not wish to use a simple query
> string, as the end user would then be able to intercept this.  I want to
> pass values to the "child" CGI script (even though it is an entirely new
> request) without them being able to be intercepted easily.  Hence, I thought
> if I could give the script access to the environment, I wouldn't need to
> pass the parameters over through the URI.  Is there anohter way to do this?
>
> Jason
>
> >If you redirect, that's most likely telling the web browser to fetch
> >the new page.  This makes it a totally new request.
> >
> >However, if you're using internal_redirect, then subprocess_env >should do
> >the trick, but the ENV values will be prefixed with >"REDIRECT_".
>
> __
> Get Your Private, Free Email at http://www.hotmail.com



Re: [EMBPERL]: Broke tied filehandle interface ?

1999-12-06 Thread Cliff Rayman

I am not an expert on these issues - but I remember something about
apache.pm not handling the $/ for readline correctly.  You can check the
archives
by searching for readline.  When you are using the class object call you
are
using a different readline implementation that is working correctly.

You could probably either call readline via the class method,
or just read the entire file into an array instead of a scalar - depending
on what you were going to do with it next.

cliff rayman
genwax.com

"Francis J. Lacoste" wrote:

> Hi,
>
> I've run into into a very peculiar problem using HTML::Embperl 1.2.0
> with
> apache 1.3.6 and mod_perl 1.21.
>
> I'm using a tied file handle in an embperl page :
>
> 
>  
>   Test
>  
>  
>   [-
>   use GnuPG::Tie::Encrypt;
>
>   tie *GNUPG, 'GnuPG::Tie::Encrypt', gnupg_path => '/usr/bin/gpg',
>  armor => 1, recipient => 'Francis'
>   or die "Error tying variable\n";
>   print GNUPG "Hello world\n";
>   local $/ = undef;
>   $text = ;
>   close GNUPG;
>   untie *GNUPG;
>   -]
>
>   [+ $text +]
>  
> 
>
> The line $text =  is somehow a noop. The call to the
> underlying READLINE implementation is never made. (I know I have
> a print STDERR at the beginning of the method.)
>
> The same thing happen if I use the line
>
> $text = readline GNUPG;
>
> But if I use :
>
> $text = (tied *GNUPG)->READLINE;
>
> it works fine.
>
> If I modify the previous snippets to run as a plain mod_perl handler,
> everythings
> works as expected.
>
> Any ideas what may be causing the problem ?
>
> Thanks for your insights.
>
> --
> Francis J. Lacoste   iNsu Innovations Inc.
> Vice-Président développement  Tél.: (514) 336-5544
> [EMAIL PROTECTED]  Fax.: (514) 336-8128



Re: Can't load /..../Fcntl.so

1999-12-02 Thread Cliff Rayman

Are all modules, apache and perl built with the same compiler?

cliff rayman
genwax.com

Bruce Johnson wrote:

> Installing 1.19 doesn't seem to work, either.  I have obviously
> mucked something up, but I'm confounded as to what.  I've done a
> complete rebuild of Apache per the "flexible way" instructions in
> INSTALL.apaci, and whether I do it with 1.19 or 1.20, the same
> problem occurs.
>
> One problem I find during the "make test" of mod_perl is that it
> fails because the httpd binary doesn't exist yet.  I don't know
> if that's an error in the installation instructions or whether
> some other prerequisite hasn't been met.  I dimly recall having
> seen that problem when I did my original build in May.
> --
> Bruce A. JohnsonPictureVision, Inc.
> Sr. Software Engineer   250-A Exchange Pl.
> (703)925-4075   Herndon, VA 20170
> http://info.photonet.com
>
> "Bruce A. Johnson" wrote:
> >
> > I just rebuilt my Apache server (1.3.6) last week.  I enabled the
> > cern_meta module, the usertrack module, and the expires module,
> > and I upgraded mod_perl from 1.19 to 1.21.  I did a clean build
> > from the distribution tar-balls.
> >
> > My "tricky" applications seemed to work okay, so I put it into
> > production.  Now I find that one of my other apps is broken:
> >
> > > Software error:
> > >
> > > Can't load '/opt/perl/lib/5.00502/sun4-solaris/auto/Fcntl/Fcntl.so' for module
> > > Fcntl: ld.so.1: /opt/apache/bin/httpd: fatal: relocation error: file
> > > /opt/perl/lib/5.00502/sun4-solaris/auto/Fcntl/Fcntl.so: symbol main: referenced
> > > symbol not found at /opt/perl/lib/5.00502/sun4-solaris/DynaLoader.pm line 168. at
> > > (eval 168) line 3
> >
> > I don't know whether I've stumbled across a problem in mod_perl
> > 1.21 or whether I inadvertently mucked something up.  I'm
> > starting a rebuild with 1.19 to see if the problem can be
> > reproduced; however, if anyone has some advice for a dumb
> > so-and-so, I'll gladly accept it.
> >
> > Thanks!
> > --
> > Bruce A. JohnsonPictureVision, Inc.
> > Sr. Software Engineer   250-A Exchange Pl.
> > (703)925-4075   Herndon, VA 20170
> > http://info.photonet.com



Re: The Spirit of the... Mailing List

1999-11-26 Thread Cliff Rayman

One more thing.  If you know the answer is in the Guide, do a search on it,
and present the newbie with the appropriate link.  It will not take more
than
one or two times for the newbie to realize they should check the guide first

for the answers.  If not, lets face it, they will never get something as
powerful
and complex as mod perl working for them effectively and they need to use
a simpler solution.

thanks to Stas for the Guide.

cliff rayman
genwax.com

Stas Bekman wrote:

> Well, lately there was a lot of frustration expressed by some of the
> folks, and I could guess that there are many others feeling the same
> way but prefer to keep they thoughts for themselves.
>
> This post is an attempt to revive the spirit of our beloved
> mod_perl mailing list.
>
> It seems that the pandora box was opened by the "make test" issue, so
> here is my take on it:
>
> Well, it works for *most* of the people. For those that doesn't and
> who solves the problem we patch the sources and I update the guide to
> point to solutions. As a matter of fact I've patched another 'make
> test' problem a few weeks ago. I've discovered it while installing
> mod_perl, solved it and sent the patch. It might take awhile to find
> out what the problem is, but the real joy is when you solve it - try
> it once, it's hard at the beginning but it worth every
> second/hour/day/week you spent on it. That's the programmer's joy -
> welcome to the programmers world :)
>
> Regarding the policies. You are lucky as this list is pretty good
> relative to other I used to lark at and left. The rate of helping is
> much higher here relative to the rate of flames. As a matter of fact
> other folks and me, are trying to calm down the flamers in case the
> flames are irrelevant. You can read through the archives, if you want
> to the proof.
>
> Jeffrey is a good guy and he really helps and contributes a lot,
> don't forget that we are all volunteers and spend our precious time
> helping out people. We could make more money at the same time or just
> getting some sleep, instead of helping at all. The reason not all
> questions are being answered is either that we don't know or don't
> have the time. There is also a term of "sexy question", if your
> doesn't fall into that category you might be out of luck.
>
> You should understand that when you flame on people who contribute,
> the flamed people say "what the heck, I'm out of here". Oops you've
> just lost yet another contributor.
>
> As for unanswered question, Matt Sergeant starts to provide a
> commercial services, like support and training and more people will
> join later. If you don't have the time/knowledge to learn things on
> your own, please consider using his commercial support. If you came to
> me and said: "Stas I'll pay you so you will not have to work to feed
> your family, please asnwer to all my questions", I would probably do
> that. And many other too.  Please remember that we do what we do,
> because we beleive in a good world...
>
> Now, I don't claim that I know the humans nature, but I think that
> many of you "silent" listeners should get out of your hiding places
> and start getting involved into a project's life. Don't be surprised
> if one day the number of answers to the questions will come to
> zero. You should try to asnwer, at the beginning the simple questions,
> later when you gain the confidence a more complicated ones.
>
> Please remember that no one, I stress NO ONE, will flame on your that
> you gave a wrong answer. Just claim that:
>
>   I'm not sure whether I'm correct, but possibly this should solve
>   your problem. You aren't in the court, you are in the place that
>   alive only for a sole reason that someone have the guts to help.
>
> Why going far, take myself for example - look at the archives, 2 years
> ago I was asking stupid questions, with time I've learned a bit, but I
> was afraid to answer someones questions because I wasn't sure I was
> right. But later it hit me, I understood that because the gurus has to
> asnwer stupid questions they didn't make it to the real complicated
> ones.
>
> So I've decided: hey, if I try to take the load off the gurus they
> will ask more of my questions. And you know what, it worked I've tried
> to asnwer questions and do it more or less until today whether I know
> the asnwer or not. When I don't, at least I try to suggest something,
> many times the person that has asked the question finds the answer
> himself, all she needed is to be listened...
>
> BTW, that's how the guide was born (the 1

Re: How to run a secure mod_perl ?

1999-11-24 Thread Cliff Rayman

I had an embperl crashing problem.
With the help of the developer is has been rectified.
It took down individual processes only.  I have never
had the apache core serving daemon (whatever it is called)
crash under mod_perl.

cliff rayman
genwax.com

Matt Sergeant wrote:

> On Wed, 24 Nov 1999, Martin A. Langhoff wrote:
> > hi mod_perl gurus,
> >
> > I'm currently in dire problems (read sh*t):
> >
> > - In one week my Embperl powerd site debuts.
> >
> > - Just now, my webmaster tells me that I can't use Embperl _nor_
> > ePerl. Previously he had told me to use ePerl o whatever I wanted, now
> > he's worried about security.
> >
> > - He claims that he cannot allow me to run anything under
> > mod_perl (and derivatives as Embperl) because mod_perl brings Apache
> > down when it crashes.
>
> Well, the extent this will happen is to 1 process. Not the whole httpd. So
> 1 user gets a disconnect. That's all.
>
> > - On the other hand, he'll allow me to use perl in CGI scripts.
> >
> > - Of course that's not what I want :)  !!!
> >
> > - Is there a way to configure mod_perl so that it does not crash
> > apache down? Or maybe it never does and he doesn't know?
>
> First of all, this will only happen if perl crashes. I'm yet to see perl
> core dump. Maybe I'm unique in this experience. This includes running perl
> on NT since it was HiP Communications Perl. So yes - if perl crashes your 1
> httpd will come tumbling down. And apache will happily spawn another one
> for you. I suppose it's possible that XS code will core dump - e.g.
> embperl. But I've never run embperl or anything that I don't consider
> stable enough to work with, so I can't comment on that. I doubt very much
> you'll have some obscure XS bug that won't show up until your site goes
> live - but you never know I guess.
>
> --
> 
>
> Details: FastNet Software Ltd - XML, Perl, Databases.
> Tagline: High Performance Web Solutions
> Web Sites: http://come.to/fastnet http://sergeant.org
> Available for Consultancy, Contracts and Training.



Re: Installation help

1999-11-24 Thread Cliff Rayman

I am not an expert on the build process - and I have never installed php - but
I have installed mod_ssl with mod_perl by performing the following steps.

fresh source for all three.
build, test and install php.
build, test and install  mod_perl.
build and install apache.

it mod_perl install should not eliminate the php install.

perhaps someone who has done it has more specific info.

cliff rayman
genwax.com

[EMAIL PROTECTED] wrote:

> Cliff,
>  thanks, and I did that, and now here is what i get for the error when I
> recompile the apache, can you help. Thanks
>
> this is just a part of the error, when I take off the
> "--with-module=src/modules/libperl.a"  then there is no error.
>
> regards,
>
> Server.o(.text+0xe52): undefined reference to `PL_stack_base'
> Server.o(.text+0xe87): undefined reference to `Perl_newXS'
> Server.o(.text+0xe9d): undefined reference to `Perl_newXS'
> Server.o(.text+0xeb3): undefined reference to `Perl_newXS'
> Server.o(.text+0xec9): undefined reference to `Perl_newXS'
> Server.o(.text+0xedf): undefined reference to `Perl_newXS'
> modules/perl/libperl.a(Server.o)(.text+0xef5): more undefined references
> to `Per
> l_newXS' follow
> modules/perl/libperl.a(Server.o): In function `boot_Apache(...)(long
> double, voi
> d,...)(long double) static':
> Server.o(.text+0xf34): undefined reference to `PL_stack_base'
> Server.o(.text+0xf39): undefined reference to `PL_sv_yes'
> Server.o(.text+0xf50): undefined reference to `PL_stack_base'
> Server.o(.text+0xf5b): undefined reference to `PL_stack_sp'
> modules/perl/libperl.a(mod_perl_opmask.o): In function
> `mod_perl_set_opmask':
> mod_perl_opmask.o(.text+0x29): undefined reference to `Perl_croak'
>
> On Wed, 24 Nov 1999, Cliff Rayman wrote:
>
> > that errors means that mod-perl is NOT installed in your http server.
> > somewhere you skipped an installation step.
> >
> > if it were me - I'd start from step one and try it again.
> >
> > cliff rayman
> > genwax.com
> >
> > [EMAIL PROTECTED] wrote:
> >
> > > I'm trying to setup ASP to work on apache, and as far as my understading
> > > that I need mod_perl has to be installed before installing ASP module, but
> > > I'm still confusing how to install mod_perl, I did as the manual said, and
> > > I installed without any error, but when i put the config in httpd.conf for
> > > the ASP to work then i got error and can't not start the apache..can
> > > anyone please help?
> > >
> > > error:
> > > [root@mail conf]# httpd start
> > > Syntax error on line 450 of /usr/local/apache/conf/httpd.conf:
> > > Invalid command 'PerlHandler', perhaps mis-spelled or defined by a module
> > > not in
> > > cluded in the server configuration
> > > /usr/sbin/httpd start: httpd could not be started
> > >
> > > my httpd config:
> > > Alias /asp/ /usr/local/htdocs/asp/
> > > 
> > >  SetHandler perl-script
> > >  PerlHandler Apache::ASP
> > >  PerlSetVar Global /tmp
> > > 
> > >
> > > thanks
> >



Re: this might be an obvious one ...

1999-11-24 Thread Cliff Rayman

check out the following section in the guide. it will answer your questions.  if
found it by
doing a search on "will not stay shared at" in the guide search box:

http://www.perlreference.com/mod_perl//guide/porting.html#Exposing_Apache_Registry_secret

dave_dunstan wrote:

> I'm pretty new to mod_perl so I bet this one is a gimme:
>
> Variable "$variable" will not stay shared at
> /usr/lib/perl5/site_perl/5.005/Apache/MyModule.pm line 295.
>
> I get a bunch of these when I start httpd - can someone provide more insight
> on what's happening here - and maybe how to get rid of these ...??
>
> Dave Dunstan
> [EMAIL PROTECTED]



Re: How to run a secure mod_perl ?

1999-11-24 Thread Cliff Rayman

perhaps you can run your own apache server with mod_perl on a high-port on
the loopback interface.
he can then proxy all requests to your server using the methods
as spelled out in the mod_perl guide.

if you crash your own server - it is not going to effect his server at all.

just a thought,

cliff rayman
genwax.com

"Martin A. Langhoff" wrote:

> hi mod_perl gurus,
>
> I'm currently in dire problems (read sh*t):
>
> - In one week my Embperl powerd site debuts.
>
> - Just now, my webmaster tells me that I can't use Embperl _nor_
> ePerl. Previously he had told me to use ePerl o whatever I wanted, now
> he's worried about security.
>
> - He claims that he cannot allow me to run anything under
> mod_perl (and derivatives as Embperl) because mod_perl brings Apache
> down when it crashes.
>
> - On the other hand, he'll allow me to use perl in CGI scripts.
>
> - Of course that's not what I want :)  !!!
>
> - Is there a way to configure mod_perl so that it does not crash
> apache down? Or maybe it never does and he doesn't know?
>
> - For clarity: he's webmaster at the ISP where I host my sites.
> Not my own webmaster. *I'm* my own webmaster :)
>
> Thanks for your time.
>
> martin
> --
>- Martin Langhoff @ S C I M  Multimedia Technology -
> - http://www.scim.net  | God is real until  -
> - mailto:[EMAIL PROTECTED]  | declared integer   -



Re: Installation help

1999-11-24 Thread Cliff Rayman

that errors means that mod-perl is NOT installed in your http server.
somewhere you skipped an installation step.

if it were me - I'd start from step one and try it again.

cliff rayman
genwax.com

[EMAIL PROTECTED] wrote:

> I'm trying to setup ASP to work on apache, and as far as my understading
> that I need mod_perl has to be installed before installing ASP module, but
> I'm still confusing how to install mod_perl, I did as the manual said, and
> I installed without any error, but when i put the config in httpd.conf for
> the ASP to work then i got error and can't not start the apache..can
> anyone please help?
>
> error:
> [root@mail conf]# httpd start
> Syntax error on line 450 of /usr/local/apache/conf/httpd.conf:
> Invalid command 'PerlHandler', perhaps mis-spelled or defined by a module
> not in
> cluded in the server configuration
> /usr/sbin/httpd start: httpd could not be started
>
> my httpd config:
> Alias /asp/ /usr/local/htdocs/asp/
> 
>  SetHandler perl-script
>  PerlHandler Apache::ASP
>  PerlSetVar Global /tmp
> 
>
> thanks



Re: Duplicated emails from mod_perl list

1999-11-22 Thread Cliff Rayman

you are definetly receiving duplicates - so am I.  I know because some of
the duplicates
are ones I sent from last week.

cliff rayman
genwax.com

"Andrei A. Voropaev" wrote:

> Hi!
>
> Probably this is off-topic. But it's about the list itself. Why do I
> get OLD emails from time to time. Today I got about 7 or 8 of
> those. I'm absolutely positive that I've seen them once before. Some
> of those emails are dated Nov. 16th
>
> This happened 2 or 3 times already so I decided to ask. Maybe there's
> some problem? Does anyone else gets them?
>
> Andrei
>
> --



embperl-intermittant sig11 seg faults

1999-11-17 Thread Cliff Rayman

I am getting losts of SIGV 11 VIOLATIONS.  I have been
pulling my hair out for several weeks.  It does not happen on startup
seems to happen only after a child has been running a while.

I have reved up to latest and greatest. Rebuilt perl and everything
else from clean sources.  when I test it myself - everything runs
great.

any help greatly appreciated.

cliff rayman
genwax.com

===
here is my config -

Server: Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.8 OpenSSL/0.9.4
Embperl 1.2b11

Linux www.genwax.com 2.0.36 #1 Mon Dec 7 03:44:15 PST 1998 i686 unknown

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
osname=linux, osvers=2.0.36, archname=i686-linux
uname='linux www.genwax.com 2.0.36 #1 mon dec 7 03:44:15 pst 1998
i686 unknown '
hint=previous, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O2', gccversion=2.7.2.3
cppflags='-Dbool=char -DHAS_BOOL'
ccflags ='-Dbool=char -DHAS_BOOL'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'

cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Nov 16 1999 11:24:18
  @INC:
/usr/lib/perl5/5.00502/i686-linux
/usr/lib/perl5/5.00502
/usr/lib/perl5/site_perl/5.005/i686-linux
/usr/lib/perl5/site_perl/5.005
.


below is my backtrace



#0  0x80be37c in ap_palloc ()
#1  0x80be46d in ap_pstrdup ()
#2  0x80bedcd in ap_table_set ()
#3  0x80b5108 in XS_Apache_header_out ()
#4  0x81964e2 in Perl_pp_entersub ()
#5  0x81bff92 in Perl_runops_standard ()
#6  0x8167765 in perl_call_sv ()
#7  0x4013d7f5 in CallCV ()
#8  0x4013df3f in EMBPERL_EvalTransFlags ()
#9  0x4013df6b in EMBPERL_EvalTrans ()
#10 0x4013588f in ScanCmdEvals ()
#11 0x4013851c in EMBPERL_ProcessBlock ()
#12 0x40138783 in EMBPERL_ProcessSub ()
#13 0x401308f1 in XS_HTML__Embperl_ProcessSub ()
#14 0x81964e2 in Perl_pp_entersub ()
#15 0x81bff92 in Perl_runops_standard ()
#16 0x8167765 in perl_call_sv ()
#17 0x4013d7f5 in CallCV ()
#18 0x4013df3f in EMBPERL_EvalTransFlags ()
#19 0x4013df6b in EMBPERL_EvalTrans ()
#20 0x4013588f in ScanCmdEvals ()
#21 0x4013851c in EMBPERL_ProcessBlock ()
#22 0x40138783 in EMBPERL_ProcessSub ()
#23 0x401308f1 in XS_HTML__Embperl_ProcessSub ()
#24 0x81964e2 in Perl_pp_entersub ()
#25 0x81bff92 in Perl_runops_standard ()
#26 0x8167765 in perl_call_sv ()
#27 0x4013d7f5 in CallCV ()
#28 0x4013df3f in EMBPERL_EvalTransFlags ()
#29 0x4013df6b in EMBPERL_EvalTrans ()
#30 0x4013588f in ScanCmdEvals ()
#31 0x4013851c in EMBPERL_ProcessBlock ()
#32 0x4013e51c in EMBPERL_EvalMain ()
#33 0x40138261 in ProcessFile ()
#34 0x40138940 in EMBPERL_ExecuteReq ()
#35 0x401323b5 in XS_HTML__Embperl__Req_ExecuteReq ()
#36 0x81964e2 in Perl_pp_entersub ()
#37 0x81bff92 in Perl_runops_standard ()
#38 0x8167765 in perl_call_sv ()
#39 0x80abb2e in perl_call_handler ()
#40 0x80ab539 in perl_run_stacked_handlers ()
#41 0x80aa471 in perl_handler ()
#42 0x80c2bbb in ap_invoke_handler ()
#43 0x80d60d9 in ap_some_auth_required ()
#44 0x80d6138 in ap_process_request ()
#45 0x80cd901 in ap_child_terminate ()
#46 0x80cdb50 in ap_child_terminate ()
#47 0x80cdeaa in ap_child_terminate ()
#48 0x80ce3b1 in ap_child_terminate ()
#49 0x80cea53 in main ()




Re: Trying not to re-invent the wheel

1999-11-10 Thread Cliff Rayman

if you want to write this yourself - you will probably need to parse the
html in 'c' in order for it to be very quick.

I am using Embperl and it could be used for what you are doing such as:

[-  advertisement(252); -]
[ - news_item(923834,{BGCOLOR => "#0066FF"}); -]

obviously you have to write the routines to implement 'advertisement' and 'news

item', but it will do just about anything you can think of - so you will never
have a
'power' shortage.

I have not tried Mason - but from what I have read about it, it could
be a useful tool for what you are doing.

cliff rayman
genwax.com

Ian Mahuron wrote:

> As per someone's suggestion I'll ellaborate on what's in the HTML...
>
> Insert code for advertisment (there's 1,000's of different ads on the
> site.):
> 
>
> Insert news scroller:
> 
>
> There will be at least 50 similar tags.. so I'm not parsing for just a
> couple of tags like HTML::Template..
>
> I may implement IF/LOOPS/etc.. but not until I see the need.
>
> I've written up a few test benches for HTML::Parser.. it works ok, but it's
> not as fast as I would like it to be.
>
> Ian



Re: Embperl [- -] annoyance

1999-11-09 Thread Cliff Rayman

embperl escape character?

okay I'm reaching here.  something like

]] to indicate - ignore the next embperl character.  so something ugly like

[- $testdata=~m![^]]-]+!; -]

could work.  but you're right the \55 is much cleaner and easier to read.

cliff rayman
genwax.com

Gerald Richter wrote:

> > here's a suggestion - although I did not try it.
> >
> > [! $expr="[^-]+"; !]
> > [- $testdata=~m!$expr!go; -]
> >
>
> I also didn't tried it, but it should work this way.
>
> > if not - probably can work around it by placing this code in
> > a separate module and calling it with embperl.
> >
>
> Would work also, but seems too complicated to me.
>
> > looks like we need some kind of embperl escape character.
>
> What do you mean by "embperl escape character"?
>
> > no matter what you choose for embperl delimiters it can be broken
> > somewhere.
> >
>
> Yes.
>
> The simplest solution I see for now, is what David posted in his first mail:
>
> /...[^\55]+.../
>
> use \55 instead of -
>
> Gerald
>
> ---
> Gerald Richter  ecos electronic communication services gmbh
> Internet - Infodatenbanken - Apache - Perl - mod_perl - Embperl
>
> E-Mail: [EMAIL PROTECTED] Tel:+49-6133/925151
> WWW:http://www.ecos.de  Fax:+49-6133/925152
> ---



Re: Embperl [- -] annoyance

1999-11-09 Thread Cliff Rayman

here's a suggestion - although I did not try it.

[! $expr="[^-]+"; !]
[- $testdata=~m!$expr!go; -]

if not - probably can work around it by placing this code in
a separate module and calling it with embperl.

looks like we need some kind of embperl escape character.
no matter what you choose for embperl delimiters it can be broken
somewhere.

cliff rayman
genwax.com

Steve Willer wrote:

> On Tue, 9 Nov 1999, David Bushong wrote:
>
> > I was wondering (as Embperl embraces so very many hacks for the sake of
> > usefulness =) if it would be considered favorable to add a special case
> > for -] occurring inside of a regexp to be _not_ considered the end of
> > a embedded perl block.
>
> Ouch! Just last night, I had spent a good half-hour or perhaps even an
> hour trying to make a simple regular expression work. It had [^-] in it,
> and that's where the problem was (it said the replace spec was not
> terminated or something).
>
> Well, now I know.



embperl - EMBPERL_MAIL_ERRORS_TO - trigger

1999-11-02 Thread Cliff Rayman

I would like to be able to trigger an "error" so that the log section
associated with that embperl session gets mailed to me when
that session closes.

This is for errors in my logic or processing problems which are not
fatal enough to cause embperl to fail on its own.

cliff rayman
genwax.com



Re: No-Cache Question ?

1999-10-29 Thread Cliff Rayman

I use the following with regular headers, but try it with err headers to
see if it works as well:

  $r->err_header_out("Pragma","no-cache");
  $r->err_header_out("Cache-control","no-cache");

cliff rayman
genwax.com

Naren Dasu wrote:

> Hi,
>
> I am doing some testing with a  Apache/mod_perl server.  And since it is
> still under development, I do get an occasional server error ;-) .  How can
> I set no-cache on the Error Pages that the server generates ?
>
> I need to do this because the brower that I am using is very limited in
> capability, once it get an error page, it will not try to reload the
> URL(unless the page has no-cache set), have to reboot the device to get it
> to flush the cache.
>
> thanks in advance
> naren



embperl session handling doc changes

1999-10-21 Thread Cliff Rayman

.. i think this needs to be:
BEGIN {
 $ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker"
;
 $ENV{EMBPERL_SESSION_ARGS}= "DataSource=dbi:mysql:session
UserName=test" ;
}
 use Apache::Session::Embperl ;
 use HTML::Embperl ;

.. otherwise the 'use' statements get evaluated before the environment
variables have been set.

.. also some mention of the fact that the new Apache::Session is setup
in a TOTALLY different way from the old version. I never read the
Apache::Session docs since I used it as part of Embperl and never on its
own.  It took me a few minutes to realize that I had to use the keyword
FileStore and pick a locking class, as well as use the keyword Directory
in the ARGS.  Since I have never used any of the DBI stuff I ignored the
example args and did not notice that they were any different than the
ones used at 0.17.

cliff rayman
genwax.com



Re: Embperl [$ sub $] question

1999-10-19 Thread Cliff Rayman

I use it all the time to define subroutines.
They do not return values the way normal subroutines do however.
Perhaps Gerald needs to modify the documentation to reflect his.

cliff rayman
genwax.com

Jason Bodnar wrote:

> Can the new sub meta-command not be used to define functions?
>
> I tried:
>
> [$ sub foo $]
>  [+ shift +]
> [$ endsub $]
> [+ sub("bar") +]
>
> and got 0.
> ---
> Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems
>
> That boy doesn't know the difference between the Internet and a hair net. --
> Jason Bodnar



Re: httpd.conf problem.

1999-10-08 Thread Cliff Rayman

I've never used perl sections, but unless $RewriteRule is some magic variable,
the second assignment simply overwrites the first one.

I thought it had to be something along the lines of:

push(@RewriteRule , "/cgi-bin/printenv" , "/cgi-bin/slave.pl [PT]");

or

$RewriteRule{"/cgi-bin/printenv"}="/cgi-bin/slave.pl [PT]";

cliff rayman
genwax.com

Michael Hall wrote:

> On Fri, Oct 08, 1999 at 04:25:39PM +0200, Terje Malmedal wrote:
>
> > Inside a  section I want to configure mod_rewrite dynamically,
> > this works:
> >
> >   $RewriteRule = "/cgi-bin/printenv  /cgi-bin/slave.pl [PT]";
> >
> > If I do this:
> >
> >   $RewriteRule = "/cgi-bin/printenv  /cgi-bin/slave.pl [PT]";
> >   $RewriteRule = "/cgi-bin/test  /cgi-bin/slave.pl [PT]";
> >
> > the last RewriteRule will hide the first one.
> >
> > The following attempts to not work at all:
> >   push(@RewriteRule , "/cgi-bin/printenv  /cgi-bin/slave.pl [PT]");
> >   push(@RewriteRule , "/cgi-bin/printenv" , "/cgi-bin/slave.pl [PT]");
> >   push(@RewriteRule , "/cgi-bin/printenv" , "/cgi-bin/slave.pl", "[PT]");
> >   $RewriteRule{'/cgi-bin/printenv'} = "/cgi-bin/slave.pl [PT]";
> >
> > Am I missing something obvious?
>
>   Have you tried using the 'L' flag (see Apache manual) this will stop
> further processing, ie:
>
> $RewriteRule = "/cgi-bin/printenv  /cgi-bin/slave.pl [PT,L]";
> $RewriteRule = "/cgi-bin/test  /cgi-bin/slave.pl [PT,L]";
>
> --
> I've been dead before. - Captain Spock, Star Trek VI
>
> Mike Hall <[EMAIL PROTECTED]>, ICQ: #37292579, http://www.riverside.org
> System Administrator (MH993) (*nix, OS/2 certified - C, Perl, CGI hacker)



Re: Guide addition?

1999-10-07 Thread Cliff Rayman

i like it.
looks like you win.  winner gets to write the change and submit the diff.  :-)))

cliff rayman
genwax.com

Chip Turner wrote:

> Cliff Rayman <[EMAIL PROTECTED]> writes:
>
> > make __DATA__ available to which subroutine??
> >
> > only way I can think to do that effectively is: read the data, write it to a
> > temporary file, watching our for any security concerns, and replace the
> > standard DATA  file handle with on that is opened to the temporary file that
> > was written.
> >
> > cliff rayman
> > genwax.com
>
> Or just open the .cgi script, seek to the __DATA__ portion, and alias
> that filehandle over DATA when a given registry script executes.  No
> muss, no fuss, and probably more compatible than what you mention
> (seeking on DATA etc).
>
> Chip
>
> --
> Chip Turner   [EMAIL PROTECTED]
>   Programmer, ZFx, Inc.  www.zfx.com
>   PGP key available at wwwkeys.us.pgp.net



Re: Guide addition?

1999-10-07 Thread Cliff Rayman

make __DATA__ available to which subroutine??

only way I can think to do that effectively is: read the data, write it to a
temporary file, watching our for any security concerns, and replace the
standard DATA  file handle with on that is opened to the temporary file that
was written.

cliff rayman
genwax.com

Robin Berjon wrote:

> At 16:37 07/10/1999 +0200, Stas Bekman wrote:
> >> > So if you script included __END__ or __DATA__ token like:
>
> 
>
> >> Would it be possible to remove everything after __END__ before
> >> wrapping it into a function?
> >
> >I guess it's possible, we are using perl, don't we?
>
> Or perhaps even better, remove it from the code that will get wrapped but
> still make  available ?
>
> .Robin
> "What I like about deadlines is the lovely whooshing sound they make as
> they rush past." --Douglas Adams



Re: Embperl-1.2b9 and Apache:Session - Test failed

1999-10-05 Thread Cliff Rayman

you can check the archives - but I believe you have to run
Apache::Session 1.02 with Embperl 1.2b9 until
Apache::Session 1.04 comes out with Embperl-1.2b10.

cliff rayman
genwax.com

Martin Holz wrote:

> I have problems installing  Embperl-1.2b9, when
>  Apache::Session 1.03 is installed. When running
> make test, I get an error message:
>
>Starting httpd...   [Tue Oct  5 20:49:29 1999] [error] Undefined subroutine 
>&Apache::Session::LIFETIME called at blib/lib/HTML/Embperl.pm line 382.
>BEGIN failed--compilation aborted at 
>/home/holz/apache/HTML-Embperl-1.2b9/test/conf/startup.pl line 15.
>
>Syntax error on line 41 of 
>/home/holz/apache/HTML-Embperl-1.2b9/test/conf/httpd.conf:
>Undefined subroutine &Apache::Session::LIFETIME called at 
>blib/lib/HTML/Embperl.pm line 382.
>BEGIN failed--compilation aborted at 
>/home/holz/apache/HTML-Embperl-1.2b9/test/conf/startup.pl line 15.
>
>Test terminated with fatal error
>
> In comments in Embperl.pm suggest, that the test failed at a line,
> which is only executed for Apache::Session version=0.17,
> but I am running 1.03.
>
> Can someone help me?
>
> Thanks
> Martin Holz



Re: module for pushing?

1999-10-04 Thread Cliff Rayman

Writing the server side of this is fairly easy except...

Piece of cake with netscape but
MS IE does not support this very well.
someone asked this question last month.
you might want to look into the archives, find out who it was,
and how their research went.

cliff rayman
genwax.com

Jim Serio wrote:

> Here's my problem
>
> We are in the process of delivering a Web Cast
> and we would like to "control" the delivery of
> pages to the browser. For example, let's say you
> visit a Web Cast and you only need to load the
> first page. Subsequent pages are automatically
> pushed from the server. While is sounds like a
> "meta refresh" solution, the time between
> refreshes will vary. Is it possible to write
> a Perl module to automatically push content which
> is controlled via a CGI? I doubt it's possible on
> the server side but my experience with server
> push is limited so maybe some of you experts know.
>
> Jim
> --
> Jim Serio - [EMAIL PROTECTED]
> Producer, World of Coasters



Re: Chaining and redirection

1999-10-04 Thread Cliff Rayman

next point release of embperl.

cliff rayman
genwax.com

Dirk Lutzebaeck wrote:

> Cliff Rayman writes:
>
>  >  the exit is broken in some contexts.
>  > if this is part of a subroutine or called from an execute that may be the
>  > problem.
>
> Hmm, in my case there is no execute for sub envolved. I'm using
>
> [-
>   use Apache;
>   use Apache::Constants qw(REDIRECT);
>
>   $r = Apache->request;
>
>   $r->err_header_out("Location" => "/x.html");
>   $r->status(REDIRECT);
>   Apache::exit();
> -]
>
>  > this is going to be fixed in the next release
>
> what kind of release do you mean?
>
> Dirk



Re: Chaining and redirection

1999-10-01 Thread Cliff Rayman

 the exit is broken in some contexts.
if this is part of a subroutine or called from an execute that may be the
problem.

I am setting a global exit variable until this is fixed.  i.e

GWC.htm
[$ sub mysub $]
[- unless(dothis()){
$GWC::xitflg==1;
exit
-]
[$ endsub $]

somepage.htm
[- Execute({inputfile => 'GWC.htm', mtime => 1, import => 1})-]
[- mysub(); exit if $GWC::xitflg; -]

etc..


this is going to be fixed in the next release

cliff rayman
genwax.com

Dirk Lutzebaeck wrote:

> Cliff Rayman writes:
>  > if you are going to redirect in embperl then you need to put an exit after
>  > $r->status(REDIRECT).
>  > just setting that variable does not cause embperl to exit.  so,
>  >
>  > [-
>  >   use Apache;
>  >   use Apache::Constants qw(REDIRECT);
>  >
>  >   $r = Apache->request;
>  >
>  >   $r->header_out("Location" => "x.html");
>  >   $r->status(REDIRECT);
>  >   exit;
>  > -]
>  > 2
>  >
>  > should do the trick.
>
> I'm sorry Cliff, it doesn't work for me. I tried Apache::exit() and
> exit(). Does it work for you? Maybe I'm doing something wrong.
>
> Dirk



Re: Chaining and redirection

1999-10-01 Thread Cliff Rayman

if you are going to redirect in embperl then you need to put an exit after
$r->status(REDIRECT).
just setting that variable does not cause embperl to exit.  so,

[-
  use Apache;
  use Apache::Constants qw(REDIRECT);

  $r = Apache->request;

  $r->header_out("Location" => "x.html");
  $r->status(REDIRECT);
  exit;
-]
2

should do the trick.

cliff rayman
genwax.com

Dirk Lutzebaeck wrote:

> Hi,
>
> I haven't quite got it why I can't use redirection when using a chain
>
> The chain is
>
> 
> SetHandler perl-script
> Options ExecCGI
> PerlHandler Apache::OutputChain Apache::EmbperlChain Apache::PassFile
> 
>
> 
> SetHandler perl-script
> Options ExecCGI
> PerlHandler Apache::Embperl
> 
>
> y.html:
>
> 1
> [-
>   use Apache;
>   use Apache::Constants qw(REDIRECT);
>
>   $r = Apache->request;
>
>   $r->header_out("Location" => "x.html");
>   $r->status(REDIRECT);
> -]
> 2
>
> Requesting y.html returns just '1 2', no redirection is taking place.
>
> I have also tried $r->internal_redirect and
> $r->internal_redirect_handler also in combination with Apache::exit()
> all with the same result.
>
> It works when setting PerlHandler only to Apache::Embperl in the first
> FilesMatch.
>
> Dirk



Re: embperl-intermittant sig11 seg faults

1999-01-17 Thread Cliff Rayman

if you need more info on how to reproduce it - let me know.

Gerald Richter wrote:

> > PROBLEM SOLVED.
> >
> Fine :-)
>
> > the values for $req_rec in the page and in the subs started out the
> > same and then shifted after a period of time.
> >
>
> That was my suspicion...
>
> > I now pass in the $req_rec from the page to the subroutines and no
> > more segfaulting.
> >
> > Thanks for the help.
> >
> > Is this a problem that you are going to correct with your code?  If not,
> > a gotcha in the documentation is warranted.
> >
>
> It's a bug somewhere in Embperl, so I will correct it, but at the first shot
> I have to reproduce it here...
>
> > Are there any related gotcha's that I should be aware of based upon the
> > subroutine technique I am using?
> >
>
> I am not aware of any.
>
> > On another note - I install my site enmasse then restart apache
> > so the mtime
> > parameter
> > should not be a factor when I execute the subroutine package.
> >
>
> But you can simply leave out the mtime parameter and Embperl will make sure
> that it's cache correspond to the file on the filesystem.
>
> Gerald
>
> -
> Gerald Richterecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151
> WWW:http://www.ecos.de  Fax:  +49 6133 925152
> -



Re: Bug in libapreq makes form elements stick to an apache child

1999-01-17 Thread Cliff Rayman

`perldoc -f defined` yields a couple of sentences:

You may also use C to check whether a subroutine exists, by
saying C without parentheses.  On the other hand, use
of C upon aggregates (hashes and arrays) is not guaranteed to
produce intuitive results, and should probably be avoided.

why not use:

if(@foo_in)

instead of:

if (defined @foo_in)

cliff rayman
genwax.com

Jeffrey Baker wrote:

> Hi,
>
> I haven't had time to really hunt this bug to its source, but here is
> the report anyway.
>
> Take as an example the URI /program?foo=bar&foo=baz&foo=quux
>
> In program, which uses libapreq, I have code which looks like this:
>
> my @foo_in = $r->param('foo');
>
> @foo_in should not be defined if there are no foo arguments in the query
> string.  The problem is that once a foo argument has been seen, the
> @foo_in array is defined in that Apache child process for all time.  The
> array will not be defined in any other Apache child.
>
> To reproduce the problem, use the handler I have included below and
> perform the following steps:
>
> 1) Visit /yoururl
> 2) Visit /yoururl?foo=bar&foo=baz
> 3) Visit /yoururl as many times as you have Apache child processes
>
> Here is the handler:
>
> package JWB;
> use Apache::Request;
>
> use strict;
>
> sub handler {
> my $r = Apache::Request->new(shift());
> $r->status(200);
> $r->content_type("text/plain");
> $r->send_http_header;
>
> my @foo_in = $r->param('foo');
>
> if (defined @foo_in) {
> print "foo_in is defined!\n";
> }
> else {
> print "foo_in is not defined!\n";
> }
>
> print "foo_in has this many entries: ",scalar(@foo_in);
>
> return 0;
> }
>
> 1;
>
> Regards,
> Jeffrey
> --
> Jeffrey W. Baker * [EMAIL PROTECTED]
> Critical Path, Inc. * we handle the world's email * www.cp.net
> 415.808.8807



Re: embperl-intermittant sig11 seg faults

1999-01-17 Thread Cliff Rayman

PROBLEM SOLVED.

the values for $req_rec in the page and in the subs started out the
same and then shifted after a period of time.

I now pass in the $req_rec from the page to the subroutines and no
more segfaulting.

Thanks for the help.

Is this a problem that you are going to correct with your code?  If not,
a gotcha in the documentation is warranted.

Are there any related gotcha's that I should be aware of based upon the
subroutine technique I am using?

On another note - I install my site enmasse then restart apache so the mtime
parameter
should not be a factor when I execute the subroutine package.

Thanks for the help!
cliff rayman
genwax.com



Gerald Richter wrote:

> > at the top of every page I have the following:
> >
> > [- Execute({inputfile => '/usr/local/apache/share/GWCe.htm',
> > mtime => 1, import
> > => 1}); -]
>
> Using the mtime parameters together with an file may lead to problems, when
> the file changes, while the httpd is running, but this is another story and
> not the problem we are searching for...
>
> > [- ordpag(); exit if $GWCe::xitflg; -]
> >
>
> I would like to see if $$req_rec (note the two $$), has the same value in
> the page and in your subs. Could you add something like
>
> warn "req_rec=$$req_rec" inside your script and inside the subs, then, when
> the Segfault occurs, look in the Apache error log if the value has changed
> between the page and the sub.
>
> > I was thinking that one way out of this problem would be to put
> > the following at the top of every page:
> > [- Execute({inputfile => '/usr/local/apache/share/GWCe.htm',
> > mtime => 1, import
> > => 1}); -]
> > [- ordpag($req_rec); exit if $GWCe::xitflg; -]
> >
>
> This may solve your problem, you can give it a try.
>
> Gerald



Re: HTML::Embperl 1.2.0

1999-01-15 Thread Cliff Rayman

TRY:
[$ if( $#ffld<1 ) $]

cliff rayman
genwax.com


"Erich L. Markert" wrote:

> Just upgraded to v1.2.0 from 1.1.1 and ran into a problem.
>
> I have a document that contained an if else statement that basically
> checked to see if there were any parameters being passed.
>
> [$ if( ! defined %fdat ) $]
>
> display blank form
>
> [$ else $]
>
> redirect somewhere
>
> [$ endif $]
>
> This worked in 1.1.1 but quickly found that the behavior changed in
> 1.2.0.  I had to test for an actual value in %fdat.
>
> Has this been changed or is this a bug?
>
> BTW, great piece of software.



Re: embperl-intermittant sig11 seg faults

1999-01-15 Thread Cliff Rayman

at the top of every page I have the following:

[- Execute({inputfile => '/usr/local/apache/share/GWCe.htm', mtime => 1, import
=> 1}); -]
[- ordpag(); exit if $GWCe::xitflg; -]

then I have something like the following in GWCe.htm
( these are snippets of code to give you an idea.  you cannot run this as it
stands):

[$sub ordpag$]
[-
   if(exists $fdat{CMD_updchkout}) {
  clccrt();
  $req_rec->no_cache(1);
  $req_rec->header_out("Pragma","no-cache");
  $req_rec->header_out("Cache-control","no-cache");
  if(@GWCe::ordlin){
 rdrrtn("http://www.genwax.com/candle_orders/cart.htm");
 return;
  }
}
-]

[$sub rdrrtn $]
[-
   pcsuri($_[0]), $rdrloc=$GWCe::pcsuri;
   # i had written previously because i noticed that using http_headers_out
caused
less segfaults than the $req_rec version
   #use Apache;
   #use Apache::Constants qw(REDIRECT);
   #$req_rec->header_out("Location" => $rdrloc);
   #$req_rec->err_header_out("Location" => $rdrloc);
   #$req_rec->status(REDIRECT);
   $http_headers_out{'Location'} = "$rdrloc";
   exit;
-]

if I am doing something I should not be doing - let me know.

I was thinking that one way out of this problem would be to put
the following at the top of every page:
[- Execute({inputfile => '/usr/local/apache/share/GWCe.htm', mtime => 1, import
=> 1}); -]
[- ordpag($req_rec); exit if $GWCe::xitflg; -]

then put the following in GWCe.htm:
[$sub ordpag$]
[-
   $gwc_req_rec=shift;
   if(exists $fdat{CMD_updchkout}) {
  clccrt();
  $gwc_req_rec->no_cache(1);
  $gwc_req_rec->header_out("Pragma","no-cache");
  $gwc_req_rec->header_out("Cache-control","no-cache");
  if(@GWCe::ordlin){
 rdrrtn("http://www.genwax.com/candle_orders/cart.htm");
 return;
  }
}
-]

etc..

thanks for the help,

cliff rayman
genwax.com

Gerald Richter wrote:

> >
> > I am getting losts of SIGV 11 VIOLATIONS.  I have been
> > pulling my hair out for several weeks.  It does not happen on startup
> > seems to happen only after a child has been running a while.
> >
> > I have reved up to latest and greatest. Rebuilt perl and everything
> > else from clean sources.  when I test it myself - everything runs
> > great.
> >
>
> Your stackbacktrace, looks like you are doing nested call's to sub's and
> inside you call $req_rec -> header_out, right?
> Look's like the pointer to the Apache request rec is invalid.
>
> If you do the call to $req_rec -> header_out on the top level of your page
> (i.e. before calling the subs), does it SIGSEGVs also? If not, could you
> print out the value of $$req_rec (note the _two_ dollar signs!) on the top
> level and inside every sub. Does this value change inside of a sub? Are the
> sub's imported from another file or are they defined within the same file?
>
> Gerald
>
> -
> Gerald Richterecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151
> WWW:http://www.ecos.de  Fax:  +49 6133 925152
> -



Embperl - modperl SEGV 11 violations

1999-01-03 Thread Cliff Rayman

well - I've used up about 2 days trying to figure this out on my own.
My SEGV's occur intermittantly and from different in my embperl code,
but always when using $req_req. It helps to constantly switch back and
forth from SSL pages and non-SSLpages.
Sometimes I have to hit the server over 50 times to make it SEGV.

Here is an example confess upon catching SEGV 11

Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, [EMAIL PROTECTED] and inform
them of the time the error occurred, and
anything you might have done that may have caused the error.

[12492]ERR: 24: Line 8: Error in Perl code: caught SEGV! at
/usr/local/apache/share/GWCe.htm line 5
 HTML::Embperl::DOC::_2::__ANON__('SEGV') called at
/usr/local/apache/share/GWCe.htm line 140
 HTML::Embperl::DOC::_2::__ANON__ called at
/usr/local/apache/share/GWCe.htm line 1
 eval {...} called at /usr/local/apache/share/GWCe.htm line 1
 HTML::Embperl::DOC::_2::upddat() called at
/usr/local/apache/share/GWCe.htm line 219
 HTML::Embperl::DOC::_2::__ANON__ called at
/usr/local/apache/share/GWCe.htm line 216
 eval {...} called at /usr/local/apache/share/GWCe.htm line 216
 HTML::Embperl::DOC::_2::ordpag() called at
/usr/local/apache_1.3.9/htdocs/nov99_develope/candle_finder/index.htm
line 2
 HTML::Embperl::DOC::_6::__ANON__ called at
/usr/lib/perl5/site_perl/5.005/i686-linux/HTML/Embperl.pm line 639
 eval {...} called at
/usr/lib/perl5/site_perl/5.005/i686-linux/HTML/Embperl.pm line 639

HTML::Embperl::CleanCallExecuteReq('HTML::Embperl::Req=SCALAR(0x84b11a8)',

undef) called at
/usr/lib/perl5/site_perl/5.005/i686-linux/HTML/Embperl.pm line 863
 HTML::Emb

Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.8 OpenSSL/0.9.4
HTML::Embperl 1.2b10 [Fri Nov 5 15:54:04
1999]

relevant sections of my code are as follows:
---
ordpag() called at
/usr/local/apache_1.3.9/htdocs/nov99_develope/candle_finder/index.htm
line 2:

   [- Execute({inputfile => '/usr/local/apache/share/GWCe.htm', mtime =>

1, import => 1}); -]
[- ordpag(); exit if $GWCe::xitflg; -]   <<--- line 2


HTML::Embperl::DOC::_2::upddat() called at
/usr/local/apache/share/GWCe.htm line 219
HTML::Embperl::DOC::_2::__ANON__ called at
/usr/local/apache/share/GWCe.htm line 216

[$sub ordpag$]<<-- line 216
[-
   $GWCe::xitflg=0;
   upddat(); <<-- line 219
---
HTML::Embperl::DOC::_2::__ANON__('SEGV') called at
/usr/local/apache/share/GWCe.htm line 140

if($req_rec->uri!~m!(/candle_orders/)|(ordonline.htm)!){  <<-- line 140

[12492]ERR: 24: Line 8: Error in Perl code: caught SEGV! at
/usr/local/apache/share/GWCe.htm line 5
 HTML::Embperl::DOC::_2::__ANON__ called at
/usr/local/apache/share/GWCe.htm line 1

[$sub upddat$]  <<-- line 1
[-
   use Carp ();
   $SIG{'SEGV'} = sub {
  Carp::confess("caught SEGV!");  <<-- line 5
   }
-]


Linux x8.genwax.com 2.0.36 #4 Thu Jun 17 13:25:49 PDT 1999 i686 unknown
version 5.005_02 built for i686-linux
mod perl 1.21
mod_ssl-2.4.8-1.3.9
Apache Session 1.04
Embperl 1.2b10

config:
# 1999/08/31, cliff, add embperl
# PerlSetEnv EMBPERL_DEBUG 1
# PerlSetEnv EMBPERL_DEBUG 100
# PerlSetEnv EMBPERL_DEBUG 2105476
# debug with GWCe::dbgflg and write after each line
 PerlSetEnv EMBPERL_DEBUG 513
# PerlSetEnv EMBPERL_DEBUG 7341674
PerlSetEnv EMBPERL_MAIL_ERRORS_TO webmaster
PerlSetEnv EMBPERL_OPTIONS 8192
PerlSetEnv EMBPERL_VIRTLOG /embperl/log
PerlSetEnv EMBPERL_COOKIE_NAME GWCUID
PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com
PerlSetEnv EMBPERL_COOKIE_PATH /
PerlSetEnv EMBPERL_COOKIE_EXPIRES '31-Dec-2010 23:59:59 GMT'

PerlRequire /usr/local/apache/startup.pl


SetHandler  perl-script
PerlHandler HTML::Embperl
Options ExecCGI




SetHandler  perl-script
PerlHandler HTML::Embperl
Options ExecCGI



# 09-24-99, , cliff, add rewrite engine for non caching browser tricks
RewriteEngine On
RewriteLog /usr/local/apache/logs/rewrite_log
RewriteLogLevel 1
RewriteRule (.*)/___[0-9_]+___(.*)$ $1/$2

httpd -v and -l follow:
Server version: Apache/1.3.9 (Unix)
Server built:   Nov  5 1999 11:32:08
Server's Module Magic Number: 19990320:6
Server compiled with
 -D EAPI
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D USE_FCNTL_SERIALIZED_ACCEPT
 -D HTTPD_ROOT="/usr/local/apache_1.3.9"
 -D SUEXEC_BIN="/usr/local/apache_1.3.9/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_XFERLOG="logs/access_log"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"
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
  mo

Embperl - Apache redirect

1999-01-02 Thread Cliff Rayman

Should there by any difference between using?:

[-
   pcsuri($_[0]), $rdrloc=$GWCe::pcsuri;
   use Apache;
   use Apache::Constants qw(REDIRECT);
   $req_rec->header_out("Location" => $rdrloc);
   $req_rec->status(REDIRECT);
   exit;
-]

and:

[-
   pcsuri($_[0]), $rdrloc=$GWCe::pcsuri;
   $http_headers_out{'Location'} = $rdrloc;
   exit;
-]


I was having an intermittant problem with my redirects until I started
using the new http_headers_out directive.
The redirect was not being sent to the browser.  It could be I had
another error somewhere, but just wanted to report it to the list in
case someone else notices an issue using Apache redirect inside of
Embperl.

Apache/1.3.9 (Unix)
mod_perl/1.21
mod_ssl/2.4.7
OpenSSL/0.9.4
HTML-Embperl-1.2b10
perl, version 5.005_02 built for i686-linux

cliff rayman
genwax.com