Re: References for modperl usage in financial institutions?

2002-11-20 Thread Panagiotis Louridas
I am working in a greek investment bank called, appropriately, 
Investment Bank. It is one of the largest investment banks, and one of 
the biggest financial institutions in Greece.

We are currently implementing the company's internet presence in mod_perl.

There is an existing web site that was outsourced and developed in ASP. 
After many a problem it was decided to be insourced and rewritten from 
scratch in mod_perl. It is expected to go live soon.

Marcin Kasperski wrote:
I am looking for some examples of modperl being used in financial
institutions (banks, brokers, ... but also large e-commerce).  I spent
a few hours searching the internet but it seems such a information is
not easily available.

I am interested in both official and unofficial information. Technical
details are not necessary.

Thanks in advance for any reply. 







Problems with Apache::Gallery

2002-11-20 Thread Juan Julian Merelo Guervos
Hi,
I'm having problems with apache::gallery, mod_perl 1.99 and apache 2.0
(and who hasn't?, you might ask).

This is the setup I'm using in perl.conf
PerlSetVar GalleryTemplateDir
/home/jmerelo/public_html/gallery/templates
PerlSetVar GalleryAllowOriginal 1
Location /gallery
SetHandlerperl-script
PerlResponseHandler   Apache::Gallery
/Location

And this is the error I get:
[client 10.10.10.77] Can't locate Apache.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl/5.6.1
/usr/lib/perl5/vendor_perl .) at
/usr/lib/perl5/site_perl/5.8.0/Apache/Gallery.pm line 12.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.0/Apache/Gallery.pm line 12.
Compilation failed in require at (eval 1) line 3.

I have tried to use this startup.pl file:
--
#!/usr/bin/perl

#use Apache2 (); # if you have 1.0 and 2.0 installed
use Apache::compat ();
use Apache::Request();
use Apache::Gallery ();
Qué cojones!;
--
But I still get a different error when I try to startup httpd.

Is there a solution? Do I have to install both mod_perl 1 and 2? What's
the answer to the ultimate question about life, the universe and
everything? Should I wait for a definitive (redhat) release of mod_perl?

JJ

-- 
Juan Julian Merelo Guervos [EMAIL PROTECTED]
GeNeura team




Re: How do I force a 'Save Window?'

2002-11-20 Thread Issac Goldstand
To force the save window is easy - make up your own content subtype (main
type application)  and set it:

Content-Type: application/x-download-this-file-you-stupid-browser

Remember to start with an x- as your type is obviously not registered with
the IANA.

The tricky part is setting up the default file name - if your script is
http://foo.com/cgi-bin/download.pl?filename=bar the save dialog will default
to download.pl; not to the expected bar.

The solution is to force the file name out of the query string.  You want to
create a URI that looks like
http://foo.com/download/bar?param1=val1param2=val2 or even better:
http://foo.com/download/val1/val2/bar

You should use mod_rewrite to take requests of this scheme and translate it
to
http://foo.com/cgi-bin/download.pl?filename=barparam1=val1param2=val2...
The magic is that you then tell mod_rewrite to trigger an INTERNAL redirect,
so the server works flawlessly without any funny configurations and the
browser never sees it.

If you're using a mod_perl handler, another way to do it is set up a
location /download that calls your handler and read the filename (and
possibly the parameters) directly out of the URI using the request object,
but that's a bit harder (although more elegant and probably uses less
resources then the big mighty mod_rewrite's rewrite engine).

  Issac

- Original Message -
From: Dennis Daupert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 1:02 AM
Subject: How do I force a 'Save Window?'


 I have file upload working, can upload files of ascii or binary format.
 But a problem when you browse to a page that dynamically displays
 hyperlinks to files. Text and html files display normally in a browser,
 and Word docs popup MS Word as a helper app, and the word doc
 opens fine. But MS Project files popup a browser instance and MS
 Project, and you get the usual Enable macros and such popups as
 normal, but only  a subset of the project displays in the browser window,
 and none of the buttons are active in the Project application. Bummer.

 How can I force a Save File dialog screen for selected files, so the
user
 will have the option to download the file, then open it in Project or
 whatever?


 Thanks for any help or information.

 /dennis

 --
-
 Office phone: 817-762-8304

 --
-
  Great leaders never tell people how to do their jobs.
Great leaders tell people what to do and establish a
  framework within which it must be done.
   Then they let people on the front lines,
who know best, figure out how to get it done.
 ~ General H. Norman Schwarzkopf








Re: Problems with Apache::Gallery

2002-11-20 Thread Esteban Fernandez Stafford
Hi Juan,

