Re: Help required on compile

2001-07-26 Thread Murugan K

Hai
 Great , Now it is building with your added MM_Win32.pm . 
Nmake install also going through without breaking . But problem is , as per readme , i 
have to copy the mod_perl.so  or mod_perl.dll
to  apache/module  directory and try the nmake test.

But i am not able to find the mod_perl.so or mod_perl.dll after building .

Thanks for your  help .

Regards
K.Murugan






 




>>> "Randy Kobes" <[EMAIL PROTECTED]> 07/26/01 07:00PM >>>

- Original Message -
From: "Murugan K" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "<" <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 7:34 AM
Subject: Re: Help required on compile


> Hai
>
>   I added the'PERL => "$^X",' command the in the  makefile.pl .  But
it is not throwing any perl path error.  it is creating the makefile.
>
> But when you try nmake , it is throwing the following error
> makefile(889)cannot have : and ::dependents for same  targets.
>

Hi,
 I didn't copy this to the mod_perl list, as I've attached
my ExtUtils\MM_Unix.pm and ExtUtils\MM_Win32.pm files
to try  Does using these work?

best regards,
randy kobes





Re: Porting CGI scripts help needed

2001-07-26 Thread perrin

Quoting Bryan Coon <[EMAIL PROTECTED]>:
> Each cgi simply calls 'use global;' and then off we go.  However, after
> moving all this stuff into /perl, none of the subs in the custom .pl
> files
> are found, I get a complaint:
> Undefined Subroutine &Apache::ROOT::compar_2ecgi::checkUser called at

See http://perl.apache.org/guide/porting.html#Name_collisions_with_Modules_and

The short answer is that all of your required files need to declare a package
name, and then you can either use the full name to access their functions or
have them export the function names.

- Perrin



Problem with arrayrefs in PSections

2001-07-26 Thread Steve Piner


I've come across an oddity in configuring Apache through Perl sections.

If I have a local as follows,

my %access = (
Order => 'deny,allow',
Deny => 'from all',
Allow => [['from', '1.2.3.0/24'],
  ['from', '192.168.1.0/24']],
);

then set up locations (or directorys) as follows

%Location = (
'/server-status' => {
SetHandler => 'server-status',
%access,
},
'/server-info' => {
SetHandler => 'server-info',
%access,
},
);

Then only one of the locations will let me access it. 

http://servername/server-status will let me in,
http://servername/server-info won't.

The problem seems to be with the shared reference: changing the 'Allow'
line above to
Allow => 'from all' works - though without the desired restriction of
course, as does 
changing the code above to the following.

%Location = (
'/server-status' => {
SetHandler => 'server-status',
%access,
Allow => [['from', '1.2.3.0/24'],
  ['from', '192.168.1.0/24']],
},
'/server-info' => {
SetHandler => 'server-info',
%access,
Allow => [['from', '1.2.3.0/24'],
  ['from', '192.168.1.0/24']],
},
);

Is this a bug, a stupid-user problem, or something else?

I'm using Apache/1.3.20, mod_perl/1.25 and 1.26, and Perl v5.6.1


Steve

-- 
Steve Piner
Web Applications Developer
Marketview Limited
http://www.marketview.co.nz



RE: Porting CGI scripts help needed

2001-07-26 Thread Rob Bloodgood

> Heres what I did:
> I had many scripts in one dir that shared many things; subroutines, global
> variables and modules.  I wanted to clean things up, so I created a module
> called global.pm structured like this:



> The custom stuff scripts all end in 1;, and are loaded with my custom
> subroutines.  For example, I have one called cgi.pl, that
> contains all subs
> for cgi related tasks, i.e. checkUser(), which verifies a users cookie.
>
> Each cgi simply calls 'use global;' and then off we go.  However, after
> moving all this stuff into /perl, none of the subs in the custom .pl files
> are found, I get a complaint:
> Undefined Subroutine &Apache::ROOT::compar_2ecgi::checkUser
> called at .
>
> compare.cgi calls 'use global;' and then 'checkUser()'.

