Re: [OT] ApacheCon BOF

2001-03-23 Thread Tim Sweetman

Jonathan Gardner wrote:
 
 On Thu, 22 Mar 2001, Gunther Birznieks wrote:
  So apart from the Native American thread which I believe everyone has
  worked out...
 
  what do you want to do about T-Shirts?
 
  For me, three ideas stand out...
  1) I did like the ModDonalds idea...
 
 What about this?  (this would have to appear on the back or in small text on
 the front)
 
 If McDonalds used mod_perl...
 

... a burger that was referred to like a box of fries would turn into
some strange numeric concoction that didn't make any sense, but was
occasionally useful.

... the recipes would be available to the public.

... their menus would become enormous, available from a CMAN, and full
of a mixture of completely bizarre experiments and staggeringly good
food, all mixed up together.

... every time you bit into a burger, it would rebuild itself on-the-fly
just in time for you to taste it.

... some wit would probably put hash cakes and oysters on the menu.

... if you weren't careful, ordering one thing would cause a bunch of
other "pre-requisites" to also get ordered. Ultimately, you might find
them refurbishing the whole building in response to your order.

(But Trademark Difficulties(tm) probably take out this idea; there are
better legal fights to be had).

--
Tim Sweetman
A L Digital
"Life in a box is better than no life at all, I expect. 
 You'd have a chance, at least. You could lie there thinking,
 'Well. At least I'm not dead.'" --- Rosencrantz



Re: [OT] ApacheCon BOF

2001-03-23 Thread Randal L. Schwartz

 "Tim" == Tim Sweetman [EMAIL PROTECTED] writes:

Tim (But Trademark Difficulties(tm) probably take out this idea; there are
Tim better legal fights to be had).

But in the US, we have safe harbor because of the 2 live crew supreme
court case.  This is a parody, remember!?

Of course, you're own your own if you export the shirt to
international waters... :)

If you just stick with the original idea, there's not a helluva lot
they can claim about TM dilution or confusion of services offered.  I
actually thought about both of those issues when I came up with the
idea.  That's why it was a serious idea.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



RE: dbm locking info in the guide

2001-03-23 Thread David Harris

Stas,

Sounds like you agree with me that downgrading locks from exclusive to
shared is not a problem with the method I described in the last e-mail.