I had a similar problem. To solve it I added these lines to startup.pl
I guess you will have to change the paths to your own settings.


# For the Apache::* modules
use lib qw(/usr/lib/perl5/site_perl/5.6.1/i586-linux/Apache2);

# For my own
use lib qw(/home/esteban/apache_mod_perl/perl);

# Que cojones!!!

   E s  t  eb  a n!



:wq


On 20 Nov 2002, Juan Julian Merelo Guervos wrote:

 Hi,
   I'm having problems with apache::gallery, mod_perl 1.99 and apache 2.0
 (and who hasn't?, you might ask).

 This is the setup I'm using in perl.conf
 PerlSetVar GalleryTemplateDir
 /home/jmerelo/public_html/gallery/templates
 PerlSetVar GalleryAllowOriginal 1
 Location /gallery
   SetHandlerperl-script
   PerlResponseHandler   Apache::Gallery
 /Location

 And this is the error I get:
 [client 10.10.10.77] Can't locate Apache.pm in @INC (@INC contains:
 /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl/5.6.1
 /usr/lib/perl5/vendor_perl .) at
 /usr/lib/perl5/site_perl/5.8.0/Apache/Gallery.pm line 12.
 BEGIN failed--compilation aborted at
 /usr/lib/perl5/site_perl/5.8.0/Apache/Gallery.pm line 12.
 Compilation failed in require at (eval 1) line 3.

 I have tried to use this startup.pl file:
 --
 #!/usr/bin/perl

 #use Apache2 (); # if you have 1.0 and 2.0 installed
 use Apache::compat ();
 use Apache::Request();
 use Apache::Gallery ();
 Qué cojones!;
 --
 But I still get a different error when I try to startup httpd.

 Is there a solution? Do I have to install both mod_perl 1 and 2? What's
 the answer to the ultimate question about life, the universe and
 everything? Should I wait for a definitive (redhat) release of mod_perl?

 JJ

 --
 Juan Julian Merelo Guervos [EMAIL PROTECTED]
 GeNeura team





Re: Problems with Apache::Gallery

2002-11-20 Thread Juan Julian Merelo Guervos
Hi,


 # For the Apache::* modules
 use lib qw(/usr/lib/perl5/site_perl/5.6.1/i586-linux/Apache2);
 

Does that mean I have to downgrade to 5.6.1?

J
-- 
Juan Julian Merelo Guervos [EMAIL PROTECTED]
GeNeura team




Re: Problems with Apache::Gallery

2002-11-20 Thread Juan Julian Merelo Guervos
El mié, 20-11-2002 a las 10:25, Esteban Fernandez Stafford escribió:
 Hi Juan,
 
 I had a similar problem. To solve it I added these lines to startup.pl
 I guess you will have to change the paths to your own settings.
 
 
 # For the Apache::* modules
 use lib qw(/usr/lib/perl5/site_perl/5.6.1/i586-linux/Apache2);
 
 # For my own
 use lib qw(/home/esteban/apache_mod_perl/perl);
 

The truth is that Apache.pm does not exist; it probably is included in
the mod_perl 1.xx distribution. Should I install it? Won't that zap the
mod_per 1.99 installation?

JJ
-- 
Juan Julian Merelo Guervos [EMAIL PROTECTED]
GeNeura team




Re: Problems with Apache::Gallery

2002-11-20 Thread Esteban Fernandez Stafford


No, find the location of your apache modules. For a hint type

rpm -ql perl



   E s  t  eb  a n!


:wq


On 20 Nov 2002, Juan Julian Merelo Guervos wrote:

 Hi,


  # For the Apache::* modules
  use lib qw(/usr/lib/perl5/site_perl/5.6.1/i586-linux/Apache2);
 

 Does that mean I have to downgrade to 5.6.1?

 J
 --
 Juan Julian Merelo Guervos [EMAIL PROTECTED]
 GeNeura team





Re: Problems with Apache::Gallery

2002-11-20 Thread Esteban Fernandez Stafford


Look for a Apache2 folder in your perl folder.

find /usr/lib/perl -name Apache2

If you dont find it, modperl is not properly installed.



   E s  t  eb  a n!


:wq