global.pm isn't exporting the symbol names it's defining.
if you were to refer to global::checkUser() in one of your scripts, and it
worked, then mebbe an EXPORT() list for global.pm is in order

so that the function names get defined in the package
(Apache::ROOT::compar_2ecgi, made up by apache on the spot)
that is accessing them.

HTH!

L8r,
Rob




Re: note on wombat

2001-07-26 Thread Jeremy Howard

brian moseley wrote:
> for those of you who were at the presentation this morning
> and wanted more info on wombat - here are the urls:
>
>   http://libservlet.sourceforge.net
>   http://wombat.sourceforge.net
>
Unfortunately I wasn't at the preso, but I've looked at the slides you've
got up on your site.

But... I don't get it :-( Where does this fit--it's all very new to me?

Is it another templating engine? ;-) Is it a session manager? Is it solving
some other problem that I haven't come across yet?

In the preso you mention an IMAP layer. What is this, and how would it work?
Would it provide an IMAP server, or is it an interface to an existing IMAP
server?

Sorry for the dumb questions--from the web site it all sounds intriguing,
but it's gone straight over my head!





Re: UNSUBSCRIBE?????????????

2001-07-26 Thread ___cliff rayman___

turn on your mail headers. everything you need to
know is in there.  if you are not getting properly unsubscribed,
perhaps your email address in the netscape preferences is
not the same one as you subscribed as.  you should be
able to discern the correct e-mail address from the
Return-Path header.

OTR Comm wrote:

> I have tried and tried and tried to get unsubscribed from this list and
> it does not seem to happen.
>
> Anybody have any clues about how to do this?

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





Re: UNSUBSCRIBE?????????????

2001-07-26 Thread Sean Chittenden

Read the mail headers...  -sc

On Thu, Jul 26, 2001 at 04:22:21PM -0700, OTR Comm wrote:
> Return-Path: <[EMAIL PROTECTED]>
> Delivered-To: [EMAIL PROTECTED]
> Received: (qmail 84735 invoked from network); 26 Jul 2001 23:22:44 -
> Received: from h31.sny.collab.net (HELO apache.org) (64.208.42.41)
>   by perrin.tgd.net with SMTP; 26 Jul 2001 23:22:44 -
> Received: (qmail 44418 invoked by uid 500); 26 Jul 2001 23:22:17 -
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Precedence: bulk
> list-help: 
> list-unsubscribe: 
> list-post: 
> Delivered-To: mailing list [EMAIL PROTECTED]
> Received: (qmail 44386 invoked from network); 26 Jul 2001 23:22:16 -
> Message-ID: <[EMAIL PROTECTED]>
> Date: Thu, 26 Jul 2001 16:22:21 -0700
> From: OTR Comm <[EMAIL PROTECTED]>
> X-Mailer: Mozilla 4.06 [en] (WinNT; U)
> MIME-Version: 1.0
> To: [EMAIL PROTECTED]
> Subject: UNSUBSCRIBE?
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> I have tried and tried and tried to get unsubscribed from this list and
> it does not seem to happen.
> 
> Anybody have any clues about how to do this?
> 

-- 
Sean Chittenden

 PGP signature


Re: file upload memory leak

2001-07-26 Thread Jeremy Howard

Jack Cushman wrote:
> I am having a problem with very large file uploads (eg 100 MB). While the
> files load, the apache process stays at about 12000 K (the ps VSZ size).
> When the file finishes uploading, the thread suddenly jumps to over
20.
> My guess is that something is loading the whole file into ram, but I'm not
> sure what.
>
> I am running CGI.pm version 2.56, mod_perl version 1.25, and Apache
version
> 1.3.19.
>
Try the latest version of libapreq.

  perl -MCPAN -e 'install Apache::Request'

should do it.





UNSUBSCRIBE?????????????

2001-07-26 Thread OTR Comm

I have tried and tried and tried to get unsubscribed from this list and
it does not seem to happen.

