Re: AuthDBI with Interbase

2000-09-02 Thread Edwin Pratomo

Yury Vasiliev wrote:
> 
> I use AuthDBI with Interbase
> It works ok, but there are some strange error in log
> 
> //---
> $Apache::DBI::VERSION = '0.87';
> $DBI::VERSION = "1.14";
> 
> Interbase 6.0
> 
> //---


Use the latest DBD::InterBase at
http://sourceforge.net/projects/dbi-interbase/ 
This one is far more improved and stable than the previous one at CPAN. 
Once I've revised the FAQ, I'll put it at CPAN.

I haven't tested AuthDBI with InterBase. Other DBI extension modules
that I've known to work fine with DBD::InterBase are Apache::DBI,
DBIx::Recordset, and DBIx::Tree (a small patch for DBI should be applied
first, due to a small bug in fetchall_arrayref method). Tie::DBI
_doesn't_ work. It uses LISTFIELDS command which is specific to MySQL,
and causes the InterBase parser to fail.

Rgds,
Edwin.



Re: multilanguage site

2000-09-02 Thread Matt Sergeant

On 1 Sep 2000, Greg Stark wrote:

> 
> > >> can someone suggest me the best way to build a multilanguage web site
> > >> (english, french, ..).
> > >> I'm using Apache + mod_perl + Apache::asp (for applications)
> 
> I'm really interested in what other people are doing here. We've just released
> our first cut at i18n and it's going fairly well. But so far we haven't dealt
> with the big bugaboo, character encoding. 
> 
> One major problem I anticipate is what to do when individual include files are
> not available in the local language. For iso-8859-1 encoded languages that's
> not a major hurdle as we can simply use the english text until it's
> translated. But for other encodings does it make sense to include english
> text? 
> 
> If we use UTF-8 all the ascii characters would display properly, but do most
> browsers support UTF-8 now? Or do people still use BIG5, EUS, etc? 

My experience has been really good. With 4.x+ browsers UTF8 displays just
fine, with the obvious caveat that you have to be using the right
fonts. Generally the people you are displaying to have the right fonts
(otherwise they wouldn't be able to use their computers!).

My only problems were two things: 1. Title bars in Linux just displayed
junk. This was probably both an encoding/window manager issue and a font
issue. 2. People don't want their content in UTF8 - they want it in the
character set they are used to, like ISO-8859-2. So I added support in
AxKit for alternate output encodings.

Of course being XML, AxKit handles different character sets in included
files just fine - everything is UTF8 to axkit.

> As far as I can tell there's no way in html to indicate to the browser that a
> chunk of content is in some other encoding other than what was specified in
> the headers or meta tag. There's no  attribute or anything
> like that.

Yes, there is.

> This seems to make truly multilingual pages really awkward. You
> basically must use an encoding like UTF-8 which can reach the entire unicode
> character set or else you cannot mix languages.

Or use AxKit ;-)

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




Re: AuthDBI with Interbase

2000-09-02 Thread Gerald Richter

> Other DBI extension modules
> that I've known to work fine with DBD::InterBase are Apache::DBI,
> DBIx::Recordset

Was it necessary to add an entry in Compat.pm, or did it work out of the
box? If you made any changes in Compat.pm, please send them to me, so I can
include it in the next release of DBIx::Recordset

Thanks

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: Apache::Reload 0.04

2000-09-02 Thread Stas Bekman

> Stas Bekman <[EMAIL PROTECTED]> writes:
> 
> > But adds an additional stat() call for each request, which might be not
> > desired for "some" sites... I know it's quite fast. See:
> > 
>http://thingy.kcilink.com/modperlguide/performance/Reducing_the_Number_of_stat_Ca.html
> > 
> > But, yeah it's cool!
> 
> In practice I find that stat calls are a minor performance factor when
> compared with database calls so for any fairly dynamic site it's not a big
> factor.
> 
> However, perhaps a better tradeoff for a production site would be to perform
> these stat calls in the parent just before a graceful restart. Then to force
> rereading the library files without any downtime the you would just do a
> graceful restart, which would recompile all the .pm files and then start
> spawning new children with optimal shared memory behaviour:)
> 
> I believe Apache::ASP's internal mechanism is capable of this now. 

That's what PerlFreshRestart was written for. But as the current state
goes it's deprecated since many people has reported segfaults with it (at
least for those who has this problem). Otherwise it does just like what
you have described above, without any relation to Apache::Reload.

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





Re: AuthDBI with Interbase

