mod_perl compile errors in perl_util.c

2001-08-24 Thread Alex Gottschalk

Hi,

I'm trying to compile mod_perl, and am getting the following error.
System details follow the error message:

/usr/gnu/bin/gcc -I. -I../../include -I../../include/regex
-I../../include/.././os/unix -DSOLARIS2=260 -DUSE_EXPAT
-I../lib/expat-lite -DNO_DL_NEEDED -DMOD_PERL  -I`/usr/gnu/bin/perl
-MConfig -e 'print $Config{archlibexp}'`/CORE `/usr/gnu/bin/perl
'-MApache::ExtUtils=%Config' -e 'print $Config{ccflags}'`
-DNO_PERL_DISPATCH   -DNO_PERL_POST_READ_REQUEST -DNO_PERL_TRANS
-DNO_PERL_HEADER_PARSER -DNO_PERL_ACCESS -DNO_PERL_AUTHEN -DNO_PERL_AUTHZ
-DNO_PERL_TYPE  -DNO_PERL_FIXUP  -DNO_PERL_LOG  -DNO_PERL_INIT
-DNO_PERL_CLEANUP -DNO_PERL_RESTART -DNO_PERL_STACKED_HANDLERS
-DNO_PERL_SECTIONS -DNO_PERL_METHOD_HANDLERS -DNO_PERL_SSI
-DNO_PERL_DIRECTIVE_HANDLERS  -DMOD_PERL_VERSION=\1.26\  -I./os/unix
-I../../include -c -o perl_util.o perl_util.c
perl_util.c: In function `hvrv2table':
perl_util.c:99: warning: cast to pointer from integer of different size
perl_util.c:101: warning: cast to pointer from integer of different size
perl_util.c: In function `sv2request_rec':
perl_util.c:145: warning: cast to pointer from integer of different size
perl_util.c: In function `perl_get_startup_pool':
perl_util.c:178: warning: cast to pointer from integer of different size
perl_util.c: In function `perl_get_startup_server':
perl_util.c:188: warning: cast to pointer from integer of different size
perl_util.c: In function `perl_sv_is_http_code':
perl_util.c:758: invalid type argument of `-'
perl_util.c:761: invalid type argument of `-'
make[3]: *** [perl_util.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/alexgo/src/apache_1.3.20/src'
make: *** [apache_httpd] Error 2

This is on the following system:

Solaris 2.6 Generic_105181-25 sun4u sparc SUNW,Ultra-80
perl 5.005_62 built for sun4-solaris
gcc 2.95.2
mod_perl 1.26
apache 1.3.20

We'd really love to start using mod_perl for our Virtual Host redirects,
so any help would be seriously appreciated.

Thanks!
--Alex

Alex Gottschalk
[EMAIL PROTECTED]
(650) 724-7668




Re: using mod_perl

2001-08-24 Thread Jon Molin

try looking at
http://perl.apache.org/

/jon

[EMAIL PROTECTED] wrote:
 
 Hi! I am wondering if anyone could tell me how to actually run
 modperl on my webserver i have perl modules installed to run without
 modperl and dont know how to invoke the process to get them working
 can anyone help?
 jason



Re: using mod_perl

2001-08-24 Thread Jeremy Howard

 Hi! I am wondering if anyone could tell me how to actually run
 modperl on my webserver i have perl modules installed to run without
 modperl and dont know how to invoke the process to get them working
 can anyone help?
 jason

The best place to learn mod_perl is the Guide:
  http://perl.apache.org/guide

Sorry for the 'RTFM' reply, but you'll find that this document answers
beginner questions better than anyone here can in a quick email, and it's
kept very up to date thanks to the marvellous Stas Bekman.





RE: embedding perl code to html

2001-08-24 Thread

I've used HTML::Embperl in a fairly large project and really liked it.

I found it to be a rock solid package with a dedicated product developer backing it up.

Mike V. Andreev [EMAIL PROTECTED] wrote:


Hi!

I have a tree of static html files and perl cgi-scripts. But sometimes I
want to include some simple functionality in html-file. The best
solution, I think, is including perl code to html file. I found
several tools on the Net. The best i liked is Embperl
(http://perl.apache.org/embperl/)  ePerl
(http://www.engelschall.com/sw/eperl/) . Both of them have similar
functionality. But before I make final choice i want to hear some
comments about its speed, feature, reliability etc. Or may be someone
know other tools? (I don't need very powerful thing -- main
programming will be in perl scripts anyway, so there isn't necessity
in some cool libraries and stuff )

Thanks in advance . Best regards.

-
Mike Andreev 
Programmer
SMIS Lab, Space Research Institute (Moscow, Russia). http://smis.iki.rssi.ru
[EMAIL PROTECTED]
-



-- 
===
If you put three drops of poison into a 100 percent pure Java, you get - Windows. If 
you put a few drops of Java into Windows, you still have Windows.
 -- Sun Microsystems CEO, Scott McNealy




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Re: scope of PerlSetVar

2001-08-24 Thread Stas Bekman

On Wed, 22 Aug 2001, Michael wrote:

 Before I make a dumb assumption, would the experts please comment on
 the scope of

 PerlSetVar within a virtual host statement. Is the scope restricted
 to that of the enclosing brackets. I have not been able to find where
 in the Eagle book or the guide the scope of these directives are
 shown.

Please review the following. I seems to be correct. Are there any other
mod_perl config directives that I've missed?

The three columns show whether a directive can be used in the
CEltDirectoryEgt (and CEltLocationEgt) and
CEltVirtualHostEgt sections, or only in the global server
configuration.

  DirectiveGlobally VirtualHost Directory
  ---
  PerlAddVar  V V  V
  PerlFreshRestartV X  X
  PerlPassEnv V V  V
  PerlSetEnv  V V  V
  PerlSetVar  V V  V
  PerlSetupEnvV V  V
  PerlTaintCheck  V X  X
  PerlWarnV X  X



 i.e.

 virtualhost 123.111.222.210:80
   PerlSetVar ONE 1
 # this I can safely assume is global for the virtual host.

   Location /foo
PerlSetVar protected ISfoo
blah
   /location
   Location /bar
PerlSetVar protected ISbar
...blah
   /location
 # does $r-dir_config(protected);
 # return the expected value depending on which directory has been
 # entered by the apache process to serve the file

   FilesMatch .pl
 PerlSetVar scripts modperlofcourse
   /filesmatch
   FilesMatch .cgi
PerlSetVar scripts someothers
   /filesmatch
 # likewise, dos $r-dir_config(scripts);
 # return the expected values depending on the match process

 /virtualhost




_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: PerlModule Error

2001-08-24 Thread Rasoul Hajikhani

Ken Williams wrote:
 
 [EMAIL PROTECTED] (Rasoul Hajikhani) wrote:
   use lib qw(...);. I have tried declaring:
   use MY::Perl::Control::WebAccess; in my startup.pl, with the same
 
 Here it is:
 
 Undefined subroutine My::Perl::Control::WebAccess::handler called.
 
 Looks like you need to check the capitalization on 'MY'.
I chnaged the name to MIS_APPS::RHS::Control::WebAccess.pm but still get
the same error.
 
 By the way, using the MY:: namespace isn't the greatest idea in the
 first place, because the MY:: namespace is used by MakeMaker during
 modules' installation process.  I'm sure it's not causing a problem
 here, but it can at least create confusion in the mind.
 
You are right, this did not solve the problem.
-r
   ------
   Ken Williams Last Bastion of Euclidity
   [EMAIL PROTECTED]The Math Forum



Re: PerlModule Error

2001-08-24 Thread Rasoul Hajikhani

Stas Bekman wrote:
 
 On Thu, 23 Aug 2001, Rasoul Hajikhani wrote:
 
  ___cliff rayman___ wrote:
  
   and what do the error logs say?
  
   Rasoul Hajikhani wrote:
  
I know this question will sound primitive to most of you, however, I
have this nagging error which won't go away.
In my httpsd.conf, I have declared PerlModule
MY::Perl::Control::WebAccess which I know is where it is supposed to
be. My @INC does not include the path to that directory, however, in my
startup.pl I have that directory as my
use lib qw(...);. I have tried declaring:
use MY::Perl::Control::WebAccess; in my startup.pl, with the same
result: apache won't start.
I mean what's up? I have another module sitting next to my
MY::Perl::Control::WebAccess and in my startup.pl I have:
use MY::Perl::Control::Cookie_Check; and all is fine and dandy...
apache runs without a hitch. I tried perl5lib (all capital) in my
.cshrc, again nothing. Now I come to you learned people in the hope of
salvation... Any ideas people?
-r
  
   --
   ___cliff [EMAIL PROTECTED]http://www.genwax.com/
 
  Here it is:
 
  Undefined subroutine My::Perl::Control::WebAccess::handler called.
 
 That's not the error that we want to see. The error you've listed can
 happen when you actually generate some request. But that's after Apache

You are right. Apache does not even start.

 has started. PerlModule on the other hand merely loads the file similar to
 use. As you say use() doesn't work for you too. Are you sure you can
 perform:
 
 % perl -c MY/Perl/Control/WebAccess.pm

Yes, I get WebAccess.pm syntax OK result.

 
 remove the error_log file before you start a new test and see what
 happens.
 
 If you still fail to find the problem. Take your code and shrink it to
 smallest possible size, while it still imposes a problem for you and
 together with the configuration section for this module send it to the
 list. Remember, we want a simple test that we can easily understand and
 reproduce the problem with.
 
 Thanks.
 
 _
 Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
 http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]   http://localhost/  http://eXtropia.com/
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



push_handlers

2001-08-24 Thread Rasoul Hajikhani

Hi
Is there any way that I could use $r-push_handlers(PerlHandler =
myHandler); and send/include a query string with that? I need to push
another handler with some specific form data. 
thanks
-r



Re: URI::URL - problem in LWP 5.53_95 with mod_perl

2001-08-24 Thread mike808

I ran into the same problem. Found a simpler, cleaner solution.
Just perform a

   export PERL_HTTP_URI_CLASS=URI::URL

before building mod_perl, and you're home free.

Long term, all mod_perl testing modules that assume URI::URL 
is loaded by LWP will now need to explicitly load URI::URL if they use it.
I suggest doing so following the loading of LWP.

Here's why it happened:

Cliff noted:
I noticed everywhere that URI::URL  was being used in mod_perl and embperl,
LWP::UserAgent was being used.

also, i found this is the LWP (libwww-perl-5.5395) release notes:

  HTTP::Request, HTTP::Response will by default now use URI class,
  instead of URI::URL, when constructing its URI objects.  This
  has a potential for breaking existing code as URI::URL objects had
  some extra methods that external code might depend upon.

He's right, and this is exactly what's happened in mod_perl.
It's a bug *caused* by recent changes in LWP, and not a bug in LWP, per se.
From Gisle Aas' directory in CPAN, you can see:

04/10/01 06:15PM157,267 libwww-perl-5.53.tar.gz
05/05/01 08:57AM172,925 libwww-perl-5.53_94.tar.gz
08/06/01 07:46PM174,613 libwww-perl-5.53_95.tar.gz

From the official website, http://www.linpro.no/lwp, he says the
lastest version is 5.53 from 4/10/01. However, if you use the CPAN module,
you will pickup the 5.53_95 version instead. This is the version (and
maybe 5.53_94 as well, but I haven't checked) that makes mod_perl break.
Or maybe some interim versions of the CPAN module are downloading
this development version of the module, I'm not sure.

I'm willing to bet that both of you have the later 5.53_95 rev and not
the 5.53 version.

Here's the cause of the problem. Gisle has always used URI::URL for
representing his URLs within LWP. These latest revs changed that.
He now uses a base URI class. The effect of this is that LWP no longer
uses URI::URL. Meaning URI::URL is no longer 'use'd by LWP, and so
LWP will no longer automatically 'use' URI::URL and pull it in too.

This is what's making mod_perl (and any other modules that do this) break.

Using LWP *does not* load URI::URL. mod_perl's tests *assume* that just
because LWP was loaded, that URI::URL was too. And that's the hidden
dependency that's being violated here.

So, where's the root of the cause of the code breakage in LWP, you ask?

Way down in HTTP::Message (which is inherited by HTTP::Request and 
HTTP::Response), Gisle has changed it to use the bare URI class and not
the older URI::URL class.

Here's the line of code that does the damage (Line 37 in HTTP::Message.pm):

   $HTTP::URI_CLASS ||= $ENV{PERL_HTTP_URI_CLASS} || URI;

As should be obvious now, my simple solution is to perform a

   export PERL_HTTP_URI_CLASS=URI::URL

before building mod_perl, and you're home free.

Michael King
[EMAIL PROTECTED]

-
Valuenet Web Mail.
http://www.valuenet.net/





Rewrite block before a Perl block

2001-08-24 Thread Rafiq Ismail

Hi,

I'm trying to set up an apache vhost which either redirects to a proxy or
sets its DocumentRoot and then opens a Perl/Perl block, and then
eventually processes the request through a mod_perl handler..

My rewrite rule:
RewriteEngine   On
RewriteCond %{REQUEST_FILENAME}^/tfl
RewriteRule ^/(.*) http://x.x.x.net:82/$1 [P]


Now this block will happily redirect when it alone is the content of my
vhost conf., however the second I add a DocumentRoot and a mod_perl
handler, it decides to send 'everything' to the handler and totally ignore
my rewrite rule.

I'd be grateful if someone, able to see what I'm missing, would let me
know why this won't work as is.

I've attached the relevant excerpt below - the nature of the modules does 
not matter as much as my ordering, I'd assume:




RewriteEngine   On
RewriteCond %{REQUEST_FILENAME} ^/blah
RewriteRule ^/(.*)  http://x.x.x.net:82/$1
[P]


PerlFreshRestartOn
DocumentRoot/home/httpd/proj/html

PerlSetVar  ProjectName proj_proxy
PerlModule  HTML::Apache::ASPerl


Perl
use lib '/home/httpd/proj/lib';


HTML::Apache::ASPerl::setupServer('proj_proxy','/home/httpd/proj/asperl.conf');
/Perl

PerlModule  Proj  


Location /
SetHandler  perl-script
PerlHandler HTML::Apache::ASPerl
/Location

###


Many Thanks,

R.



-- 
Rafiq Ismail

Software Engineer and Systems Administrator
http://www.codix.net


All the best people in life seem to like Linux. - Steve Wozniak








URI munging and Referer headers

2001-08-24 Thread Geoffrey Young

hi mungers...

  it there a more reliable way to not have your session id's show up in
Referer headers than using a refresh tag?  I've played around with various
redirect methods, but both MSIE5 and Netscape4.7 hold on to the Referer from
the original page and  ignore the 302 page.  seems like meta refresh is the
only way to be sure.

  looking for expert opinions :)

--Geoff



push_handlers

2001-08-24 Thread Rasoul Hajikhani

Hello again,
The problem with push_handlers, I just realized, is that the
PerlHandler argument assumes that its argument is a method, sub,
within the same package/handler. However, I need some other handler to
take over and finish the job. Chaining won't do since I don't know
before hand which handler will step in. 
Any suggestions?
thanks
-r
TOL: I am wondering if I should create a sub process?



RE: push_handlers

2001-08-24 Thread Geoffrey Young



 -Original Message-
 From: Rasoul Hajikhani [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 24, 2001 2:59 PM
 To: [EMAIL PROTECTED]
 Subject: push_handlers
 
 
 Hello again,
 The problem with push_handlers, I just realized, is that the
 PerlHandler argument assumes that its argument is a method, sub,
 within the same package/handler. However, I need some other handler to
 take over and finish the job. Chaining won't do since I don't know
 before hand which handler will step in. 
 Any suggestions?

$r-push_handlers(PerlHandler = 'My::Handler');
or
$r-push_handlers(PerlHandler = 'My::Handler::subroutine');
or
$r-push_handlers(PerlHandler = sub { });
or
$r-push_handlers(PerlHandler = \sub);

pick whichever form you need...

--Geoff



Thanks

2001-08-24 Thread Rasoul Hajikhani

You guys/gals are the most helpful bunch of people I have had the
pleasure of interacting with. You ROCK, all of YOU.
Thanks



cvs commit: modperl-site perl_myth.html perl_myth.pod

2001-08-24 Thread stas

stas01/08/21 19:26:19

  Modified:.perl_myth.html perl_myth.pod
  Log:
  correct my email address
  
  Revision  ChangesPath
  1.5   +1 -1  modperl-site/perl_myth.html
  
  Index: perl_myth.html
  ===
  RCS file: /home/cvs/modperl-site/perl_myth.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perl_myth.html1999/10/17 11:45:42 1.4
  +++ perl_myth.html2001/08/22 02:26:19 1.5
  @@ -267,7 +267,7 @@
   LI
   P
   Stas Bekman lt;A
  -HREF=mailto:[EMAIL PROTECTED];[EMAIL PROTECTED]/Agt;
  +HREF=mailto:[EMAIL PROTECTED];[EMAIL PROTECTED]/Agt;
   
   LI
   P
  
  
  
  1.5   +1 -1  modperl-site/perl_myth.pod
  
  Index: perl_myth.pod
  ===
  RCS file: /home/cvs/modperl-site/perl_myth.pod,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perl_myth.pod 1999/10/17 11:45:43 1.4
  +++ perl_myth.pod 2001/08/22 02:26:19 1.5
  @@ -240,7 +240,7 @@
   
   =item *
   
  -Stas Bekman [EMAIL PROTECTED]
  +Stas Bekman [EMAIL PROTECTED]
   
   =item *