Anybody have any clues about how to do this?




note on wombat

2001-07-26 Thread brian moseley


for those of you who were at the presentation this morning
and wanted more info on wombat - here are the urls:

  http://libservlet.sourceforge.net
  http://wombat.sourceforge.net

i'm working really hard on getting everything pulled
together so you can download and run the thing. the actual
distributions aren't available yet (the links on the wombat
front page are dead), but they should be by the end of the
weekend (once i get back from the conference and have some
time to clean up some things). i'll post a msg to the
modperl and wombat lists when it's all ready.

oh and, thanks again for showing up and having patience :) i
just can't seem to get my shit together for these
presentations.. and half an hour REALLY isn't enough time to
give a good overview.





RE: Porting CGI scripts help needed

2001-07-26 Thread Joe Breeden

You might try adding "use lib '/path/to/global.pm';" to you startup.pl.
(Without the "s of course)

Good luck.

--Joe Breeden

--
Sent from my Outlook 2000 Wired Deskheld (www.microsoft.com)


> -Original Message-
> From: Bryan Coon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 6:01 PM
> To: '[EMAIL PROTECTED]'
> Subject: Porting CGI scripts help needed
> 
> 
> Hi,
> 
> I have (happily) compiled and configured Apache with 
> mod_perl, mod_ssl,
> mod_php and DSO.  Whee!
> 
> Now I am working on porting my scripts over...
> 
> I have always used strict and perl -w, so for the most part, 
> I think I can
> just pop my cgis in the /perl directory as Ive defined it in 
> httpd.conf.
> 
> However, I had to implement some trickery for my scripts a 
> while ago via
> require/use and am having problems getting my scripts to work.
> 
> Heres what I did:
> I had many scripts in one dir that shared many things; 
> subroutines, global
> variables and modules.  I wanted to clean things up, so I 
> created a module
> called global.pm structured like this:
> ---
> use strict;
> 
> ## Local parameters
> our $cgibin = "http://path/cgi-bin";;
> our $htmldir = "/apache/htdocs"
> our $a = "/some/path";
> our $b = "/some/other/path";
> 
> ## Common modules
> use CGI qw(:standard);
> use DBI;
> use Data::Table;
> 
> ## Custom stuff
> require "/path/to/custom/script1.pl";
> require "/path/to/custom/script2.pl";
> 1;
> ---
> 
> The custom stuff scripts all end in 1;, and are loaded with my custom
> subroutines.  For example, I have one called cgi.pl, that 
> contains all subs
> for cgi related tasks, i.e. checkUser(), which verifies a 
> users cookie.
> 
> Each cgi simply calls 'use global;' and then off we go.  
> However, after
> moving all this stuff into /perl, none of the subs in the 
> custom .pl files
> are found, I get a complaint:
> Undefined Subroutine &Apache::ROOT::compar_2ecgi::checkUser 
> called at .
> 
> compare.cgi calls 'use global;' and then 'checkUser()'.  
> 
> What am I doing wrong with this?  Any ideas?  
> 
> Thanks!
> Bryan
> 



Porting CGI scripts help needed

2001-07-26 Thread Bryan Coon

Hi,

I have (happily) compiled and configured Apache with mod_perl, mod_ssl,
mod_php and DSO.  Whee!

Now I am working on porting my scripts over...

I have always used strict and perl -w, so for the most part, I think I can
just pop my cgis in the /perl directory as Ive defined it in httpd.conf.

However, I had to implement some trickery for my scripts a while ago via
require/use and am having problems getting my scripts to work.

Heres what I did:
I had many scripts in one dir that shared many things; subroutines, global
variables and modules.  I wanted to clean things up, so I created a module
called global.pm structured like this:
---
use strict;

## Local parameters
our $cgibin = "http://path/cgi-bin";;
our $htmldir = "/apache/htdocs"
our $a = "/some/path";
our $b = "/some/other/path";

## Common modules
use CGI qw(:standard);
use DBI;
use Data::Table;

## Custom stuff
require "/path/to/custom/script1.pl";
require "/path/to/custom/script2.pl";
1;
---

The custom stuff scripts all end in 1;, and are loaded with my custom
subroutines.  For example, I have one called cgi.pl, that contains all subs
for cgi related tasks, i.e. checkUser(), which verifies a users cookie.

Each cgi simply calls 'use global;' and then off we go.  However, after
moving all this stuff into /perl, none of the subs in the custom .pl files
are found, I get a complaint:
Undefined Subroutine &Apache::ROOT::compar_2ecgi::checkUser called at .

compare.cgi calls 'use global;' and then 'checkUser()'.  

What am I doing wrong with this?  Any ideas?  

Thanks!
Bryan



file upload memory leak

2001-07-26 Thread Jack Cushman

Hi --

I am having a problem with very large file uploads (eg 100 MB). While the
files load, the apache process stays at about 12000 K (the ps VSZ size).
When the file finishes uploading, the thread suddenly jumps to over 20.
My guess is that something is loading the whole file into ram, but I'm not
sure what.

I am running CGI.pm version 2.56, mod_perl version 1.25, and Apache version
1.3.19.

Thanks...

--Jack Cushman




Re: Apache::DBI

2001-07-26 Thread Ken Y. Clark

On Thu, 26 Jul 2001, Castellon, Francisco wrote:

> Date: Thu, 26 Jul 2001 07:48:14 -0600
> From: "Castellon, Francisco" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Apache::DBI
>
>   Does anyone know if Apache::DBI is included with mod_perl? if not
> could someone tell me where i could get it from?
>

http://cpan.org/

ky




Apache::DBI

2001-07-26 Thread Castellon, Francisco

Does anyone know if Apache::DBI is included with mod_perl? if not
could someone tell me where i could get it from?



Re: Help required on compile

2001-07-26 Thread Sisyphus


- Original Message -
From: "Murugan K" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: ">" <<[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 10:34 PM
Subject: Re: Help required on compile


Hai

  I added the'PERL => "$^X",' command the in the  makefile.pl .  But  it
is not throwing any perl path error.  it is creating the makefile.

-

Yes - it creates the makefile, but the makefile that it creates contains
errors. I doubt that you'll be able to build the module until you get rid of
the 'Unable to find...' error. I've run across this problem a few times, and
the remedy I posted has (until now) always worked.
Still, if it's not working for you, then there must be some other cause.
 You *did* put it inside the 'WriteMakefile()' section ?).

I did, at one stage, look a little more closely at this problem and came up
with the following:

1) In 'MakeMaker.pm'at about line 192, change:
HTMLLIBPODS HTMLSCRIPTPOD IMPORTS
to
HTMLLIBPODS HTMLSCRIPTPODS IMPORTS

