mod_proxy problems

2002-05-02 Thread Christopher L. Everett

I was updating my front end to 1.3.24 (I know, should have checked for 
problems in the newsgroups/mailing lists).  While I was at it I updated 
debian.

Now, the apache child processes on my front end server are segfaulting 
whenever a URL defined by ProxyPass/ReverseProxyPass statements gets 
accessed.

Assuming that whatever I messed up with mod_proxy won't get fixed for a 
long while (this is way over my head), and because I have no real way of 
stepping back to my previous config, what would be another way of 
bringing my mod_perl server back into the game with a front end server?

Christopher L. Everett




Re: Client capabilities (and JavaScript)

2002-05-02 Thread Simon Oliver

Michael Nino wrote:

 If the browser is Lynx then send text only version otherwise send JavaScript
 browser sniffer. The JavaScript sniffer can check for CSS, DHTML, DOM,
 plugins, etc... then redirect back to the server for the correct
 implementation.

Do you have a sniffer example - I have an idea for a module that
dynamically generates a sniffer/redirector.

--
  Simon Oliver



Many requests per page

2002-05-02 Thread Viljo Marrandi

Hello,

I'm using Apache 1.3.22, mod_perl 1.25 and Template-Toolkit 2.06.

How can I make my system so, that my perl handler is not called for each
image, css and script the page has? Apache conf has following lines:

  Location /
 SetHandler  perl-script
 PerlHandler My::Site
 PerlSendHeader  On
  /Location

I tried to check $r-content_type in FixupHandler (if content is img/gif
or whatever, I could tell Apache not to call My::Site), but it was empty,
so I couldn't use it to check what client requested. One solution
that I could think of, was to make Apache conf use File *.html directive
instead of Location, but I'd like to avoid this, if possible (it's a long
story ;).

And I can't put all static files to other VirtualHost, because this site
is going to use Secure HTTP and all files must come from one place, or the
client must answer to every image that it's ok to load it from another
place.

Thanks in advance.

Rgds,
Viljo




Re: Client capabilities (and JavaScript)

2002-05-02 Thread Jamie LeTual

A sniffer can be much more subtle than that. If you have at least one
page view beforehand, like some kind of neutral title page, you can
stick an image tag where the SRC is a call to a mod perl script, with
all you want to know set as parameters IMG
SRC=/ninja-image.pl?has_plugin=1.3 You can create the
parameters using document.write in the page itself. That way, by the
time you get to the second page, you have the info you needed.

The perl script ninja-image.pl simply gets the data and would store it
in some kind of persistant way, and spit back some minimal headers and
the binary data that would be some kind of image (like a clear pixel,
even).

Peace,
Jamie


On Tue, Apr 30, 2002 at 07:10:39PM -, Michael Nino wrote:
 Hi,
 
 With minimal JavaScript code you could identify the browser's capabilities.
 Here is how you might approach the task.
 
 If the browser is Lynx then send text only version otherwise send JavaScript
 browser sniffer. The JavaScript sniffer can check for CSS, DHTML, DOM,
 plugins, etc... then redirect back to the server for the correct
 implementation.
 
 If you don't mind the redirection (in JavaScript of course) then you're all
 set. Redirection may not seem attractive but consider that JavaScript  runs
 within the client (read: browser) right so you got to get the information
 back some how. Server side browser sniffing might be implemented through a
 database of browser supported features and user-agent strings.
 
 Just thought you might want to the idea. Good luck.
 
: ) M


-- 
-[sent-from-the-office]
|||
| HBE Software, Inc. | Email: [EMAIL PROTECTED]   |
| http://www.hbesoftware.com | AIM  : Reng8tak|
| (514) 876-3542 x259| Web  : http://jamie.people.hbesoftware.com |
---
perl -e 'for($c=0;$c=length unpack(B*,pack(H*,$ARGV[0]));$c+=7){$_=chr((ord 
packB*,0.substr(unpack(B*,pack(H*,$ARGV[0])),$c,7))+040);print;}' -- 
55569d4010674fa9222d200c22d29801441872e2d2












msg27138/pgp0.pgp
Description: PGP signature


Re: Many requests per page

2002-05-02 Thread Jim Morrison [Mailinglists]

Poss. not the best person to answer this.. but I'll take a shot..