On 20 Nov 2002, Juan Julian Merelo Guervos wrote:

 El mié, 20-11-2002 a las 10:25, Esteban Fernandez Stafford escribió:
  Hi Juan,
 
  I had a similar problem. To solve it I added these lines to startup.pl
  I guess you will have to change the paths to your own settings.
 
 
  # For the Apache::* modules
  use lib qw(/usr/lib/perl5/site_perl/5.6.1/i586-linux/Apache2);
 
  # For my own
  use lib qw(/home/esteban/apache_mod_perl/perl);
 

 The truth is that Apache.pm does not exist; it probably is included in
 the mod_perl 1.xx distribution. Should I install it? Won't that zap the
 mod_per 1.99 installation?

 JJ
 --
 Juan Julian Merelo Guervos [EMAIL PROTECTED]
 GeNeura team





Re: Problems with Apache::Gallery

2002-11-20 Thread Juan Julian Merelo Guervos
El mié, 20-11-2002 a las 10:40, Esteban Fernandez Stafford escribió:
 Look for a Apache2 folder in your perl folder.
 
 find /usr/lib/perl -name Apache2

It's at:
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2
but  there's only a typemap file in it. Should there be something else?

 
 If you dont find it, modperl is not properly installed.

That might be the case, but it's the way it comes with redhat 8.0!

JJ

-- 
Juan Julian Merelo Guervos [EMAIL PROTECTED]
GeNeura team




Re: Problems with Apache::Gallery

2002-11-20 Thread Esteban Fernandez Stafford

This is what I have... Your installation is not looking good.

$ ls -F /usr/lib/perl5/site_perl/5.6.1/i586-linux/Apache2/
APR/  APR.pm  Apache/  ModPerl/  auto/  mod_perl.pm  typemap


   E s  t  eb  a n!


:wq


On 20 Nov 2002, Juan Julian Merelo Guervos wrote:

 El mié, 20-11-2002 a las 10:40, Esteban Fernandez Stafford escribió:
  Look for a Apache2 folder in your perl folder.
 
  find /usr/lib/perl -name Apache2

 It's at:
 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2
 but  there's only a typemap file in it. Should there be something else?

 
  If you dont find it, modperl is not properly installed.

 That might be the case, but it's the way it comes with redhat 8.0!

 JJ

 --
 Juan Julian Merelo Guervos [EMAIL PROTECTED]
 GeNeura team





Re: How do I force a 'Save Window?'

2002-11-20 Thread Tom Hukins
On Wed, Nov 20, 2002 at 11:24:33AM +0200, Issac Goldstand wrote:
 To force the save window is easy - make up your own content subtype (main
 type application)  and set it:
 
 Content-Type: application/x-download-this-file-you-stupid-browser
 
 Remember to start with an x- as your type is obviously not registered with
 the IANA.

Why not use the application/octet-stream MIME type as recommended in
RFC 1521?

Tom



Problem with Stream-oriented Output Filter

2002-11-20 Thread Esteban Fernandez Stafford


Hello,

I am currently developing a modperl filter that uses the streaming
approach. I started off with the example in

http://perl.apache.org/docs/2.0/user/handlers/filters.html#Stream_oriented_Output_Filter

  sub handler {
  my $filter = shift;

  my $left_over = '';
  while ($filter-read(my $buffer, BUFF_LEN)) {
  $buffer = $left_over . $buffer;
  $left_over = '';
  while ($buffer =~ /([^\r\n]*)([\r\n]*)/g) {
  $left_over = $1, last unless $2;
  $filter-print(scalar(reverse $1), $2);
  }
  }
  $filter-print(scalar reverse $left_over) if length $left_over;

  Apache::OK;
  }

This seems to work OK when the file is small (smaller than 8192). When
the file is larger, then there is a line that gets cut. This is
because the handler gets called more than once for big requests. Is
there a nice way to overcome this problem?  I was thinking using
filter context to store variable $left_over, but then I dont know how
to detect the real end of the stream.

Thanks in advance

   E s  t  eb  a n!


:wq





Newbie: how to use PerlSetVar

2002-11-20 Thread Beau E. Cox
Hi -

I'm new to mod_perl, so here's my query:

May I use PerlSetVar/PerlAddVar statements in the httpd.conf
file for my own use? What about namespaces, i.e. how
do I avoid stepping on someone else's variable?

Assume I can. How can I access those variables from my mod_perl
scripts?

How can I set variables in a handler (instead of httpd.conf)?

Aloha = Beau.






Re: How do I force a 'Save Window?'

2002-11-20 Thread Issac Goldstand
Becuase some browsers and mail clients don't follow the RFC.  The RFC
clearly states that When a mail reader encounters mail with an unknown
Content-type value, it should generally treat it as equivalent to
'application/octet-stream' (SECTION 4 last paragraph - page 12)  So my
suggestion should actually translate into application/octet-stream.
However, I've noted that where many browsers do all sorts of strange,
interesting, and usually unexepcted things when it parses
application/octet-stream, they'll usually do exactly what you want if you
confuse them with a type that they've certainly never heard of.

  Issac