2) In 'Manifest.pm'at about line 260, change:
   return &cp if $Is_VMS;
to
   return &cp if $Is_VMS or ($^O eq 'MSWin32' and Win32::IsWin95());

I haven't verified to my satisfaction that these changes always fix the
situation, but when I made those changes to a 'perl' that had the problem
you describe, I found the problem went away, and I no longer had to amend
the 'Makefile.pl' in the way already stated.

I would expect that if you can't resolve the problem with the 'Makefile.pl'
amendment, then making those changes won't help either. (Or you may find
that those 'changes' are already in place.) But it's worth a try.

Cheers,
Rob




Re: Help required on compile

2001-07-26 Thread Murugan K

Hai

  I added the'PERL => "$^X",' command the in the  makefile.pl .  But  it is not 
throwing any perl path error.  it is creating the makefile.

But when you try nmake , it is throwing the following error
makefile(889)cannot have : and ::dependents for same  targets.


#
# --- MakeMaker staticmake section:

# --- MakeMaker makeaperl section ---
MAP_TARGET= perl
FULLPERL  = c:\perl\5.6.1\bin\MSWin32-x86\perl.exe

$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
$(MAKE) -f $(MAKE_APERL_FILE) $@
#

>>> "Sisyphus" <[EMAIL PROTECTED]> 07/26/01 05:42PM >>>