Can you not limit your perl-script to a single folder, so that you can set:

Alias /scripts/  /path/to/scripts/

Location /scripts
SetHandler  perl-script
PerlHandler My::Site
PerlSendHeader  On
/Location



The way I figure this, is that https://mysite.com/scripts/* act the same way
as everything used to, and you can load your images from
https://mysite.com/images/* without complaints about crossing the
secure/nonsecure boundry...

Also, don't know about this, but would be curious to know, if you have a
whole site set up to use mod_perl, as below, and you also have an alias set
up (like the apache default /icons/ directory) which takes precedence?


Hope this helps..  Someone who knows what there talking about, please
correct me where I'm wrong!  ;-)

Jimbo

- Original Message -
From: Viljo Marrandi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 02, 2002 1:58 PM
Subject: Many requests per page


 Hello,

 I'm using Apache 1.3.22, mod_perl 1.25 and Template-Toolkit 2.06.

 How can I make my system so, that my perl handler is not called for each
 image, css and script the page has? Apache conf has following lines:

   Location /
  SetHandler  perl-script
  PerlHandler My::Site
  PerlSendHeader  On
   /Location

 I tried to check $r-content_type in FixupHandler (if content is img/gif
 or whatever, I could tell Apache not to call My::Site), but it was empty,
 so I couldn't use it to check what client requested. One solution
 that I could think of, was to make Apache conf use File *.html directive
 instead of Location, but I'd like to avoid this, if possible (it's a long
 story ;).

 And I can't put all static files to other VirtualHost, because this site
 is going to use Secure HTTP and all files must come from one place, or the
 client must answer to every image that it's ok to load it from another
 place.

 Thanks in advance.

 Rgds,
 Viljo




Re: Many requests per page

2002-05-02 Thread darren chamberlain

* Viljo Marrandi [EMAIL PROTECTED] [2002-05-02 08:57]:
 How can I make my system so, that my perl handler is not called for
 each image, css and script the page has?

[-- snip --]

The example handlers that come with HTML::Mason have an answer; in
My::Site::handler, add something like:

# If you plan to intermix images in the same directory as
# components, activate the following to prevent Mason from
# evaluating image files as components.
#
return DECLINED if $r-content_type  $r-content_type !~ m|^text/|i;

This should be the first(ish) thing that handler() does, before anything
else takes place.

(darren)

-- 
Violence is to dictatorship as propaganda is to democracy.
-- Noam Chomsky



Re: Many requests per page

2002-05-02 Thread Viljo Marrandi

Hello again,

 * Viljo Marrandi [EMAIL PROTECTED] [2002-05-02 08:57]:
  How can I make my system so, that my perl handler is not called for
  each image, css and script the page has?

[-- snip --]

 return DECLINED if $r-content_type  $r-content_type !~ m|^text/|i;

I tried that, but no luck - $r-content_type is just plain empty, don't
know why. Maybe i can somehow debug or track this content_type and figure
out, why it's empty? First lines in My::Site look like this:

package My::Site;

use strict;
use other_modules;