- Original Message -
From: Tom Hukins [EMAIL PROTECTED]
To: Issac Goldstand [EMAIL PROTECTED]
Cc: Dennis Daupert [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 12:27 PM
Subject: Re: How do I force a 'Save Window?'


 On Wed, Nov 20, 2002 at 11:24:33AM +0200, Issac Goldstand wrote:
  To force the save window is easy - make up your own content subtype
(main
  type application)  and set it:
 
  Content-Type: application/x-download-this-file-you-stupid-browser
 
  Remember to start with an x- as your type is obviously not registered
with
  the IANA.

 Why not use the application/octet-stream MIME type as recommended in
 RFC 1521?

 Tom





Re: Problems with Apache::Gallery

2002-11-20 Thread domm
Hi!

On Mit, Nov 20, 2002 at 10:02:06 +0100, Juan Julian Merelo Guervos wrote:
 Hi,
   I'm having problems with apache::gallery, mod_perl 1.99 and apache 2.0
 (and who hasn't?, you might ask).

I'm not sure if Apache::Gallery works with mod_perl 2.x (and mod_perl
1.99 is the development version of mod_perl 2.x)

You /do/ know that mod_perl 2.0 is still heavily in development and
not recommended for use in a production environment?

-- 
#!/usr/bin/perl
for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}






Re: Newbie: how to use PerlSetVar

2002-11-20 Thread domm
Hi!

On Mit, Nov 20, 2002 at 12:48:34 -1000, Beau E. Cox wrote:

 May I use PerlSetVar/PerlAddVar statements in the httpd.conf
 file for my own use?

Yes. Thats what they are here for.

 What about namespaces, i.e. how
 do I avoid stepping on someone else's variable?

Prepend some custom string in front of the VarName:

 PerlSetVar MyApp_Var1 value1
 PerlSetVar MyApp_Var2 value2

or, a real-life example out of Apache::AuthDBI
http://search.cpan.org/author/ABH/Apache-DBI-0.89/AuthDBI.pm

 PerlSetVar Auth_DBI_data_source   dbi:driver:dsn
 PerlSetVar Auth_DBI_username  db_username
 PerlSetVar Auth_DBI_password  db_password

 Assume I can. How can I access those variables from my mod_perl
 scripts?

short:
$r-dir_config('MyApp_Var1')

long:
http://perl.apache.org/docs/1.0/guide/config.html#PerlSetVar_and_PerlAddVar

I would suggest that you spend some time RTFM either here:
http://perl.apache.org

and/or read some of those books:
http://perl.apache.org/docs/offsite/books.html


-- 
#!/usr/bin/perl
for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}



Re: How do I force a 'Save Window?'

2002-11-20 Thread Dennis Daupert

Thanks all for the great suggestions. This group is wonderfully helpful.
I tried the quick route, setting MIME type to application/octet-stream,
and that works fine for xl spreadsheets, but I still get the same behavior
as before with MS Project files (browser IE 5.00.3105.0106, which is one
of the IE versions we have to support). I will need a bit more time to try
some of the other more involved ideas , so that won't be for a few more
days.

/dennis

---
Office phone: 817-762-8304

---
 Great leaders never tell people how to do their jobs.
   Great leaders tell people what to do and establish a
 framework within which it must be done.
  Then they let people on the front lines,
   who know best, figure out how to get it done.
~ General H. Norman Schwarzkopf







[JOB-SEEKER] mod_perl consultant; can travel to you

2002-11-20 Thread David Harris
Hello,

I'm looking for consulting software development work in the
Perl/mod_perl/DBI/Oracle/MySQL/Linux/Web area. Anything
Open Source is a plus!

I'm based in Maryland Baltimore/D.C. area. I'm flexible and
willing to travel to your location for a period of time, if needed.

More info about me here:
http://www.davideous.com/statement_of_capabilities.txt

Thanks!

David





[DIGEST] mod_perl digest 2002/11/04

2002-11-20 Thread jgsmith
--

  mod_perl digest
 
November 4, 2002 - November 17, 2002

--

Recent happenings in the mod_perl world...

Features

  o mod_perl status
  o module announcements
  o module rfcs
  o mailing list highlights
  o links


mod_perl status

  o mod_perl
- stable: 1.27 (released June 1, 2002) [1]
- development: 1.27_01-dev [2]
- number of posts: 4 [*]
  o Apache