- Original Message -
From: "Randy Kobes" <[EMAIL PROTECTED]>
To: "Murugan K" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 3:36 PM
Subject: Re: Help required on compile


> On Wed, 25 Jul 2001, Murugan K wrote:
>
> > Hai
> > I am trying to build Mod-perl_1.26  on Windows NT.  For that i
> > installed perl5.6.1 and apache 1.3.19 on my windows machine ( "C"
drive).
> > After that  (as per read me ) , i have to run  the makefile.pl .
> > But that is giving the following error.
> >
> > Perl makefile.pl
> >
> > Checking if your kit is complete...
> > Looks good
> > Unable to find a perl 5 (by these names:
> > C:\Perl\5.6.1\bin\MSWin32-x86\perl.exe
> > miniperl perl perl5 perl5.6.1, in these dirs:
> [ ... ]
>

I tried posting this earlier.

The problem can usually be overcome by including:
 'PERL => "$^X",'
 in the 'WriteMakefile()' section of 'Makefile.pl'.

Give that a try.

Cheers,
Rob





Re: Help required on compile

2001-07-26 Thread Sisyphus


- Original Message -
From: "Randy Kobes" <[EMAIL PROTECTED]>
To: "Murugan K" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 3:36 PM
Subject: Re: Help required on compile


> On Wed, 25 Jul 2001, Murugan K wrote:
>
> > Hai
> > I am trying to build Mod-perl_1.26  on Windows NT.  For that i
> > installed perl5.6.1 and apache 1.3.19 on my windows machine ( "C"
drive).
> > After that  (as per read me ) , i have to run  the makefile.pl .
> > But that is giving the following error.
> >
> > Perl makefile.pl
> >
> > Checking if your kit is complete...
> > Looks good
> > Unable to find a perl 5 (by these names:
> > C:\Perl\5.6.1\bin\MSWin32-x86\perl.exe
> > miniperl perl perl5 perl5.6.1, in these dirs:
> [ ... ]
>

I tried posting this earlier.

The problem can usually be overcome by including:
 'PERL => "$^X",'
 in the 'WriteMakefile()' section of 'Makefile.pl'.

Give that a try.

Cheers,
Rob




Re: Help required on compile

2001-07-26 Thread Murugan K

Thanks for your info.

I  tried the  same thing for latest sources also. i am having the same problem.   Perl 
path is ok.

It is creating the makefile . But if we see my  following error message ,  

I am trying to build the mod_perl sources on Windows NT machine . but how i am getting 
CP (unix command ) command error.

 Can you please clarify my doubts

1)  Am i missing some setup for Windows NT machine 
2) Tthe makefile which is created by makefile.pl  is it suitable for Windows.

Once again attached my makefile for your reference.  I am following all the things 
which are in ReadME.

Please help me to solve this problem.

Thanks in advance

Regards
K.Murugan

Checking if your kit is complete...
Looks good
Unable to find a perl 5 (by these names: C:\Perl\5.6.1\bin\MSWin32-x86\perl.exe 
miniperl perl perl5 perl5.6.1, in these dirs:
 D:\Program Files\DevStudio\SharedIDE\BIN
 D:\Program Files\DevStudio\VC\BIN D:\Program Files\DevStudio\VC\BIN\WINNT 
c:\perl\5.6.1\bin\mswin32-x86 E:\DevStudio\VC\BIN E:\DevStudio\VC\BIN\WINNT
 c:\perl\5.6.1\bin\MSWin32-x86)

Writing Makefile for Apache
Writing Makefile for Apache::Connection
Writing Makefile for Apache::Constants
Writing Makefile for Apache::File
Writing Makefile for Apache::Leak
Writing Makefile for Apache::Log
Writing Makefile for Apache::ModuleConfig
Writing Makefile for Apache::PerlRunXS
Writing Makefile for Apache::Server
Writing Makefile for Apache::Symbol
Writing Makefile for Apache::Table
Writing Makefile for Apache::URI
Writing Makefile for Apache::Util
Writing Makefile for mod_perl