2000-09-02 Thread Edwin Pratomo

Gerald Richter wrote:
> 
> > Other DBI extension modules
> > that I've known to work fine with DBD::InterBase are Apache::DBI,
> > DBIx::Recordset
> 
> Was it necessary to add an entry in Compat.pm, or did it work out of the
> box? If you made any changes in Compat.pm, please send them to me, so I can
> include it in the next release of DBIx::Recordset

Thanks, Gerald. The default values work just fine, with one exception:
Placeholders => 3
But even without specifying this, it passes all of the make test.

Rgds,
Edwin.



Re: Question about suggested AIX patch to perl.

2000-09-02 Thread Jens-Uwe Mager

On Fri, Sep 01, 2000 at 07:45:46PM -0400, Paul J. Reder wrote:
> I am working to update my instructions for getting mod_perl working as a DSO
> on AIX. I see that there is a recommended patch for dl_aix.xs to get XS 
> working.
> 
> I am currently testing on AIX 4.3.3, Apache 1.3.13-dev, and IBM's IHS version
> 1.3.12.2. There does not seem to be a perl file named dl_aix.xs anywhere in
> the perl tree (perl5.00503 - which I believe is the default that is shipped
> with AIX now). I did a find on the machine and found nothing. There isn't even
> a perl subdirectory named ext.
> 
> Mod_perl seems to be working ok with the tests I have run. Do you know what
> versions of perl/AIX require this patch? Do you know of a definitive test
> to see if I am broken or not? I looked through the newsgroups and archives
> that I could find and found no definitive answer as to what the patch applies
> to.

I would believe if you are talking about the binary perl distribution
that is shipped with AIX 4.3.3 nowadays, for that one you would not find
dl_aix.xs as the perl package does not include the source it is built
from. The patch is for those folks that build their perl from sources,
e.g. by downloading the .tar.gz file from CPAN.

To find out if you have the problem you will need to use a perl XS
module that also needs to reference symbols from the Apache core, for
example HTML::Embperl or libapreq. These modules will dump core
without the patch.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:  +49 5131 709320
FAX:+49 5131 709325
Internet:   [EMAIL PROTECTED]



Re: multilanguage site

2000-09-02 Thread Eric L. Brine


> > As far as I can tell there's no way in html to indicate to the
> > browser that a chunk of content is in some other encoding other
> > than what was specified in the headers or meta tag. There's no
> >  attribute or anything like that.
> 
> Yes, there is.

None exists in the standard, as seen below, and I don't see anything in
CSS either.












ELB



Re: Apache::Reload 0.04

2000-09-02 Thread Joshua Chamas

Greg Stark wrote:
> 
> Stas Bekman <[EMAIL PROTECTED]> writes:
> 
> > But adds an additional stat() call for each request, which might be not
> > desired for "some" sites... I know it's quite fast. See:
> > 
>http://thingy.kcilink.com/modperlguide/performance/Reducing_the_Number_of_stat_Ca.html
> >
> > But, yeah it's cool!
> 
> In practice I find that stat calls are a minor performance factor when
> compared with database calls so for any fairly dynamic site it's not a big
> factor.
> 
> However, perhaps a better tradeoff for a production site would be to perform
> these stat calls in the parent just before a graceful restart. Then to force
> rereading the library files without any downtime the you would just do a
> graceful restart, which would recompile all the .pm files and then start
> spawning new children with optimal shared memory behaviour:)
> 
> I believe Apache::ASP's internal mechanism is capable of this now.
> 

Yes, to have Apache::ASP reload scripts and libraries just at
restart, for normal scripts config do:

  PerlSetVar StatScripts 0
  PerlSetVar StatINC 0  # default

Then for a perl restart handler, register a sub which 
calls Loader()

sub restart {
  Apache::ASP->Loader(
'/path/to/scripts/', '\.asp$|$other_pattern_match'
StatINC => 1,
%OtherConfigs
);
}

This will make your web site only change upon server 
graceful restart, and saves some stat() calls.

The StatINC mechanism is similar to what is provided
by Apache::Reload and Apache::StatINC.

Note that I would not use this method much, as the
restart handler last I checked seems to leak 1M RAM
for each graceful, but this is a nicer way to republish
your web site than doing a hard stop/start

-- Joshua

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



[OT] mod_rewrite hang

2000-09-02 Thread Jonathan Leto

If anybody could give me some insight on the problem I am having,
it would be greatly appreciated. I have been working on this all day,
and I just can't get past this roadblock.