- stable: 1.3.27 (released October 3, 2002) [3]
- development: 1.3.28-dev [4]
  o mod_perl 2.0
- beta: 1.99_07 (released September 27, 2002) [5]
- development: (from cvs) [6]
- number of posts: 19 [*]
  o Apache 2.0
- stable: 2.0.43 (released October 3, 2002) [7]
  o Perl
- stable: 5.8.0 (released July 18, 2002) [8]
- development: none [9]


module announcements

  o Apache::ASP 2.49 - Active Server Pages with Perl scripting [10]

  o Apache::NavBarDD 0.71 - provides two-level navigation bars [11]

  o Bricolage 1.4.5 - full-featured, enterprise-class content
management and publishing system [12]


module rfcs

  o Apache::Session::Manager [13]

  o Template::YetAnother [14]


mailing list highlights

  o Version Control (should have been in previous digest) [15]

  o mod_perl Developer's Cookbook now on Safari [16]

  o ApacheCon mod_perl 2.0 presentation handouts [17]

  o Apache::Util::escape_html and single quotations [18]

links

  o The Apache/Perl Integration Project [19]
  o mod_perl documentation [20]
  o Apache modules on CPAN [21]
  o _Writing Apache Modules with Perl and C_ homepage [22]
  o _mod_perl Developer's Cookbook_ homepage [23]
  o mod_perl news and advocacy [24]
  o mod_perl list archives
  - modperl@ [25]
  - dev@ [26]
  - docs-dev@ [27]
  - advocacy@ [28]


happy mod_perling...

--James
[EMAIL PROTECTED]

--
[1] http://perl.apache.org/dist/
[2] http://cvs.apache.org/snapshots/modperl/
[3] http://www.apache.org/dist/httpd/
[4] http://cvs.apache.org/snapshots/apache-1.3/
[5] http://perl.apache.org/dist/mod_perl-1.99_04.tar.gz
[6] http://cvs.apache.org/snapshots/modperl-2.0/
[7] http://www.apache.org/dist/httpd/
[8] http://www.cpan.org/src/stable.tar.gz
[9] http://www.cpan.org/src/README.html

[10] http://mathforum.org/epigone/modperl/zulflahglah
 (for 2.47 release:)
 http://mathforum.org/epigone/modperl/frooglirsoy 
[11] http://mathforum.org/epigone/modperl/kongrixmai
[12] http://mathforum.org/epigone/modperl/jungwhanja

[13] http://mathforum.org/epigone/modperl/tenshoxquung
[14] http://mathforum.org/epigone/modperl/mecloxdwy

[15] http://mathforum.org/epigone/modperl/fralshamquol
[16] http://mathforum.org/epigone/modperl/chungphadwum
[17] http://mathforum.org/epigone/modperl/preldphambling
[18] http://mathforum.org/epigone/modperl/slandslayming

[19] http://perl.apache.org/
[20] http://perl.apache.org/docs/
[21] http://www.cpan.org/modules/by-module/Apache/
[22] http://www.modperl.com/
[23] http://www.modperlcookbook.org/
[24] http://www.take23.org/
[25] http://perl.apache.org/maillist/modperl.html#Searchable_Archives
[26] http://perl.apache.org/maillist/dev.html#Searchable_Archives
[27] http://perl.apache.org/maillist/docs-dev.html#Searchable_Archives
[28] http://perl.apache.org/maillist/advocacy.html#Searchable_Archives

[*] this is a rough estimate for the time covered by this digest of
the number of messages on the mod_perl discussion list (where
this digest is posted) that are primarily concerned with the
given version of mod_perl.  Mod_perl 1.99_xx is counted with
mod_perl 2.0.  Posts concerning Perl modules are not counted.



Re: How do I force a 'Save Window?'

2002-11-20 Thread Francisco Corella
Dennis,

Microsoft has documentation on how IE handles MIME types,
content-disposition headers, etc.  It may be out of date, and not accurate,
but it's certainly worth reading.  Have a look at:

http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.as
p

There is also a support webcast with more information:

http://support.microsoft.com/default.aspx?scid=/servicedesks/webcasts/wc0111
01/wcblurb011101.asp

In either document you'll see that application/octet-stream does not force a
save window because IE classifies it as an ambiguous type.

Note that you can always tell your users to right-click on the link and
select Save Target As... to get a save window.

Francisco
[EMAIL PROTECTED]