sub handler {
   my $r = shift;

   return DECLINED if $r-content_type  $r-content_type !~ m|^html/|i;

...

In regexp i changed 'text' to 'html', because css's are text/css type.




Re: Many requests per page

2002-05-02 Thread Viljo Marrandi

 Can you not limit your perl-script to a single folder, so that you can set:

 Alias /scripts/  /path/to/scripts/

 Location /scripts
 SetHandler  perl-script
 PerlHandler My::Site
 PerlSendHeader  On
 /Location

Unfortunately I can't do this, my handler must handle all / requests
too. Though I'm not very sure about this, but if I tried to Alias only
images then it wouldn't work, becayse My::Site was / handler.

 The way I figure this, is that https://mysite.com/scripts/* act the same way
 as everything used to, and you can load your images from
 https://mysite.com/images/* without complaints about crossing the
 secure/nonsecure boundry...

Hmm, but maybe it's possible to set up Apache so, that My::Site handles
/ and doesn't care about, let say, about /imgs?


Rgds,
Viljo




Re: Many requests per page

2002-05-02 Thread David Wright

Hi,

 Hello again,

  * Viljo Marrandi [EMAIL PROTECTED] [2002-05-02 08:57]:
   How can I make my system so, that my perl handler is not called for
   each image, css and script the page has?

 [-- snip --]

  return DECLINED if $r-content_type  $r-content_type !~ m|^text/|i;

 I tried that, but no luck - $r-content_type is just plain empty, don't
 know why. Maybe i can somehow debug or track this content_type and figure
 out, why it's empty? First lines in My::Site look like this:

 package My::Site;

 use strict;
 use other_modules;

 sub handler {
my $r = shift;

return DECLINED if $r-content_type  $r-content_type !~ m|^html/|i;

 ...

 In regexp i changed 'text' to 'html', because css's are text/css type.

I thought $r-content_type was used for the server to set the content
type for a response, not discover it from the request. So it should I
think be empty till set.

Something very similar that I've done before is:

return DECLINED if $r-uri =~ m/\.(jpg|gif|css)$/;

But you'll still need to handle the images somehow - e.g. a standard file
handler after My::Site.

dave






Re: Many requests per page

2002-05-02 Thread Geoffrey Young


 
 I thought $r-content_type was used for the server to set the content
 type for a response, not discover it from the request. 


$r-content_type is just a get/set routine for the request record, giving you the 
option 
to either peek at it or set it yourself.

 So it should I
 think be empty till set.


yup.  typically mod_mime does this, so by the fixup stage it's typically available for 
comparisons.


HTH


--Geoff






Re: Many requests per page

2002-05-02 Thread David Jacobs

I'm running into a possible related problem. I'm using http_load to load 
test a simple hander (the aforementioned unique number generator). When 
I keep the load low (10-30 requests for 3-5 seconds) it works lovely.

When I stry anything more stressful (say 50 requests for 5 seconds or 
30r/10s) I get a cavalcade of byte count wrong errors.

I wonder if:
a) the $i global variable i'm using to increment (in concert with 
Timestamp/random (for now)) gets to big?
b) the http_load program asks for too many ports and for some reason 
(apache, tcpstack?) linux (rh 7.2) doesn't like this

any ideas?

tia
David

(btw - I just picked up the mod_perl Developer's cookbook yesterday, and 
I'm eager to get into it)



Geoffrey Young wrote:



 I thought $r-content_type was used for the server to set the content
 type for a response, not discover it from the request. 



 $r-content_type is just a get/set routine for the request record, 
 giving you the option to either peek at it or set it yourself.

 So it should I
 think be empty till set.



 yup.  typically mod_mime does this, so by the fixup stage it's 
 typically available for comparisons.


 HTH


 --Geoff










Re: Many requests per page

2002-05-02 Thread Per Einar Ellefsen

At 16:18 02.05.2002, Viljo Marrandi wrote:
  return DECLINED if $r-content_type  $r-content_type !~ m|^text/|i;

I tried that, but no luck - $r-content_type is just plain empty, don't
know why. Maybe i can somehow debug or track this content_type and figure
out, why it's empty? First lines in My::Site look like this:

Try logging it for each request and try different URLs.

   return DECLINED if $r-content_type  $r-content_type !~ m|^html/|i;
...

In regexp i changed 'text' to 'html', because css's are text/css type.

That slash is wrong. The content type for HTML is text/html, it doesn't 
start with html/


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: Many requests per page

2002-05-02 Thread Per Einar Ellefsen

At 16:27 02.05.2002, Viljo Marrandi wrote:
  The way I figure this, is that https://mysite.com/scripts/* act the 
 same way
  as everything used to, and you can load your images from
  https://mysite.com/images/* without complaints about crossing the
  secure/nonsecure boundry...

Hmm, but maybe it's possible to set up Apache so, that My::Site handles
/ and doesn't care about, let say, about /imgs?

Yes, you can do this:
return DECLINED if $r-uri =~ m|^/imgs|;
or something along those lines.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: Many requests per page

2002-05-02 Thread darren chamberlain

* Viljo Marrandi [EMAIL PROTECTED] [2002-05-02 10:26]:
  The way I figure this, is that https://mysite.com/scripts/* act the
  same way as everything used to, and you can load your images from
  https://mysite.com/images/* without complaints about crossing the
  secure/nonsecure boundry...
 
 Hmm, but maybe it's possible to set up Apache so, that My::Site
 handles / and doesn't care about, let say, about /imgs?

  Location /
  SetHandler perl-script
  PerlHandler My::Site
  /Location

  Location /imgs
  SetHandler default-handler
  /Location

(darren)

-- 
Pessimests are right more often, but optimists are happy more often.



SOAP and web services

2002-05-02 Thread Bart Frackiewicz

Dear List,

i want to create a server in mod_perl/apache, which receives request via get/post 
(plain), process this request (with database access and some functions) and answers in 
xml (with correct header), after planning this about a month i realized that this is 
called a web service.

the difference between my solution and all articles was SOAP, which i understand as an 
extension to http, so in my opinion i need something that allows to parse the request 
and creates the output, is there a solution for mod_perl anyway? and is this solution 
stable for a production server which more than 10.000 request/day?

i hope this is the right place to ask, but in all articles i read there were only 
examples for java/tomcat, not for perl/mod_perl.

Thanks in advance

Bart Frackiewicz


-- 
BART FRACKIEWICZ
systementwickler
inity - agentur fuer neue medien gmbh 
birkenstrasse 71  
40233 duesseldorf



Re: Memory explodes loading CSV into hash

2002-05-02 Thread Ernest Lergon

Stas Bekman wrote:
 
 Ideally when such a
 situation happens, and you must load all the data into the memory, which
 is at short, your best bet is to rewrite the datastorage layer in XS/C,
 and use a tie interface to make it transparent to your perl code. So you
 will still use the hash but the refs to arrays will be actually C arrays.
 
Sorry, I'm not familiar with C(hinese) - but if someone could develop a
XS/Pascal interface ;-))

 Ernest Lergon wrote:

  Another thing I found is, that Apache::Status seems not always report
  complete values. Therefore I recorded the sizes from top, too.
 
 Were you running a single process? If you aren't Apache::Status could
 have shown you a different process.
 