After that , if i try the nmake install - it is giving the following error


cp lib/Apache/test.pm blib\lib\Apache\test.pm
cp lib/Apache/FakeRequest.pm blib\lib\Apache\FakeRequest.pm
cp lib/Apache/Constants/Exports.pm blib\lib\Apache\Constants\Exports.pm
cp mod_perl.pod blib\lib\mod_perl.pod
cp lib/Bundle/Apache.pm blib\lib\Bundle\Apache.pm

The name specified is not recognized as an
internal or external command, operable program or batch file.

NMAKE : fatal error U1077: '..\0' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.




>>> Randy Kobes <[EMAIL PROTECTED]> 07/26/01 11:06AM >>>
On Wed, 25 Jul 2001, Murugan K wrote:

> Hai
> I am trying to build Mod-perl_1.26  on Windows NT.  For that i
> installed perl5.6.1 and apache 1.3.19 on my windows machine ( "C" drive).
> After that  (as per read me ) , i have to run  the makefile.pl .
> But that is giving the following error.
>
> Perl makefile.pl
>
> Checking if your kit is complete...
> Looks good
> Unable to find a perl 5 (by these names:
> C:\Perl\5.6.1\bin\MSWin32-x86\perl.exe
> miniperl perl perl5 perl5.6.1, in these dirs:
[ ... ]

Assuming Perl is in your PATH, do you have the same problem
building other modules? If not, try building again
within a clean source tree. If this is a general problem, try
editing your ExtUtils\MM_Win32.pm file - search for the string
"Unable to find". It's probably the backticks in the vicinity
that's causing this.

best regards,
randy kobes



 Makefile


modperl@apache.org

2001-07-26 Thread Kenny Gatdula

John,
I suggest adding 'use strict' at the top of your script. That will help you 
track down 'variables that won't stay shared'. See the guide for 
more.  http://perl.apache.org/guide/

http://thingy.kcilink.com/modperlguide/porting/An_Easy_Break_in.html


hope this helps,
Kenny

At 03:03 AM 7/26/2001 -0500, John Buwa wrote:
>Hello,
>
>Some more info on the problem i described before:
>
>#!/usr/bin/perl -w
>
>use Fcntl ':flock'; # import LOCK_* constants
>use CGI::Apache qw(:standard);
>use CGI qw(:cgi-lib);
>require "dbcfg.pl";
>use diagnostics;
>&ReadParse(*input);
>if ($input{'new'} eq "on") {&add_account;}
>  if ($input{'action'} eq "something") {&something;}
>  if ($input{'action'} eq "something2") {&something2;}
>  if ($input{'action'} eq "something3") {&something3;}
> 
>else {&show_menu;}
>
>sub show_menu {
>somecode here }
>
>sub something {
>some code here }
>
>sub something2 {
>somecode here }
>
>Now the first routing it hits is a login which grabs the userid and 
>password as below:
>$user = "";
>$pass = "";
>$user = $input{'userid'};
>$pass = $input{'password'};
>
>then it validates the user and jumps to the show menu routine.
>
> From here alot of options are available if i am at the main menu and hit 
> refresh all things are correct. But if i say click on the something2 
> option and goto the something2 routine all variables $user and $pass are 
> correct. If i hit refresh it is still correct. Now if i hit the 
> backbutton in my browser to go back to the main menu the $user and $pass 
> vairable now gets doubled? So if your login WAS $user=$joe your 
> information will now be $user=joejoe and NOW if you hit refresh it keeps 
> adding $user=joejoejoejoe etc..same for the $pass and every other 
> variable used.
>
>I hope this sheds some light on this problem as i am clueless at this 
>point. The same code runs without these errors on a regular apache setup 
>without mod perl it only occurs on a modperl server.
>
>Any inofmration is greatly greatly apreciated!
>
>Thanks,
>John Buwa




Re: cached value !!

2001-07-26 Thread raptor

thanx alot I also thought it has to be closure... but didn't done it in the
right way...
i.e. i was doing this way :") :

{
 my $firstcall = 1;
 sub checkSomething {
 if ($firstcall) {$firstcall = 0; return 0}
code ...
 };
}

but it has to be anonymous ...:")


> raptor wrote:
>
> > hi,
> >
> > I have the following problem... a module/object that use a callback
> > func..example :
> >
> > use Blah;
> > my $obj = new Blah(...);
> >
> > ..later on ...
> >
> > my $firstcall = 1;
> > sub checkSomething {
> > if ($firstcall) {$firstcall = 0; return 0}
> >code ...
> > };
> >
> > $$obj{checkCode} = \&checkSomething;
> >
> > $obj->callSomemethod();
> >
> > the problem is that during the invocations of the script the $firstcall
> > sometimes stays "0", instead to be initialised to "1" on every
invocation of
> > the script  any ideas how can I cure this 
> >
> > Thanx alot in advance...
> > =
> > iVAN
> > [EMAIL PROTECTED]
> > =
>
> cf manual:
> http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S
>
> --
> My mother always used to tell me, "The early bird gets the worm."
> The message seemed pretty clear to me: If you sleep late, you're
> a lot less likely to be killed by a bird.
> -- Elliott Downing
>
>
>




Re: cached value !!

2001-07-26 Thread Nouguier Olivier

raptor wrote:

> hi,
>
> I have the following problem... a module/object that use a callback
> func..example :
>
> use Blah;
> my $obj = new Blah(...);
>
> ..later on ...
>
> my $firstcall = 1;
> sub checkSomething {
> if ($firstcall) {$firstcall = 0; return 0}
>code ...
> };
>
> $$obj{checkCode} = \&checkSomething;
>
> $obj->callSomemethod();
>
> the problem is that during the invocations of the script the $firstcall
> sometimes stays "0", instead to be initialised to "1" on every invocation of
> the script  any ideas how can I cure this 
>
> Thanx alot in advance...
> =
> iVAN
> [EMAIL PROTECTED]
> =

cf manual:
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S

--
My mother always used to tell me, "The early bird gets the worm."
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
-- Elliott Downing






cached value !!

2001-07-26 Thread raptor

hi,

I have the following problem... a module/object that use a callback
func..example :

use Blah;
my $obj = new Blah(...);

..later on ...

my $firstcall = 1;
sub checkSomething {
if ($firstcall) {$firstcall = 0; return 0}
   code ...
};

$$obj{checkCode} = \&checkSomething;

$obj->callSomemethod();

the problem is that during the invocations of the script the $firstcall
sometimes stays "0", instead to be initialised to "1" on every invocation of
the script  any ideas how can I cure this 

Thanx alot in advance...
=
iVAN
[EMAIL PROTECTED]
=




Re: Help needed with compile

2001-07-26 Thread Ian Stuart

On Wednesday 25 July 2001 23:22, Bryan Coon wrote:
> Hi, I am trying to compile Apache with a bunch of modules and DSO.  I
> cant find any documentation that covers all of this though.
> perl.apache.org/guide/ give lots of combination examples, but not
> all.
>
> I would like to build Apache 1.3.20 with mod_ssl, mod_perl, mod_php
> and DSO support, and for apache, --prefix=/apachessl.
>
> Can anyone give me either a site that has explicit instructions on
> how to do this?  Or maybe an example?
Here's what I'd extrapolate from the mod_perl installation guide:

Make a working copy of plain apache (with a binary called httpd_ssl), 
vis:

make --with-layout=MY_NEW  --target=httpd_ssl --enable-module=rewrite 
--disable-module=userdir --enable-module=info --server-uid=foo 
--server-gid=bar

*Note* I always add a '--show-layout' to the end, to ensure that things 
are installing where I want them to go!

This requires you to edit the file config.layout: I added a section 
thus:
-  section of config.layout ---
#   My own standard layout
#   Based on GNU systems

prefix:/usr/local
exec_prefix:   $prefix
bindir:$exec_prefix/bin
sbindir:   $exec_prefix/sbin
libexecdir:$exec_prefix/libexec
mandir:$prefix/man
sysconfdir:$prefix/httpd/conf
datadir:   $prefix/share
iconsdir:  $prefix/icons
htdocsdir: $datadir/htdocs
cgidir:$datadir/cgi-bin
includedir:$prefix/include
localstatedir: /var
runtimedir:/var/run
logfiledir:/var/local/http/log
proxycachedir: /var/local/http/proxy+

- end of section 

You then need to make the mod_ssl & mod_php stuff (with 'make', 'make 
test' & 'make install')
*note*, I've never done this, so I don't know if the test session uses 
a web server - if so, read the mod_perl bit first!

Now make the mod_perl stuff, vis:
perl Makefile.PL APACHE_SRC=../apache_1.3.20/src EVERYTHING=1 
USE_APACI=1 DO_HTTPD=1 ALL_HOOKS=1 SSL_BASE='{place}' 
APACI_ARGS='--with-layout=MY_NEW  --target=httpd_ssl 
--enable-module=rewrite --disable-module=userdir --enable-module=info 
--activate-module=src/modules/perl/libperl.a 
--activate-module=src/modules/phpx/libpnpx.a --server-uid=foo 
--server-gid=bar'

(see http://www.php.net/manual/en/install.apache.php fot PHP install 
stuff.)

To load mod_perl as a DSO, add '--module-shared=perl', so I guess that 
you may be able to do '--enable-shared=php' .-- again, I've never done 
it, so I don't know..

PS: Perl as a DSO (a) is not recommended, and (b) requires a version of 
perl that has been tinkered with - see the mod-perl installation guide.


Hope this helps...
-- 
   --==**==--
Ian Stuart - EDINA, DataLibrary, University computing services.
-
A man depriving some village, somewhere, of a first-class idiot
-
http://lucas.ucs.ed.ac.uk/



modperl@apache.org

2001-07-26 Thread John Buwa



Hello, 
 
Some more info on the problem i described 
before:
 
#!/usr/bin/perl -w
 
use Fcntl ':flock'; # import LOCK_* 
constants
use CGI::Apache qw(:standard);use CGI 
qw(:cgi-lib);require "dbcfg.pl";use 
diagnostics;&ReadParse(*input);
if ($input{'new'} eq "on") 
{&add_account;} if 
($input{'action'} eq "something") 
{&something;} if 
($input{'action'} eq "something2") 
{&something2;} if 
($input{'action'} eq "something3") 
{&something3;}    else 
{&show_menu;}
 
sub show_menu {
somecode here }
 
sub something {
some code here }
 
sub something2 {
somecode here }
 
Now the first routing it hits is a login which 
grabs the userid and password as below:
$user = "";
$pass = "";
$user = $input{'userid'};
$pass = $input{'password'};
 
then it validates the user and jumps to the show 
menu routine.
 
From here alot of options are available if i am at 
the main menu and hit refresh all things are correct. But if i say click on the 
something2 option and goto the something2 routine all variables $user and $pass 
are correct. If i hit refresh it is still correct. Now if i hit the backbutton 
in my browser to go back to the main menu the $user and $pass vairable now gets 
doubled? So if your login WAS $user=$joe your information will now be 
$user=joejoe and NOW if you hit refresh it keeps adding $user=joejoejoejoe 
etc..same for the $pass and every other variable used.
 
I hope this sheds some light on this problem as i 
am clueless at this point. The same code runs without these errors on a regular 
apache setup without mod perl it only occurs on a modperl server.
 
Any inofmration is greatly greatly 
apreciated!
 
Thanks,
John Buwa