- Original Message -
From: Dennis Daupert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 7:10 AM
Subject: Re: How do I force a 'Save Window?'



 Thanks all for the great suggestions. This group is wonderfully helpful.
 I tried the quick route, setting MIME type to application/octet-stream,
 and that works fine for xl spreadsheets, but I still get the same behavior
 as before with MS Project files (browser IE 5.00.3105.0106, which is one
 of the IE versions we have to support). I will need a bit more time to try
 some of the other more involved ideas , so that won't be for a few more
 days.

 /dennis

 --
-
 Office phone: 817-762-8304

 --
-
  Great leaders never tell people how to do their jobs.
Great leaders tell people what to do and establish a
  framework within which it must be done.
   Then they let people on the front lines,
who know best, figure out how to get it done.
 ~ General H. Norman Schwarzkopf







Re: How do I force a 'Save Window?'

2002-11-20 Thread Francisco Corella
I clicked on the links I sent in my previous message and noticed that one of
them didn't work because my mail program had split the url into two pieces
at a line boundary.  You may have to cut and paste the two pieces into your
browser's URL box.

You can also look for the documents by their titles in Google.  The titles
are

Appendix A: MIME Type Detection in Internet Explorer

and

MIME Type Handling in Internet Explorer.

Francisco
[EMAIL PROTECTED]