Running httpd -X shows the same results.

I will use the named %index structure for now. Thanks to the modular OO
perl I can re-code my data package later, if the memory explosion hits
me again ;-))

Ernest


-- 

*
* VIRTUALITAS Inc.   *  *
**  *
* European Consultant Office *  http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon  *
* Friedrichstraße 95 *mailto:[EMAIL PROTECTED] *
* 10117 Berlin / Germany *   ums:+49180528132130266 *
*
   PGP-Key http://www.virtualitas.net/Ernest_Lergon.asc




Re: SOAP and web services

2002-05-02 Thread Per Einar Ellefsen

At 19:34 02.05.2002, Bart Frackiewicz wrote:
Dear List,

i want to create a server in mod_perl/apache, which receives request via 
get/post (plain), process this request (with database access and some 
functions) and answers in xml (with correct header), after planning this 
about a month i realized that this is called a web service.

the difference between my solution and all articles was SOAP, which i 
understand as an extension to http, so in my opinion i need something that 
allows to parse the request and creates the output, is there a solution 
for mod_perl anyway? and is this solution stable for a production server 
which more than 10.000 request/day?

i hope this is the right place to ask, but in all articles i read there 
were only examples for java/tomcat, not for perl/mod_perl.

Yes, to the glory of the Perl community, we probably have the simplest 
answer you could want: It's called SOAP::Lite (but is nowehere near lite): 
http://www.soaplite.com/

An example:
mod_soap enabled SOAP server:

.htaccess

   SetHandler perl-script
   PerlHandler Apache::SOAP
   PerlSetVar dispatch_to /Your/Path/To/Deployed/Modules, Module::Name

That's an example. Some may call web services hype, I don't really know, 
but atleast this will get you going. Stable enough? you'll have to ask 
someone else, but I think it should work well enough.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: problems setting up Apache::AuthCookieDBI

2002-05-02 Thread Fran Fabrizio


Do you have this in httpd.conf (or mod_perl.conf)

PerlSetVar BuscaWAPDBI_SecretKeyFile /home/fxn/prj/bw/buscawap/etc/auth.key

?

-Fran