Situation: Using mod_rewrite's RewriteMap functionality with an
external rewrite rewrite map ( a perl script ). 
Tested on 3 Linux 2.2/Apache 1.3.12 webservers. Two act exactly as they
should, and one waits *exactly* 3 minutes, then does what it should.

Details:

Apache Config:

RewriteLock /var/lock/findurl.lock
RewriteEngine on
RewriteLog  /www/logs/rewrite
RewriteMapfind   prg:/www/bin/findurl.pl
RewriteLogLevel 3 
RewriteRule ^(/~.*) ${find:$1:%{SERVER_PORT}}

findurl.pl finds content on other webservers and rewrites the url.

This works perfectly on 2 of my webservers, and on one it just hangs for 3 minutes.

mod_rewrite takes 3 minutes:
192.x.x.x - - [02/Sep/2000:22:05:27 -0400] 
[www.tlink.net/sid#82d6724][rid#83dc41c/initial] (2) init rewrite engine with 
requested uri /~asdf/
192.x.x.x - - [02/Sep/2000:22:05:27 -0400] 
[www.tlink.net/sid#82d6724][rid#83dc41c/initial] (3) applying pattern '^(/~.*)' to uri 
'/~asdf/'
192.x.x.x - - [02/Sep/2000:22:08:27 -0400] 
[www.tlink.net/sid#82d6724][rid#83dc41c/initial] (2) rewrite /~asdf/ -> 
http://www2.tlink.net/~asdf/
192.x.x.x - - [02/Sep/2000:22:08:27 -0400] 
[www.tlink.net/sid#82d6724][rid#83dc41c/initial] (2) implicitly forcing redirect 
(rc=302) with http://www2.tlink.net/~asdf/
192.x.x.x - - [02/Sep/2000:22:08:27 -0400] 
[www.tlink.net/sid#82d6724][rid#83dc41c/initial] (1) escaping 
http://www2.tlink.net/~asdf/ for redirect
192.x.x.x - - [02/Sep/2000:22:08:27 -0400] 
[www.tlink.net/sid#82d6724][rid#83dc41c/initial] (1) redirect to 
http://www2.tlink.net/~asdf/ [REDIRECT/302]

192.x.x.x - - [02/Sep/2000:23:28:25 -0400] 
[www.tlink.net/sid#82f6c8c][rid#83fa96c/initial] (2) init rewrite engine with 
requested uri /~pleasework/
192.x.x.x - - [02/Sep/2000:23:28:25 -0400] 
[www.tlink.net/sid#82f6c8c][rid#83fa96c/initial] (3) applying pattern '^(/~.*)' to uri 
'/~pleasework/'
192.x.x.x - - [02/Sep/2000:23:31:25 -0400] 
[www.tlink.net/sid#82f6c8c][rid#83fa96c/initial] (2) rewrite /~pleasework/ -> 
http://www2.tlink.net/~pleasework/
192.x.x.x - - [02/Sep/2000:23:31:25 -0400] 
[www.tlink.net/sid#82f6c8c][rid#83fa96c/initial] (2) implicitly forcing redirect 
(rc=302) with http://www2.tlink.net/~pleasework/
192.x.x.x - - [02/Sep/2000:23:31:25 -0400] 
[www.tlink.net/sid#82f6c8c][rid#83fa96c/initial] (1) escaping 
http://www2.tlink.net/~pleasework/ for redirect
192.x.x.x - - [02/Sep/2000:23:31:25 -0400] 
[www.tlink.net/sid#82f6c8c][rid#83fa96c/initial] (1) redirect to 
http://www2.tlink.net/~pleasework/ [REDIRECT/302]

The hanging occurs before it even gets to my perl script, which has me stumped.

All servers are Apache 1.3.12, Linux 2.2, perl 5.005_03.

Can anybody help?

-- 
[EMAIL PROTECTED] 
"With pain comes clarity."





Re: multilanguage site

2000-09-02 Thread Matt Sergeant

On Sat, 2 Sep 2000, Eric L. Brine wrote:

> 
> > > As far as I can tell there's no way in html to indicate to the
> > > browser that a chunk of content is in some other encoding other
> > > than what was specified in the headers or meta tag. There's no
> > >  attribute or anything like that.
> > 
> > Yes, there is.
> 
> None exists in the standard, as seen below, and I don't see anything in
> CSS either.

My bad. I was mistaken by HTML form's accept-charset attribute.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org