- Original Message -
From: Francisco Corella [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Dennis Daupert [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 9:21 AM
Subject: Re: How do I force a 'Save Window?'


 Dennis,

 Microsoft has documentation on how IE handles MIME types,
 content-disposition headers, etc.  It may be out of date, and not
accurate,
 but it's certainly worth reading.  Have a look at:


http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.as
 p

 There is also a support webcast with more information:


http://support.microsoft.com/default.aspx?scid=/servicedesks/webcasts/wc0111
 01/wcblurb011101.asp

 In either document you'll see that application/octet-stream does not force
a
 save window because IE classifies it as an ambiguous type.

 Note that you can always tell your users to right-click on the link and
 select Save Target As... to get a save window.

 Francisco
 [EMAIL PROTECTED]

 - Original Message -
 From: Dennis Daupert [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 7:10 AM
 Subject: Re: How do I force a 'Save Window?'


 
  Thanks all for the great suggestions. This group is wonderfully helpful.
  I tried the quick route, setting MIME type to
application/octet-stream,
  and that works fine for xl spreadsheets, but I still get the same
behavior
  as before with MS Project files (browser IE 5.00.3105.0106, which is one
  of the IE versions we have to support). I will need a bit more time to
try
  some of the other more involved ideas , so that won't be for a few more
  days.
 
  /dennis
 

 --
 -
  Office phone: 817-762-8304
 

 --
 -
   Great leaders never tell people how to do their jobs.
 Great leaders tell people what to do and establish a
   framework within which it must be done.
Then they let people on the front lines,
 who know best, figure out how to get it done.
  ~ General H. Norman Schwarzkopf
 
 
 




Re: How do I force a 'Save Window?'

2002-11-20 Thread Marc Slagle



This works for me:

I'm using pdf stuff here, but you can set the 
content type to whatever you want.

$r-content_type('application/pdf');$r-header_out("Content-Disposition" 
= "attachment; 
filename=order.pdf");$r-send_http_header();
Marc Slagle

- Original Message - 
From: "Dennis Daupert" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 10:10 
AM
Subject: Re: How do I force a 'Save 
Window?'
  Thanks all for the great suggestions. This group is 
wonderfully helpful. I tried the quick route, setting MIME type to 
"application/octet-stream," and that works fine for xl spreadsheets, but 
I still get the same behavior as before with MS Project files (browser 
IE 5.00.3105.0106, which is one of the IE versions we have to support). 
I will need a bit more time to try some of the other more involved ideas 
, so that won't be for a few more days.  /dennis 
 
--- 
Office phone: 817-762-8304  
--- 
"Great leaders never tell people how to do their jobs. 
 Great leaders tell people what to do and establish a 
 framework within which it must 
be done.  Then 
they let people on the front lines,  
who know best, figure out how to get it done." 
 ~ General H. 
Norman Schwarzkopf 



Re: Newbie: how to use PerlSetVar

2002-11-20 Thread Perrin Harkins
[EMAIL PROTECTED] wrote:


What about namespaces, i.e. how
do I avoid stepping on someone else's variable?


Prepend some custom string in front of the VarName:

 PerlSetVar MyApp_Var1 value1
 PerlSetVar MyApp_Var2 value2



Also, note that these are scoped within the Location block where they 
are defined.  This means you can actually have different values for 
different locations, different virtual hosts, etc.

- Perrin



RE: Newbie: how to use PerlSetVar

2002-11-20 Thread Beau E. Cox
Hi - and thank you -

I am RTFM, but when you get into something new (and vast)
it takes a while for the _gestalt_ to happen. You have
given me the kick start I needed. I'll be silent for a 
time coding away ;)

Aloha = Beau.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 1:09 AM
To: Modperl
Subject: Re: Newbie: how to use PerlSetVar


Hi!

On Mit, Nov 20, 2002 at 12:48:34 -1000, Beau E. Cox wrote:

 May I use PerlSetVar/PerlAddVar statements in the httpd.conf
 file for my own use?

Yes. Thats what they are here for.

 What about namespaces, i.e. how
 do I avoid stepping on someone else's variable?

Prepend some custom string in front of the VarName:

 PerlSetVar MyApp_Var1 value1
 PerlSetVar MyApp_Var2 value2

or, a real-life example out of Apache::AuthDBI
http://search.cpan.org/author/ABH/Apache-DBI-0.89/AuthDBI.pm

 PerlSetVar Auth_DBI_data_source   dbi:driver:dsn
 PerlSetVar Auth_DBI_username  db_username
 PerlSetVar Auth_DBI_password  db_password

 Assume I can. How can I access those variables from my mod_perl
 scripts?

short:
$r-dir_config('MyApp_Var1')

long:
http://perl.apache.org/docs/1.0/guide/config.html#PerlSetVar_and_PerlAddVar

I would suggest that you spend some time RTFM either here:
http://perl.apache.org

and/or read some of those books:
http://perl.apache.org/docs/offsite/books.html


-- 
#!/usr/bin/perl
for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}





mod_Perl script and SSI need advice

2002-11-20 Thread Coexec
Hi all, I have a question about how to pass form data
with mod_perl and SSI.

I have an HTML page with a mod_perl script included. 
The script creates a form and takes its input and then
prints output based on the input (pretty basic).  I
have the form action set to the script
(action=/perl/test.cgi), the problem is that when
the form is submitted, the only thing that gets
printed to the screen is the cgi output.  

I could have the mod_perl script process the
information and then generate a new URL and appended a
Query_string and then redirect($url1?$foo=$bar).  I am
sure that there is a better way to do this, I just
don't know what it is.

Any and all assistance is greatly appreciated.

Thanks.

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com



Re: References for modperl usage in financial institutions?

2002-11-20 Thread Marcin Kasperski
Thanks for all the people who sent me the references (both here and to
private email).

Maybe it would be good idea to add some such references to the 'sites
running modperl' page. My business client after taking a look at
http://perl.apache.org/outstanding/sites.html said 'nice, but there
are mostly technical sites, almost no business...'

I would also rename 'Technologies Extraordinare' link to something
like 'Who is using modperl' but that is different story...

-- 
( Marcin Kasperski   | In any large change, 1/3 will think it is great, 1/3  )
( http://www.mk.w.pl |   will think it is stupid, and 1/3 will wait (Reed)   )
()
( Porady dla twrcw serwisw WWW: http://www.mk.w.pl/porady/porady_www  )



Re: How do I force a 'Save Window?'

2002-11-20 Thread Marcin Kasperski
 Bonus Points : Use
 Content-Disposition: attachment;filename=blabla
 
 and pre-set the name of the file on disk.

I tried it hard (in my case I generate PDF files. No way. Internet
Explorer ignored it. Finally I decided to perform redirect to URL
ending with /blabla.pdf - then it worked more-or-less as expected.

-- 
( Marcin Kasperski   | A reusable framework that is developed by itself will )
( http://www.mk.w.pl |probably not be very reusable. (Martin))
()
( Porady dla twrcw serwisw WWW: http://www.mk.w.pl/porady/porady_www  )



Re: How do I force a 'Save Window?'

2002-11-20 Thread siberian
I guess its a your mileage may vary sort of thing. The 
marketing folks here use XP and whatever IE comes with it. 
I send 

$r-content_type( 'application/vnd.ms-excel' ) ;
$r-header_out('Content-Disposition' = 
'attachment; filename=report.xls' ) ;
#$r-content_type( 'application/octet-stream' ) ;
$r-send_http_header;

and for their XP boxes it opens properly in browser ( same 
for project ). They are posting to index.html in this case 
but get the filename properly. 

On my mac os x I actually get a file named 'report.xls' in 
my save dialog.

So, as often is the case, Your Mileage May Vary :)

John-

On 20 Nov 2002 22:00:25 +0100
 Marcin Kasperski [EMAIL PROTECTED] wrote:
Bonus Points : Use
Content-Disposition: attachment;filename=blabla

and pre-set the name of the file on disk.


I tried it hard (in my case I generate PDF files. No way. 
Internet
Explorer ignored it. Finally I decided to perform 
redirect to URL
ending with /blabla.pdf - then it worked more-or-less as 
expected.

--
( Marcin Kasperski   | A reusable framework that is 
developed by itself will )
( http://www.mk.w.pl |probably not be very 
reusable. (Martin))
()
( Porady dla twrcw serwisw WWW: 
http://www.mk.w.pl/porady/porady_www  )




Re: am i heading for disaster... ?

2002-11-20 Thread Stas Bekman
Noam Solomon wrote:

In the process of building apache_1.3.27 / mod_perl 1.3.27 / 
openssl0.9.6g / mod_ssl mod_ssl-2.8.12-1.3.27 on a Solaris OS 2 
UltraSparc, with Perl 5.8, the apache make failed because of an 
undefined url_delims.  I was using the method where you build mod_ssl, 
then build mod_perl, then configure apache, loading mod_perl statically.
 
Anyway, I poked around and found that indeed the uri_delims.h file in 
src/main was empty!  So still in src/main, I manually ran gcc 
gen_uri_delims.c, then ran a.out  uri_delims.h to regenerate that 
header file, and got this.
 

/* this file is automatically generated by gen_uri_delims, do not
edit */
static const unsigned char uri_delims[256] = {
T_NUL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,T_HASH,0,0,0,0,
0,0,0,0,0,0,0,T_SLASH,0,0,0,0,0,0,0,0,0,0,T_COLON,0,
0,0,0,T_QUESTION,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};

Then when I ran make again, everything was hunky-dory.  Now what I want 
to know is, why would this have happened in the first place?  Is it a 
sign that something is fundamentally wrong with the build, but I just 
haven't seen it yet?  Or should I just breathe easy and hope for the best?

I doubt this has anything to do with mod_perl. The build hasn't changed 
in years, so it must be some external glitch. For example you might have 
run out of disk space, so when it was writing the file it was zeroed.


--


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




Re: References for modperl usage in financial institutions?

2002-11-20 Thread Stas Bekman
Marcin Kasperski wrote:

Thanks for all the people who sent me the references (both here and to
private email).

Maybe it would be good idea to add some such references to the 'sites
running modperl' page. My business client after taking a look at
http://perl.apache.org/outstanding/sites.html said 'nice, but there
are mostly technical sites, almost no business...'


Yes, please post your success stories here and we will add them to
http://perl.apache.org/outstanding/sites.html or
http://perl.apache.org/outstanding/success_stories/index.html
depending on how descriptive the story is. Looking forward to add your 
stories...

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




Accessing configuration information

2002-11-20 Thread Grant McLean
Hi All

I know I can use $r-dir_config() to access parameter values
set in the config file with PerlSetVar, but is it possible to
access the value of generic Apache configuration directives?

I have a module that takes a request and maps it to both a 
Perl class and a template for displaying the class.  If the
requested URL is a directory (ie: the requested URL ends
in a '/') I want to search for the default template using 
the same set of filenames set up using the DirectoryIndex
directive.  Yes, I could use PerlSetVar, but it would be
better if people using the module didn't have to enter the
same information more than once.

Regards
Grant

===
Grant McLeanBearingPoint Inc - formerly The Web Limited
+64 4 495 9026   Level 6, 20 Customhouse Quay, Box 1195
[EMAIL PROTECTED]Wellington, New Zealand






Apache::DBI seg fault

2002-11-20 Thread Beau E. Cox
Hi -

I am using Apache::DBI on my test server - all OK.

When I try to use it on my production server, I get the
following- stdout:

Shutting down httpd..done
Starting httpd [ PERL ]

Syntax OK

stderr:

/etc/init.d/apache: line 206: 18040 Segmentation fault  $HTTPD_BIN
$INET6 -t -f /etc/httpd/httpd.conf $MODULES /var/log/httpd/rcapache.log
21
..failed

The rcapache.log file has _only_:

Syntax OK

My httpd.conf has:

IfModule mod_perl.c
PerlModule Apache::DBI

before any other includes; I have commented out my startup script
so that I am not actually using any Apache::DBI methods.

BOTH the test and production servers are using:

Apache/1.3.26 (Linux/SuSE) mod_perl/1.27
Linux/SuSE 8.1 - both with the latest patches.

I can find nothing in the httpd logs.

I know it must be some difference in my environment between the
test and production servers, but I am at wits end on how to
track this problem down. Could someone please push me in
the right direction?

Aloha = Beau.