F.Xavier Noria wrote:
 I am having problems configuring Apache::AuthCookieDBI and am a bit
 lost, since it seems there is something wrong with the secret key
 file I cannot see, I attach below the configuration in case it can
 help. I have checked the permissions of the file (the server runs
 in by box as fxn):
 
 $ ls -la /home/fxn/prj/bw/buscawap/etc/auth.key
 -rw---1 fxn12 May  2 19:20 /home/fxn/prj/bw/buscawap/etc/auth.key
 
 If I request /docs these messages appear in error_log:
 
 [Thu May  2 20:07:19 2002] [error] access to /login failed for 127.0.0.1, reason: 
Apache::AuthCookieDBI: didn't have the secret key for auth realm Busc
 aWAP
 [Thu May  2 20:07:21 2002] [error] access to /docs failed for 127.0.0.1, reason: 
Apache::AuthCookieDBI: didn't the secret key from for auth realm Busca
 WAP
 
 Any hint on what could I be doing wrong?
 
 -- fxn
 
 
 PerlModule Apache::AuthCookieDBI
 
 PerlSetVar BuscaWAPPath /
 PerlSetVar BuscaWAPLoginScript /cgi/login.pl
 
 # These must be set
 PerlSetVar BuscaWAPDBI_DSN dbi:Oracle:BW_CATALOG
 PerlSetVar BuscaWAPDBI_SecretKeyFile /home/fxn/prj/bw/buscawap/etc/auth.key
 
 # These are optional, the module sets sensible defaults.
 PerlSetVar BuscaWAPDBI_Userwap
 PerlSetVar BuscaWAPDBI_PasswordX
 PerlSetVar BuscaWAPDBI_UsersTable  view_active_users
 PerlSetVar BuscaWAPDBI_UserField   login
 PerlSetVar BuscaWAPDBI_PasswordField   password
 PerlSetVar BuscaWAPDBI_CryptType   none
 PerlSetVar BuscaWAPDBI_GroupsTable view_active_users
 PerlSetVar BuscaWAPDBI_GroupField  rol
 PerlSetVar BuscaWAPDBI_GroupUserField  login
 PerlSetVar BuscaWAPDBI_EncryptionType  none
 PerlSetVar BuscaWAPDBI_SessionLifetime 00-24-00-00
 
 Location /login
  AuthTypeApache::AuthCookieDBI
  AuthNameBuscaWAP
  SetHandler  perl-script
  PerlHandler Apache::AuthCookieDBI-login
 /Location
 
 Alias /cgi /home/fxn/prj/bw/buscawap/www/cgi/
 PerlModule Apache::Registry
 
 Location /cgi
 SetHandler   perl-script
 PerlHandler  Apache::Registry
 Options +ExecCGI
 /Location
 
 Location /docs
 AuthType  Apache::AuthCookieDBI
 AuthName  BuscaWAP
 PerlAuthenHandler Apache::AuthCookieDBI-authenticate
 PerlAuthzHandler  Apache::AuthCookieDBI-authorize
 require   valid-user
 SetHandlerperl-script
 PerlHandler   BuscaWAP::Apache::Docs
 /Location





Re: SOAP and web services

2002-05-02 Thread Daisuke Maki

Stable enough? you'll have to ask someone else, but I think it should work well 
enough.

I've been using SOAP::Lite + Apache for a bunch of my newer projects
with moderate load, and so far I've had no problems... ;)

--d


Re: SOAP and web services

2002-05-02 Thread Richard Clarke

Are you sure soap is what you want?. Just because SOAP uses XML to encode
the parameters and data which it transmits doesnt necessarily mean you want
that same format sent to the user. Why would you not have a normal mod perl
content handler execute whatever procedures are necessary to get the
information and then build the XML structures from the plethora of modules
available?

I use mod_perl/apache/soap::lite to create an internal application server
so that I can distribute processing load from the public webserver. This
also allows me to expose a soap web service to the public if I wished to
give them direct access to a method on this application server, but of
course they would need a soap client to access this service.

Do you want to just return an xml to your user, or do you want to do what I
do which is do internal RPC using SOAP.

Ric.

p.s. apologies if I'm completely off track :)


- Original Message -
From: Bart Frackiewicz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 02, 2002 6:34 PM
Subject: SOAP and web services


Dear List,

i want to create a server in mod_perl/apache, which receives request via
get/post (plain), process this request (with database access and some
functions) and answers in xml (with correct header), after planning this
about a month i realized that this is called a web service.