Now you have a concern with upgrading locks from shared to exclusive:

 David, please consider this scenario:

 ... At some point in time, processes A and B both read from the dbm via SH
 lock.

 1. A completes its reading and unlocks the DBM, while still having the
 first 4k cached. (A still has the dbm tie()'d.

 2. B wants to write, so it requests an EX lock and gets it granted.

This will not happen. When B requests the EX lock it will block until all of
the other shared locks have been released. Process A has to release the SH
lock somehow for B to get the EX lock. Either A simply finishes and releases
the lock, or A requests an upgrade, is denied, and handles this by releasing
the lock.

When the EX lock is granted (whether from an upgrade or not), by definition
no other processes can have a SH lock and be reading the database. No other
processes can have a first 4k cached because no other processes can have the
file open.

From the flock manpage: "A single file may not simultaneously have both
shared and exclusive locks."

 3. B modifies the data in the first 4k, syncs it and releases the lock.

 4. A asks for SH or EX lock, gets it, but its cache is invalid.

 = we have a data corruption (especially in the case A does writing into
 the first 4k)

David Harris
President, DRH Internet Inc.
[EMAIL PROTECTED]
http://www.drh.net/

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 10:22 PM
To: David Harris
Cc: mod_perl list
Subject: RE: dbm locking info in the guide

On Thu, 22 Mar 2001, David Harris wrote:

 Two points about switching from exclusive mode to shared mode:

 (1) When downgrading from EX to SH, no other processes need to have cached
 data invalidated because no one else can have the database open. There is
no
 cache in other processes, therefore none to be invalidated.

 Explanation: Lets say the method for downgrading a lock from EX to SH is
 like this: write data, sync(), flock(FLOCK_SH), read data. Until the
 flock(FLOCK_SH) nobody else can have the database open because of the
 exclusive lock. Therefore, there will not be any other processes with the
 database open and the first 4k cached in memory when the sync() happens.

David, please consider this scenario:

... At some point in time, processes A and B both read from the dbm via SH
lock.

1. A completes its reading and unlocks the DBM, while still having the
first 4k cached. (A still has the dbm tie()'d.

2. B wants to write, so it requests an EX lock and gets it granted.

3. B modifies the data in the first 4k, syncs it and releases the lock.

4. A asks for SH or EX lock, gets it, but its cache is invalid.

= we have a data corruption (especially in the case A does writing into
the first 4k)

 (2) When downgrading from EX to SH, our processes does not need to
 invalidate cached data because its cached data is correct at the sync()
and
 the data on disk will not be changed until the database is closed.

 Explanation: Again we downgrade form EX to SH by doing this: write data,
 sync(), flock(FLOCK_SH), read data. Our cache remains valid the entire
time
 here. With the sync(), data in our cache is written to disk, so at that
 point we are good. Then after the flock(FLOCK_SH) we are still good
because
 the shared lock prevents anyone else from writing to the database and
 changing the data on disk. There is no need to do a re-tie().

That's correct.

_
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: dbm locking info in the guide

2001-03-23 Thread Stas Bekman

On Fri, 23 Mar 2001, David Harris wrote:

 Stas,

 Sounds like you agree with me that downgrading locks from exclusive to
 shared is not a problem with the method I described in the last e-mail.

That's correct.

 Now you have a concern with upgrading locks from shared to exclusive:

  David, please consider this scenario:
 
  ... At some point in time, processes A and B both read from the dbm via SH
  lock.
 
  1. A completes its reading and unlocks the DBM, while still having the
  first 4k cached. (A still has the dbm tie()'d.
 
  2. B wants to write, so it requests an EX lock and gets it granted.

 This will not happen. When B requests the EX lock it will block until all of
 the other shared locks have been released. Process A has to release the SH
 lock somehow for B to get the EX lock. Either A simply finishes and releases
 the lock, or A requests an upgrade, is denied, and handles this by releasing
 the lock.

That's if you code it that way. Nothing prevents you from unlocking A, and
then asking for some lock later. You always want to make the critical
section as short as possible. So if you need to access the dbm file twice
through the request. You may go through this scenario:

A: flock SH
B: flock SH
A: flock UN
B: flock EX
B: flock SH
A: flock SH

'A' still have the data cached and possibly invalid.

Your proposed system is clean only in this case:

You can never explicitly unlock dbm and then relock it without calling
untie(). You can safely upgrade the lock from SH to EX and downgrade from
EX to SH though, without using UN (sort of semi-atomically).

 When the EX lock is granted (whether from an upgrade or not), by definition
 no other processes can have a SH lock and be reading the database. No other
 processes can have a first 4k cached because no other processes can have the
 file open.

They can, if there weren't untie()d per my above explanation.

_
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://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





(new idea) RE: [OT] ApacheCon BOF

2001-03-23 Thread dave . clarke



theme
How about a picture of a card game; on the table
are a 9 of diamonds, Jack of Clubs, and King of spades.

The dealer is about to play the Ace of perl.

The caption reads, "mod_perl does the trick".

Also in the dealer's hand are cards that say,
IIS
iPlanet
Servertec
Xitami
...

/theme

The cards on the table are arbitrary.  Perhaps
some clever individual can code a secret message
into the card selection.

I'm also not sure what the 'Ace of perl' should look like,
but we all know what the 'A' stands for.

You can also pick your favorite competition, for cards still
in the dealer's hand.







Charset?

2001-03-23 Thread Dave Rolsky

Is there a mod_perl way to set the character set besides doing:

$r-content_type('text/html; charset=foo');

???

That'd be handy for a future version.  I can't find anything in the
Apache.pm docs (1.24) or the guide for this.


-dave

/*==
www.urth.org
We await the New Sun
==*/




Re: Getting MAC address

2001-03-23 Thread Franck PORCHER


On Wed, 21 Mar 2001, John Whitnack wrote:

 Is there a way to get a person MAC address using apache, mod_perl or
 javascript. I have yet to find a way to do this? I need a way to
 uniquely identify the computer a person is using (i.e. not ip address).
 
 John Whitnack
 

If I'm correct, MAC address is a means of identifying some 
communication devices sharing a commun physical link, like Ethernet.
For instance, SLIP and PPP do not use any. They do not need to since
they are used in peer to peer communication.

So let's suppose your client is hooked on an Ethernet segment.
According to TCP/IP operation (TCP/IP Illustrated by Stevens is a good
reference), getting at the client PC MAC address would require your
Apache server to have one NIC share the client Ethernet segment.
In such a case, it would be possible to perform an ARP request, or scan
the Apache server ARP cache with a command like (Linux)
  # /sbin/arp -a | grep 'clientIP''| cut -d' ' -f4 
to fetch the MAC address.

Otherwise, the best bet would be to have Javascript deliver it
to your Apache server as a mere data. But I do not see in the
Javascript specs any provision for doing that.

Good luck

Franck

 ---
|   A fashion rules each age, without most people   |
|   being able to see the tyrants that rule them.   |
|  [Albert Einstein]|
 ---





Problem with mod_perl 1.25 as a DSO with Apache 1.3.19 on Digital Unix 4.0F

2001-03-23 Thread Chris Adams

I am trying to use mod_perl 1.25 with Apache 1.3.19 on Digital Unix
version 4.0F.  When I build the DSO and try to load it into Apache, I
get:

Syntax error on line 486 of /usr/local/www/apache/1.3.19/conf/httpd.conf:
Cannot load /usr/local/www/apache/1.3.19/libexec/libperl.so into server: Unresolved 
symbol in /usr/local/www/apache/1.3.19/libexec/libperl.so: PL_tmps_ix

This is with perl 5.6.0 (I tried first with 5.005_03).

When building perl on Digital Unix, the default is to build libperl as a
shared library instead of a static library.  This is called libperl.so.
I thought that mod_perl being libperl.so might be a problem, so I
renamed it to libmodperl.so, but that didn't seem to help.

It appears that Apache is not loaded the perl library when loading the
mod_perl DSO for some reason.  I would prefer to keep mod_perl as a DSO
(I have several instances of Apache on this server, and I only want
mod_perl available in one of them, and it makes upgrading MUCH easier if
there is only one Apache binary).

Any ideas?  Anyone else using mod_perl as a DSO with libperl as a shared
library?
-- 
Chris Adams [EMAIL PROTECTED]
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.



using Apache:DBI

2001-03-23 Thread C Smith

Hello everyone,

I'm new to Apache mod_perl and this list.  Please
forgive me if the answer to this question has already
been discussed.

Using "PerlRequire startup.pl" to preload Apache::DBI,
I get the following error from Apache:

Had to create DBD::mysql::dr::imp_data_size
unexpectedly at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBI.pm
line 687.

This started happening after the system administer
rebooted our server running FreeBSD.  Before that,
everything worked fine.

Any suggestions?


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



Apache::ASP - Server-CreateObject

2001-03-23 Thread Jakob Adeltoft

I have a problem - I'm trying to convert my ASP code to Perl code for use
with Apache::ASP on Win98. Currently I make Server.CreateObject calls fra
within my asp page that generates an html page for me.

The code is as below:
%
Dim ASPLightningclogin
Set ASPLightningclogin = Server.CreateObject("WPRS303_CWP.clogin")
ASPLightningclogin.Execclogin
%

Is below conversion the correct for Perl?
%
my $ASPLightningclogin = $Server-CreateObject("WPRS303_CWP.clogin");
$ASPLightningclogin-Execclogin;
%


This only generates a blank html page in my browser?
The ".htm" examples from site/eg directory works fine, but all ".asp" files
does not execute. I get an "Internal Server Error". Any idea what's wrong?

By the way I'm not a member of any discussion board - how do I get that? Do
I have to check in the discussion groups every day for any responds to my
question or do I recieve an e-mail?

I hope you are able to help me:)

Best Regards,
Jakob Vedel




Re: Charset?

2001-03-23 Thread Matt Sergeant

On Fri, 23 Mar 2001, Dave Rolsky wrote:

 Is there a mod_perl way to set the character set besides doing:
 
 $r-content_type('text/html; charset=foo');
 
 ???

No, that's the way you have to do it.

-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: Apache::ASP - Server-CreateObject

2001-03-23 Thread Joshua Chamas

Jakob Adeltoft wrote:
 
 I have a problem - I'm trying to convert my ASP code to Perl code for use
 with Apache::ASP on Win98. Currently I make Server.CreateObject calls fra
 within my asp page that generates an html page for me.
 
 The code is as below:
 %
 Dim ASPLightningclogin
 Set ASPLightningclogin = Server.CreateObject("WPRS303_CWP.clogin")
 ASPLightningclogin.Execclogin
 %
 
 Is below conversion the correct for Perl?
 %
 my $ASPLightningclogin = $Server-CreateObject("WPRS303_CWP.clogin");
 $ASPLightningclogin-Execclogin;
 %
 

This looks about right, but to get more help on that, you might
try asking at: [EMAIL PROTECTED]

 This only generates a blank html page in my browser?
 The ".htm" examples from site/eg directory works fine, but all ".asp" files
 does not execute. I get an "Internal Server Error". Any idea what's wrong?
 

What's in your error_log for a bad request?  
Make sure the .htaccess in site/eg has Debug set to -2 or -3.  

 By the way I'm not a member of any discussion board - how do I get that? Do
 I have to check in the discussion groups every day for any responds to my
 question or do I recieve an e-mail?
 

Check out: http://perl.apache.org/#maillists

To develop in Apache::ASP, its necessary to know how to develop
in mod_perl generally.  

-- Josh

_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Chromium

2001-03-23 Thread Pierre Phaneuf


Did anyone try the Chromium Apache-based web server? More specifically
(and topically), does it work with mod_perl?

http://www.chromium.com/

-- 
"I've run DOOM more in the last few days than I have the last few
months. I just love debugging ;-)" -- Linus Torvalds



RE: dbm locking info in the guide

2001-03-23 Thread Stas Bekman

 Perhaps we have a misunderstanding here. I would NEVER flock(UN) without
 having just previously untie()d the database. And I would ALWAYS acquire a
 lock immediately before tie()ing the database.

That's the point. We have to write down all the assumptions or people will
do the wrong thing. I'll try to summarize our discussion later.

Thanks David!

_
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://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/