the difference between my solution and all articles was SOAP, which i
understand as an extension to http, so in my opinion i need something that
allows to parse the request and creates the output, is there a solution for
mod_perl anyway? and is this solution stable for a production server which
more than 10.000 request/day?

i hope this is the right place to ask, but in all articles i read there were
only examples for java/tomcat, not for perl/mod_perl.

Thanks in advance

Bart Frackiewicz


--
BART FRACKIEWICZ
systementwickler
inity - agentur fuer neue medien gmbh
birkenstrasse 71
40233 duesseldorf




problems setting up Apache::AuthCookieDBI

2002-05-02 Thread F . Xavier Noria

I am having problems configuring Apache::AuthCookieDBI and am a bit
lost, since it seems there is something wrong with the secret key
file I cannot see, I attach below the configuration in case it can
help. I have checked the permissions of the file (the server runs
in by box as fxn):

$ ls -la /home/fxn/prj/bw/buscawap/etc/auth.key
-rw---1 fxn12 May  2 19:20 /home/fxn/prj/bw/buscawap/etc/auth.key

If I request /docs these messages appear in error_log:

[Thu May  2 20:07:19 2002] [error] access to /login failed for 127.0.0.1, reason: 
Apache::AuthCookieDBI: didn't have the secret key for auth realm Busc
aWAP
[Thu May  2 20:07:21 2002] [error] access to /docs failed for 127.0.0.1, reason: 
Apache::AuthCookieDBI: didn't the secret key from for auth realm Busca
WAP

Any hint on what could I be doing wrong?

-- fxn


PerlModule Apache::AuthCookieDBI

PerlSetVar BuscaWAPPath /
PerlSetVar BuscaWAPLoginScript /cgi/login.pl

# These must be set
PerlSetVar BuscaWAPDBI_DSN dbi:Oracle:BW_CATALOG
PerlSetVar BuscaWAPDBI_SecretKeyFile /home/fxn/prj/bw/buscawap/etc/auth.key

# These are optional, the module sets sensible defaults.
PerlSetVar BuscaWAPDBI_Userwap
PerlSetVar BuscaWAPDBI_PasswordX
PerlSetVar BuscaWAPDBI_UsersTable  view_active_users
PerlSetVar BuscaWAPDBI_UserField   login
PerlSetVar BuscaWAPDBI_PasswordField   password
PerlSetVar BuscaWAPDBI_CryptType   none
PerlSetVar BuscaWAPDBI_GroupsTable view_active_users
PerlSetVar BuscaWAPDBI_GroupField  rol
PerlSetVar BuscaWAPDBI_GroupUserField  login
PerlSetVar BuscaWAPDBI_EncryptionType  none
PerlSetVar BuscaWAPDBI_SessionLifetime 00-24-00-00

Location /login
 AuthTypeApache::AuthCookieDBI
 AuthNameBuscaWAP
 SetHandler  perl-script
 PerlHandler Apache::AuthCookieDBI-login
/Location

Alias /cgi /home/fxn/prj/bw/buscawap/www/cgi/
PerlModule Apache::Registry

Location /cgi
SetHandler   perl-script
PerlHandler  Apache::Registry
Options +ExecCGI
/Location

Location /docs
AuthType  Apache::AuthCookieDBI
AuthName  BuscaWAP
PerlAuthenHandler Apache::AuthCookieDBI-authenticate
PerlAuthzHandler  Apache::AuthCookieDBI-authorize
require   valid-user
SetHandlerperl-script
PerlHandler   BuscaWAP::Apache::Docs
/Location



Re: SOAP and web services

2002-05-02 Thread Perrin Harkins

Richard Clarke wrote:
 I use mod_perl/apache/soap::lite to create an internal application server
 so that I can distribute processing load from the public webserver.

That would be a lot more efficient if you just used vanilla HTTP.  Less 
wasted overhead.  This is the same principal at work when you use 
mod_proxy in your web server and a backend system with mod_perl on it.

- Perrin




RE: SOAP and web services

2002-05-02 Thread Joe Breeden

Bart,

I would have to recommend SOAD::Lite ( http://www.soaplite.org) also. We use it 
accomplish many tasks - not the least of which is exposing Perl data structures to M$ 
ASP applications - which have a moderate load and have had no problems. 

Joe

 -Original Message-
 From: Bart Frackiewicz [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 02, 2002 12:34 PM
 To: [EMAIL PROTECTED]
 Subject: SOAP and web services
 
 
 Dear List,
 
 i want to create a server in mod_perl/apache, which receives 
 request via get/post (plain), process this request (with 
 database access and some functions) and answers in xml (with 
 correct header), after planning this about a month i realized 
 that this is called a web service.
 
 the difference between my solution and all articles was SOAP, 
 which i understand as an extension to http, so in my opinion 
 i need something that allows to parse the request and creates 
 the output, is there a solution for mod_perl anyway? and is 
 this solution stable for a production server which more than 
 10.000 request/day?
 
 i hope this is the right place to ask, but in all articles i 
 read there were only examples for java/tomcat, not for perl/mod_perl.
 
 Thanks in advance
 
 Bart Frackiewicz
 
 
 -- 
 BART FRACKIEWICZ
 systementwickler
 inity - agentur fuer neue medien gmbh 
 birkenstrasse 71  
 40233 duesseldorf
 



Re: problems setting up Apache::AuthCookieDBI

2002-05-02 Thread F . Xavier Noria

On Thu, 02 May 2002 20:24:10 +0200
Per Einar Ellefsen [EMAIL PROTECTED] wrote:

: At 20:10 02.05.2002, F.Xavier Noria wrote:
: PerlModule Apache::AuthCookieDBI
: 
: PerlSetVar BuscaWAPPath /
: PerlSetVar BuscaWAPLoginScript /cgi/login.pl
: 
: # These must be set
: PerlSetVar BuscaWAPDBI_DSN dbi:Oracle:BW_CATALOG
: PerlSetVar BuscaWAPDBI_SecretKeyFile /home/fxn/prj/bw/buscawap/etc/auth.key
: 
: Have you tried inserting these into the respective Location sections? I'm 
: not sure, but I think PerlSetVars aren't merged into location-specific 
: configuration, so they might not actually be caught by Apache::AuthCookieDBI

I guess this is not the problem since /cgi/login.pl gets run by the
module and is configured the same way. Thank you anyway!

-- fxn



Re: problems setting up Apache::AuthCookieDBI

2002-05-02 Thread Geoffrey Young


 I'm not sure, but I think PerlSetVars aren't merged into 
 location-specific configuration, so they might not actually be caught by 
 Apache::AuthCookieDBI


they should merge just fine.  I do stuff like

PerlSetVar  DBASE  dbi:Oracle:HELM

all the time and grab it in Location specific handlers

--Geoff







Re: problems setting up Apache::AuthCookieDBI

2002-05-02 Thread Per Einar Ellefsen

At 20:10 02.05.2002, F.Xavier Noria wrote:
PerlModule Apache::AuthCookieDBI

PerlSetVar BuscaWAPPath /
PerlSetVar BuscaWAPLoginScript /cgi/login.pl

# These must be set
PerlSetVar BuscaWAPDBI_DSN dbi:Oracle:BW_CATALOG
PerlSetVar BuscaWAPDBI_SecretKeyFile /home/fxn/prj/bw/buscawap/etc/auth.key

Have you tried inserting these into the respective Location sections? I'm 
not sure, but I think PerlSetVars aren't merged into location-specific 
configuration, so they might not actually be caught by Apache::AuthCookieDBI

-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: SOAP and web services

2002-05-02 Thread Paul Lindner

On Thu, May 02, 2002 at 01:27:48PM -0500, Joe Breeden wrote:
 Bart,
 
 I would have to recommend SOAD::Lite ( http://www.soaplite.org) also. We use it 
accomplish many tasks - not the least of which is exposing Perl data structures to M$ 
ASP applications - which have a moderate load and have had no problems. 
 


A few more examples can be found in chapter 15 of the mod_perl
cookbook.  The (fairly simple) code in HalfLife-QueryServer is here:

  http://www.modperlcookbook.org/code/ch15/

Another simple way to do RPC over HTTP with mod_perl is RPC::XML.
Both it and SOAP::Lite are testaments to the power and simplicity of
perl+apache..

  -Original Message-
  From: Bart Frackiewicz [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 02, 2002 12:34 PM
  To: [EMAIL PROTECTED]
  Subject: SOAP and web services
  
  
  Dear List,
  
  i want to create a server in mod_perl/apache, which receives 
  request via get/post (plain), process this request (with 
  database access and some functions) and answers in xml (with 
  correct header), after planning this about a month i realized 
  that this is called a web service.
  
  the difference between my solution and all articles was SOAP, 
  which i understand as an extension to http, so in my opinion 
  i need something that allows to parse the request and creates 
  the output, is there a solution for mod_perl anyway? and is 
  this solution stable for a production server which more than 
  10.000 request/day?
  
  i hope this is the right place to ask, but in all articles i 
  read there were only examples for java/tomcat, not for perl/mod_perl.
  
  Thanks in advance
  
  Bart Frackiewicz
  
  
  -- 
  BART FRACKIEWICZ
  systementwickler
  inity - agentur fuer neue medien gmbh 
  birkenstrasse 71  
  40233 duesseldorf
  

-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Problems with Apache-AuthCookie mod_perl 1.99

2002-05-02 Thread Peter Rothermel

greetings,

Has anybody had any luck getting Apache-AuthCookie going
on an Apache 2.0 / mod_perl 1.99 setup? The first thing that
I hit was $r-connection-user is deprecated. I've changed these
to $r-user.  The next hurdle is that the status code REDIRECT
does not seen to be Apache::Constants.

-pete



all of a sudden Too Many Arguments error is appearing

2002-05-02 Thread Fran Fabrizio


Hello,

I had an odd thing happen today with a script I've been running successfully under 
Apache::Registry for weeks now.  It's been 
going fine and then today the error_log started to fill with messages such as:

Too many arguments for 
Apache::ROOT::cgi_2dbin::chimpkit::chimpworks_2epl::getStaleWatches at 
/usr/local/apachessl/cgi-bin/chimpkit/chimpworks.pl line 88, near $tmpl)

These are coming from all over my code at all different subroutines.  They appear to 
be sporadic/random, not happening every time 
through.  I've double-confirmed that my subroutines are not declared with prototypes.

Is this a common problem?  What would have triggered it all of a sudden.  Most/all of 
my subs use the DBI/Apache::DBI interface to 
get data from a Pg database, populate an HTML::Template, and display it.

Thoughts?

-Fran




Re: Problems with Apache-AuthCookie mod_perl 1.99

2002-05-02 Thread Per Einar Ellefsen

At 21:25 02.05.2002, Peter Rothermel wrote:
greetings,

Has anybody had any luck getting Apache-AuthCookie going
on an Apache 2.0 / mod_perl 1.99 setup? The first thing that
I hit was $r-connection-user is deprecated. I've changed these
to $r-user.  The next hurdle is that the status code REDIRECT
does not seen to be Apache::Constants.

mod_perl 2 doesn't have Apache::Constants. You should use:

use Apache::Const -compile = qw(... REDIRECT ..);

Good luck on porting it to mod_perl 2! once you get it to work, it would be 
great if you could contribute it to the community!


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: Can mod_perl help me use ENV variables in httpd.conf?

2002-05-02 Thread Ken Williams


On Wednesday, May 1, 2002, at 05:04 AM, Fran Fabrizio wrote:


 I spoke too soon.

 I need:

 Perl
   push Alias, [ qw(/cgi-bin/chimpkit/ $ENV{SERVER_ROOT}/cgi-
 bin/chimpkit/) ];
 /Perl

 This does not appear to be possible because there's no way to 
 pass in SERVER_ROOT to the apache startup.

I think the problem is your Perl syntax, not the value of the 
variable.  Scalars do not interpolate in qw() constructs.  Try 
this instead:

Perl
   push Alias, '/cgi-bin/chimpkit/', $ENV{SERVER_ROOT}/cgi-
bin/chimpkit/;
/Perl

or even

Perl
   push Alias, '/cgi-bin/chimpkit/',
$r-server_root_relative . '/cgi-bin/chimpkit/';
/Perl

  -Ken




AuthDBI to MS-SQL?

2002-05-02 Thread Darren Ward

Hi all,

Does anyone have a sample connect and query string for using Apache::AuthDBI
with MS-SQL?

Darren