[Agenda] Team management and Project tracking - Success Story

2002-07-18 Thread BeerBong

Hello!

We just finished writing first version of our system Agenda -
http://agenda.samara.net.

First of all I want to say about our framework - Apache::Site, which
we used in all our current projects (about 20). If you don't
interested just skip to next paragraph.
http://agenda.samara.net/Apache-Site.pm
It provides Framework for Template::Toolkit modules...
Combination of Apache::Site and Temlate::Toolkit is more powerful and
flexible for us than any other solutions on this page
http://www.perl.com/pub/a/2001/08/21/templating.html?page=4
Module parses URI, determine handler from it, has a caching
capabilities... In short word, it is our template for mod_perl
handler, which works with Template::Toolkit.
We wrote about this module here, but didn't recieve any responses... I
think lack of documentation is a problem... or my gruesome english :)

Let's come back to Agenda...
It is pure model-view-controller application. There are Agenda.pm -
Template::Toolkit - Apache::Agenda.pm modules - therefore Agenda is
very flexible.
It works on Linux box now. It has a multi-language kernel. It has 2
languages now - english  russian, but we didn't write english Help
yet :(
Translation to other language or correcting of interface may be
performed from the same WEB interface.
It is in production for my studio (http://www.webzavod.ru/) during 2
months. Productivity rised greatly, president of our companies is
happy - he gets reports when he wants, I'm happy - I do not write
these reports.

And delicate topic... Our chief wants to sell this application...
Strange! :)) Price is $590 for one installation and unlimited licenses
now, but it requires Oracle now - we want to migrate the application
to free database (mySQL). Writing complex systems with powerful
databases such Oracle is much simpler on developer stage.
MSProject 2002 with comparable functionality (I saw MS Project - we
provide all basic functionality, I dont know what I need else from
Agenda now) but better interface :) will costs for our company (50
employees) ---
MSProject Server 2002 - $1500 + 50*$599 for Microsoft Project Standart
= $31500, or
MSProject Server 2002 - $1500 + 50*$170 for Web Access Licenses =
$1
+ price for required MS SQL Server $1500 minimum or $11000 maximum

I want to contribute my work to Open Source Community, but it breaks
my company policy :-/
I have a right to pass sources with my gratitude for free to
contributors of technologies we used (for own usage) - Apache, Perl,
mod_perl, DBI, DBD::mysql, Template::Toolkit, Apache::ASP (we used it
early), AxKit... Sorry if forget someone. May these people advise how
to separate free version of the system for Open Source Community and
not much harm sales of the system?

PS: We're redesigning the interface just now. Some pages are different
from each other :)

Sergey Polyakov   aka BeerBong
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]






Re: [Agenda] Team management and Project tracking - Success Story

2002-07-18 Thread BeerBong

  First of all I want to say about our framework - Apache::Site,
which
  we used in all our current projects (about 20). If you don't
  interested just skip to next paragraph.
  http://agenda.samara.net/Apache-Site.pm

 Did you actually release Apache::Site on CPAN? Couldn't find it
there.

We did not release it on CPAN. We announced it in mod_perl list first
and wanted to get offers for naming the Module
(Apache::Site sounds too much pretentious :) ). We consider that code
is not good as possible and thought gurus will point to weak parts of
code.
After all, gurus can say - it is comletely useless module, because
there are better solutions and ... bla bla bla... :) We don't want to
publish JustAnotherSillyApacheFramework :)
And another, main trouble - permanent lack of time for documenting :((


  Let's come back to Agenda...
  It is pure model-view-controller application. There are
Agenda.pm -
  Template::Toolkit - Apache::Agenda.pm modules - therefore Agenda
is
  very flexible.
  It works on Linux box now. It has a multi-language kernel. It has
2
  languages now - english  russian, but we didn't write english
Help
  yet :(
  Translation to other language or correcting of interface may be
  performed from the same WEB interface.
  It is in production for my studio (http://www.webzavod.ru/) during
2
  months. Productivity rised greatly, president of our companies is
  happy - he gets reports when he wants, I'm happy - I do not write
  these reports.

 This looks quite interesting. The company I work for is constantly
looking
 for some useable workflow-, ressource- and processmananagement, erm.
 whatever you call it :)

  And delicate topic... Our chief wants to sell this application...
  Strange! :)) Price is $590 for one installation and unlimited
licenses
  now, but it requires Oracle now - we want to migrate the
application
  to free database (mySQL). Writing complex systems with powerful
  databases such Oracle is much simpler on developer stage.

 I think the price is reasonable - but the requirment of an oracle
 installation isn't really a good point for us. :)

 Btw, I would beg you to give PostgreSQL a shot before you port
Agenda to
 MySQL, as PostgreSQL is far nearer - in terms of features and warm
fuzzy
 feelings - to Oracle as MySQL is (I don't want to get into advocacy
here,
 but I wouldn't say that MySQL is a RDMBS at all).

Agreed, realization of all business logic outside database is real
PITA, just mySQL is more popular...

PS: Forgot to say that there is another way - Application Service
Providing. Just now 3 independent system works on
http://agenda.samara.net -
Demo Russian, Demo English and Production version of Company... It
should be mch cheaper, but there is another bottleneck - not all
companies will agree to post payments for projects and other
confidential information to Application which hosted somewhere in
snowy Russia with bears on the streets :


Sergey Polyakov   aka BeerBong
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]






Apache::Site [WAS] Re: Segmentation fault

2002-02-21 Thread BeerBong

  We already did this! The question is - with 2 apache config,
  proxy-front-end apache logs every request, even if power apache
daemon
  crushed with segfault, simple-proxy daemon logs request with URI
and
  502 status. We know time of segfault and can find 502 request in
  access logs with such time, and we can find out a request, wich
causes
  seg fault. All right. It's working for 2 apache config. If we use
  simple 1 apache daemon, I think, we will have in logs segfault
message
  only. Is there way to find out segfault request for simple
  configuration ?

 Provide a custom loghandler, which runs before the content
generation phase
 or whichever phase the segfault happens at. Though you won't know
the
 status,
 but there is nothing you can do after segfault. Or I can think of
two steps
 handler, which let's say logs something before the potentially
segfaulting
 handler and the status after the handler is run. So in case of
segfaults
 the status will be missing.

(First of all, sorry for gruesome english)

Thank you for response. As I understand, with simple configuration we
should assign
global URI translation (for instance) handler where we will log
request's URI.
After segfault we can find (via awk or other text processor) logged
URI without status.
Right?
Huh... I think installation of mod_accel or mod_proxy front-end is
simpler solution.

Thank you again and I will be happy to hear some feedback from
mod_perl guru
about module, which was developed by my team. It's another framework
and Matt Sergeant
compared it with Mason although it is much simpler and we purposed
other aims.

Our target was to ease implementing web application as Apache handler,
because,
we consider web site not a collection of html generating page-scripts,
(Apache::Registry, ASP and many other technix way), but whole
application with one entry point - Apache handler. We think that URI
processing and translating is a task of application, at any case for
projects such large e-shop or central online information portal of
region.
Another aim was to integrate TemplateToolkit usage as standart output
technique - it is excellent app, although descendant from our module
can return another status (redirect and others) or generate output via
another way freely.
Our module helps to maintain high performance web application as pure
Apache handler is fast and easy and programmer focuses on business
tasks of site only.

I put part of our programmer's letter below and ask - is there future
for such module?

| We develope the Module that will be capable of:
|   * use simple interface for dynamic site creating (and dynamic
parts for
| any almost static site);
|   * use simple urls with no query strings at all;
|   * use smart templates (standard header and footer, for example).
|
| That very early beta works on:
|   * http://www.neftechimia.ru/en/  -- business site
|   * http://review.samara.ru/   -- newspaper site
|
| Note that the module is filter-aware and on Neftechimia there is
AxKit
| postprocessing
| (that slowers down overall request performance six(!!!) times (I
think
this
| may be changed
| with new AxKit's Provider) but simplifies site supporting for
| non-professional webmaster
| -- all templates may be changed through the web-interface)
|
| III. THE FUTURE
|
| Though we need some advices:
|   * is there any need for such thing?
|   * if so, which name we should choose (it's Apache::Site for now)?
|   * what features must it also have?
|   * what do you think about it?
|
| IV. THE CODE
|
| As I said above it is very early beta. No POD, Comments only.
|   * http://www.webzavod.ru/software/Apache-Site.tar.gz
|
| V. THE AUTHOR
|
| Gregory Grishace [gree-shah-s] Belenky
| WebZavod (http://www.webzavod.ru/) programmer
|

Sergey Polyakov   aka BeerBong
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]






Re: Segmentation fault

2002-02-09 Thread BeerBong


- Original Message -
From: Ged Haywood [EMAIL PROTECTED]
To: Gregory Belenky [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, February 09, 2002 12:39 AM
Subject: Re: Segmentation fault


 Hi there,

 On Fri, 8 Feb 2002, Gregory Belenky wrote:

  Just found that Apache::Util::unescape_uri when gets undefined
value as
  parameter not returns undefined value, but make SUBJ!
  Why that's happens?

 Perhaps I'm being dense, I do not understand the question.  What is
SUBJ?

SUBJ = subject. Apache::Util has a bug which causes segemntation
fault. We know this, and solve the problem - we prevent passing
possible empty string to this method.


  if we have to use one mod_perl-powered Apache - how we can find
  request, that breaks server?

 Would it not be better to prevent the server from breaking?

We already did this! The question is - with 2 apache config,
proxy-front-end apache logs every request, even if power apache daemon
crushed with segfault, simple-proxy daemon logs request with URI and
502 status. We know time of segfault and can find 502 request in
access logs with such time, and we can find out a request, wich causes
seg fault. All right. It's working for 2 apache config. If we use
simple 1 apache daemon, I think, we will have in logs segfault message
only. Is there way to find out segfault request for simple
configuration ?


 73,
 Ged.










Re: Apache::AuthCookie not set cookie really

2002-01-29 Thread BeerBong

  Location  /agenda/
SetHandler perl-script
PerlHandler Apache::Agenda
 
PerlSetVar AgendaPath /agenda
PerlSetVar AgendaTemplate default.inc
PerlSetVar AgendaSessionDir /tmp
PerlSetVar AgendaLoginScript /agenda/login/

 Are you sure that last line is correct?

 That would send you to /agenda/login when authen_ses_key() fails,
but
 your config below is for /LOGIN/.

  Location /LOGIN/
AuthType Apache::AuthCookieAgenda
AuthName Agenda
SetHandler perl-script
PerlHandler Apache::AuthCookieAgenda-login
  /Location

 This implies to me that you meant to have:

 PerlSetVar AgendaLoginScript /LOGIN/

 Is this just a typo?

  I used Apache::Session::Counted, and know that this two modules
may
  conflict, but when all Apache::Session::Counted staff is commented
  result is the same...

 I dont think they conflict.  I've not heard any reports of that
anyway.
 The cookie names are unique so there should be no problem there.

  I dont know why cookie is not set.

 I'd suspect something isnt right with your configuration.  Have you
 tried turning on warn me before accepting cookies on your browser?
 Sometimes that helps me verify that the cookies are actually making
it
 to the browser.

 What your trying to do looks to me like exactly the sort of thing
 AuthCookie can do.  Unless I am misunderstanding your problem I
 dont see an AuthCookie limitation here.  Please explain in more
 detail if I am missing the point and I will see what we can do if
 such a limitation does in fact exist :).

 Regards,
 Michael Schout (Apache::AuthCookie maintainer)

   Location  /agenda/
  SetHandler perl-script
  PerlHandler Apache::Agenda
  PerlSetVar AgendaPath /agenda
  PerlSetVar AgendaTemplate default.inc
  PerlSetVar AgendaSessionDir /tmp
  PerlSetVar AgendaLoginScript /agenda/login/
  .
   /Location

   Location /LOGIN/
   AuthType Apache::AuthCookieAgenda
   AuthName Agenda
   SetHandler perl-script
   PerlHandler Apache::AuthCookieAgenda-login
/Location

Problem was here - AgendaPath variable is set in /agenda.* location
/LOGIN/ script, which set session key cookie header, doesn't see
AgendaPath, therefore Cookie was a
Apache::AuthCookieAgenda_Agenda=login:password
variable path=/agenda was omitted. Explorer 6.0 doesn't set cookie
without path attribute.
I think, it's a good idea to make WhatEverPath required option in
config.

with config

   PerlSetVar AgendaPath /agenda

   Location  /agenda
  SetHandler perl-script
  PerlHandler Apache::Agenda
  PerlSetVar AgendaSessionDir /tmp
  PerlSetVar AgendaLoginScript /agenda/login/
  .
   /Location

   Location /agendalogin/
   AuthType Apache::AuthCookieAgenda
   AuthName Agenda
   SetHandler perl-script
   PerlHandler Apache::AuthCookieAgenda-login
/Location

all works fine.

Actually, as my application should be
1. simple maintained,
2. maximum count of users - 100 (employees in small software
development company)
3. simultaneous login - 5-7 maximum
4. team managers work with money (project budjet, employee's payment
per hour and etc)
5. good session solutions require database access while all, what I
want to store in sessions, can get from the same database with no
great effort

I've decided to use simplest authentication module kinda
Apache::DBILogin and if someone need real security - SSL.

Thank you

Sergey Polyakov   aka BeerBong
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]






Re: Apache::AuthCookie not set cookie really

2002-01-29 Thread BeerBong

Skipped

 Actually, as my application should be
 1. simple maintained,
 2. maximum count of users - 100 (employees in small software
 development company)
 3. simultaneous login - 5-7 maximum
 4. team managers work with money (project budjet, employee's payment
 per hour and etc)
 5. good session solutions require database access while all, what I
 want to store in sessions, can get from the same database with no
 great effort

 I've decided to use simplest authentication module kinda
 Apache::DBILogin and if someone need real security - SSL.

I meant Apache::AuthDBI of course


 Thank you
 
 Sergey Polyakov   aka BeerBong
 Chief of WebZavod http://www.webzavod.ru
 Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
 mailto:[EMAIL PROTECTED]











Apache::AuthCookie not set cookie really

2002-01-28 Thread BeerBong

Hello all!

Odd thing - all should works fine.
I use Apache::AuthCookie for my project Agenda.
I wrote descendant - Apache::AuthCookieAgenda

package Apache::AuthCookieAgenda;

use strict;
use Apache;
use Apache::Constants qw(:common);
use Apache::AuthCookie;
use Agenda;

use vars qw($VERSION @ISA);

$VERSION = substr(q$Revision: 1.1 $, 10);
@ISA = qw(Apache::AuthCookie);

sub authen_cred ($$\@) {
my $self = shift;
my $r = shift;
my @creds = @_;

# This would really authenticate the credentials
# and return the session key.
# Here I'm just using setting the session
# key to the credentials and delaying authentication.
#
# Similar to HTTP Basic Authentication, only not base 64 encoded

join(:, @creds);
}

sub authen_ses_key ($$$) {
my $self = shift;
my $r = shift;
my($user, $password) = split(/:/, shift, 2);

my $modeller = Agenda-new();
$r-warn(Auth - $user - $password);

# Authenticate use here...
$modeller-authorize($user, $password) eq OK ? $user : undef;

}

In conf file

   IfDefine power
Perl
 use lib qw(/usr/web/inc /usr/web/dev.webzavod.ru/modules);
 use Apache::Agenda;
 use Apache::AuthCookieAgenda;
/Perl
PerlInitHandler Apache::Reload
PerlSetVar AuthCookieDebug 10

Location  /agenda/
  SetHandler perl-script
  PerlHandler Apache::Agenda

  PerlSetVar AgendaPath /agenda
  PerlSetVar AgendaTemplate default.inc
  PerlSetVar AgendaSessionDir /tmp
  PerlSetVar AgendaLoginScript /agenda/login/

  AuthType Apache::AuthCookieAgenda
  AuthName Agenda
  PerlAuthenHandler Apache::AuthCookieAgenda-authenticate
  PerlAuthzHandler Apache::AuthCookieAgenda-authorize
  require valid-user

/Location
Location /LOGIN/
  AuthType Apache::AuthCookieAgenda
  AuthName Agenda
  SetHandler perl-script
  PerlHandler Apache::AuthCookieAgenda-login
/Location

   /IfDefine

when I'm trying to access /agenda/ files I get login page, but after
submit a form, I return to login page again.
In logs


[Mon Jan 28 12:38:35 2002] [error] credential_0 asdasd
[Mon Jan 28 12:38:35 2002] [error] credential_1 asdasd
[Mon Jan 28 12:38:35 2002] [error] ses_key asdasd:asdasd

OUT Headers goes here

$VAR1 = 'Pragma';
$VAR2 = 'no-cache';
$VAR3 = 'Cache-control';
$VAR4 = 'no-cache';
$VAR5 = 'Location';
$VAR6 = '/agenda/tasks/';

Error OUT Headers goes here

$VAR1 = 'Set-Cookie';
$VAR2 = 'Apache::AuthCookieAgenda_Agenda=asdasd:asdasd';
$VAR3 = 'Pragma';
$VAR4 = 'no-cache';

Redirecting...
and next phase

[Mon Jan 28 12:38:35 2002] [error] auth_type Apache::AuthCookieAgenda
[Mon Jan 28 12:38:35 2002] [error] auth_name Agenda
[Mon Jan 28 12:38:35 2002] [error] ses_key_cookie

Cookie field is empty here - I don't know why...
Cookie is set via error headers, I know that it is correct for
REDIRECT responses...
ses_key_cookie is empty, therefore authen_ses_key not even requested,
redirecting to login form again.

[Mon Jan 28 12:38:35 2002] [error] uri /agenda/tasks/
[Mon Jan 28 12:38:35 2002] [error] auth_type Apache::AuthCookieAgenda
[Mon Jan 28 12:38:35 2002] [warn] Header Dump:
GET /agenda/tasks/ HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/ms
word, */*
Accept-Encoding: gzip, deflate
Accept-Language: ru
Cache-Control: no-cache
Cookie: SESSION_ID=1000_56535df97f6ed52c

I used Apache::Session::Counted, and know that this two modules may
conflict, but when all Apache::Session::Counted staff is commented
result is the same...

Host: warzavod:81
Referer: http://warzavod/agenda/tasks/
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
Q312461)
X-Real-IP: 195.209.67.7

I dont know why cookie is not set.

Is there anywhere comparison table for
Apache::AuthCookie - Apache::AuthTicket
and table for
Apache::Session modules - I use Apache::Session::Counted as the single
not-database solution wich I found for maintaining state with cleanup
feature. Or is there anywhere cleanup example for Apache::Session - I
didn't find... Apache::Session::Lock::File-clean cleans up only lock
files...
Apache::ASP - has a good session state algorithm with cleanup...


Sergey Polyakov   aka BeerBong
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]








AuthSession Manager [was] Apache::AuthCookie not set cookie really

2002-01-28 Thread BeerBong
 managers for each department.
3. Manager can view the load of members of his department
4. Comparison of spent time for task and its real cost
etc etc

Application's main goals
1. Simple install.
I don't want use cron jobs for cleanup - I think, it can be problem
for some users.
2. Separated business and presentative logic.
Application is designed as MVC (modeller-viewer-controller) in
Rational Rose and even skeleton generated via rewritten RosePerl.
(Agenda.pm as modeller, Template::Toolkit as viewer, Apache::Agenda as
controller)
Design is object-oriented.
3. Multilingual
4. Popularization of mod_perl and other brilliance technologies among
Open Source community.

We designed relational base for application
Oracle is a chosen one, because application logic is simpler to
implement with reach SQL and constraints are defined in database
already. I understand that it will be problem for many people -
install a Oracle, but as application is object-oriented and every
table in Oracle has a own object in Agenda controller package - it is
not a problem rewrite methods of objects with extended fuctionality
moved from database to Controller methods for mySQL database.

Users can be simple employees, managers, clients, admins
Employee doesn't see anything, beside assigned to him tasks.
Manager sees and update tasks for his department(s)
client sees tasks of his projects
Admin manages everything.

I need to authorize user and don't want to query on every request is
you admin, which departments you belong to etc..
I need Apache::AuthCookie (Apache::AuthTicket) and Apache::Session
functionality.
Apache::AuthCookie doesn't want to set cookie on redirect (see above).
I have a distributed light proxy Apache and mod_perl installation of
Apache.
I think the best way is to combine tickets (keys) of these modules and
use ticket as key for maintaining state with Apache::Session...
Although... After generating ticket I can use any module to store
session data which implements tied hash.
Good cleanup functionality for Apache::Session can be gained with
database driven version. Apache::AuthTicket also require DBI.
I don't think that it is good to use the Oracle database for
maintaining state or secrets for tickets. It can be slower than query
indexed table even on every request for password and departments where
user works.
MySQL...
We design this application for our company, which has a about 70
employees. I sure, such decision satisfy 98% of target auditorium for
our application.
Is it good to use such distributed solution for 100 clients of
application ?
Is there simpler and grace solution ?

Thank you for any clues
 
 Sergey Polyakov   aka BeerBong
 Chief of WebZavod http://www.webzavod.ru
 Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
 mailto:[EMAIL PROTECTED]













Re: Authentications fails after upgrade to 1.3.22

2001-12-24 Thread BeerBong

Huh...
i just forgot to compile in mod_auth module, and Apache::AuthenRadius
doesn't require it in documentation.

 ---
Sergey BeerBong Polyakov
chief of WebZavod (http://www.webzavod.ru)





Re: Authentications fails after upgrade to 1.3.22

2001-12-19 Thread BeerBong

 When you up grade from one version to the next
 version of apache ,U have to redo the passwd and
 user.
 
 I had the same problem when I tried updating from
 1.3.12 to 1.3.19-rev1,and I re-did it.
 
 Then all where ok !,what is the version of ur
 mod_perl.

I wrote - I upgraded it from 1.25 to 1.26

 
 Where you using AuthGroupfile for passwd
 checking,...

Server serves many virtual hosts and other host uses this template

Location /$dir/
  AuthType Basic
  AuthName $realm
  AuthUserFile /usr/local/apache/conf/users_file
  AuthGroupFile /usr/local/apache/conf/groups_file
  require group $realm-$dir
/Location


But I dont understanrd what i should do to solve my problem
 ---
Sergey BeerBong Polyakov
chief of WebZavod (http://www.webzavod.ru)

 
 Lets see what the ring has to say,
 
 Regards,
 Anand R
 www.dsmsoft.com
 
 
 
  --- BeerBong [EMAIL PROTECTED] wrote:  Hello
 all!
  
  I use Apache::AuthenRadius for authorization - all
  worked fine until I
  upgrade Apache to 1.3.22 and mod_perl to 1.26
  from Apache 1.3.19 and mod_perl 1.25
  
  In config file
 
 ###
  IfDefine power   # - I use this for
  determination which daemon processes
  this config. I run front-end and back-end servers.
  VirtualHost 195.128.133.65:*
 PerlPostReadRequestHandler My::ProxyRemoteAddr
  
 ServerName www.samara.net
 DocumentRoot /usr/web/www.samara.net/data
  
 ErrorLog /usr/web/www.samara.net/logs/ep.log
  
 Use dbi_macro
 Use asp_script_macro www.samara.net
  
 Directory
  /usr/web/www.samara.net/data/abonents/
   AuthType Basic
   AuthName Enter your Dialup Login and
  Password
  
   # authenticate via Radius
   PerlAuthenHandler Apache::AuthenRadius
  
   PerlSetVar Auth_Radius_host ...
   PerlSetVar Auth_Radius_port ...
   PerlSetVar Auth_Radius_secret ...
   PerlSetVar Auth_Radius_timeout ...
  
   Require valid-user
 /Directory
  
  /VirtualHost
  /IfDefine
  
 
 ###
  
  After upgrade, if I enter correct login and
  password, I get
  Internal Server Error and
 
 ###
  [Tue Dec 18 16:02:52 2001] [crit] [client
  195.209.67.7] configuration error:
  couldn't check access.  No groups file?:
  /abonents/abo
  nent.asp
 
 ###
  in logs
  
  I checked changelog for Apache and find following
  for mod_auth:
*) Enhancement of mod_auth to handle 'Require
  file-owner' and
   'Require file-group'.  This allows access IFF
  the authenticated
   username (from the appropriate AuthUserFile
  database) matches
   the username of the UID that owns the
  document (and equivalent
   checking for file GID and user's membership
  in AuthGroupFile).
   See the mod_auth documentation for examples. 
  (Not supported
   on Windows.)  [Ken Coar]
  
  I think this enhancement is responsible for such
  behaviour...
  
  Any comments ?
  
  PS: Another improvement is the
  
   allow from 195.128.133.110 # Greg Home   -
  generate warning - not supported
  comment... All was fine before 1.3.22
  
  PPS: I downgrade to 1.3.19 until solve this
  problems.
  
   ---
  Sergey BeerBong Polyakov
  chief of WebZavod (http://www.webzavod.ru)
  
  
   
 
 =
 Regards,
 
 Anand_R,
 No:25(old no:13)Nungambakkam High Road,
 DSM Soft(P)Ltd,
 Chennai.INDIA - 600 034.
 Ph No:825 0183/825 3853/825 3835
 
 




Authentications fails after upgrade to 1.3.22

2001-12-18 Thread BeerBong

Hello all!

I use Apache::AuthenRadius for authorization - all worked fine until I
upgrade Apache to 1.3.22 and mod_perl to 1.26
from Apache 1.3.19 and mod_perl 1.25

In config file
###
IfDefine power   # - I use this for determination which daemon processes
this config. I run front-end and back-end servers.
VirtualHost 195.128.133.65:*
   PerlPostReadRequestHandler My::ProxyRemoteAddr

   ServerName www.samara.net
   DocumentRoot /usr/web/www.samara.net/data

   ErrorLog /usr/web/www.samara.net/logs/ep.log

   Use dbi_macro
   Use asp_script_macro www.samara.net

   Directory /usr/web/www.samara.net/data/abonents/
 AuthType Basic
 AuthName Enter your Dialup Login and Password

 # authenticate via Radius
 PerlAuthenHandler Apache::AuthenRadius

 PerlSetVar Auth_Radius_host ...
 PerlSetVar Auth_Radius_port ...
 PerlSetVar Auth_Radius_secret ...
 PerlSetVar Auth_Radius_timeout ...

 Require valid-user
   /Directory

/VirtualHost
/IfDefine

###

After upgrade, if I enter correct login and password, I get
Internal Server Error and
###
[Tue Dec 18 16:02:52 2001] [crit] [client 195.209.67.7] configuration error:
couldn't check access.  No groups file?: /abonents/abo
nent.asp
###
in logs

I checked changelog for Apache and find following for mod_auth:
  *) Enhancement of mod_auth to handle 'Require file-owner' and
 'Require file-group'.  This allows access IFF the authenticated
 username (from the appropriate AuthUserFile database) matches
 the username of the UID that owns the document (and equivalent
 checking for file GID and user's membership in AuthGroupFile).
 See the mod_auth documentation for examples.  (Not supported
 on Windows.)  [Ken Coar]

I think this enhancement is responsible for such behaviour...

Any comments ?

PS: Another improvement is the

 allow from 195.128.133.110 # Greg Home   - generate warning - not supported
comment... All was fine before 1.3.22

PPS: I downgrade to 1.3.19 until solve this problems.

 ---
Sergey BeerBong Polyakov
chief of WebZavod (http://www.webzavod.ru)





Why libperl.so?

2001-11-28 Thread BeerBong

Hello!

It may be very stupid problem, but I stuck - hard day.

I installed Perl.
Perl 5.6.1 with all default options on Debian Linux 2.4.13  - btw, it is a
another problem, but 4 make test for Perl FAILED lib/dirhand and other, I
found that kernerl 2.4.x is responsible for it, but didn't find how to
resolve the problem.
Also, I decided to renew other soft.
upgrade kernel to 2.5.16.
mod_perl 1.5.26 and apache 1.3.22
String for mod_perl is the same as earlier
--
perl Makefile.PL APACHE_SRC=../apache_1.3.22/src \
 DO_HTTPD=1 USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1
--
when make
--
=== src/main
cc -c -I.. -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -I../os/unix -I../in
clude   -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/loc
al/include  -DUSE_HSREGEX -DNO_DL_NEEDED -DPERL_MARK_WHERE=1 `../apaci`
gen_test_char.c
cc  -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/local/i
nclude  -DUSE_HSREGEX -DNO_DL_NEEDED -DPERL_MARK_WHERE=1 `../apaci`   -o
gen_test_char gen_test_char.o  -lm -lcrypt -rdynamic  -L/usr/local/lib
/usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/lo
cal/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcryp
t -lutil
./gen_test_char test_char.h
./gen_test_char: error in loading shared libraries: libperl.so: cannot open
shared object file: No such file or directory
make[4]: *** [test_char.h] Error 127
--
Why libperl.so ? I want statically linked mod_perl.

Perl ENV
--
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.13, archname=i686-linux
uname='linux warzavod 2.4.13 #1 wed oct 31 18:17:06 samt 2001 i686
unknown '
config_args='-d'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags
='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFS
ET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.2 2220 (Debian GNU/Linux)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Nov 28 2001 11:57:27
  @INC:
/usr/local/lib/perl5/5.6.1/i686-linux
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.
--

Thanx in advance...

 ---
Sergey BeerBong Polyakov
chief of WebZavod (http://www.webzavod.ru)





Re: Why libperl.so?

2001-11-28 Thread BeerBong

 Hello!

 It may be very stupid problem, but I stuck - hard day.

 I installed Perl.
 Perl 5.6.1 with all default options on Debian Linux 2.4.13  - btw, it is a
 another problem, but 4 make test for Perl FAILED lib/dirhand and other, I
 found that kernerl 2.4.x is responsible for it, but didn't find how to
 resolve the problem.
 Also, I decided to renew other soft.
 upgrade kernel to 2.5.16.

2.4.16 of course :)

 mod_perl 1.5.26 and apache 1.3.22
 String for mod_perl is the same as earlier
 --
 perl Makefile.PL APACHE_SRC=../apache_1.3.22/src \
  DO_HTTPD=1 USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1
 --
 when make
 --
 === src/main

cc -c -I.. -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -I../os/unix -I../in

clude   -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/loc
 al/include  -DUSE_HSREGEX -DNO_DL_NEEDED -DPERL_MARK_WHERE=1 `../apaci`
 gen_test_char.c

cc  -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/local/i
 nclude  -DUSE_HSREGEX -DNO_DL_NEEDED -DPERL_MARK_WHERE=1 `../apaci`   -o
 gen_test_char gen_test_char.o  -lm -lcrypt -rdynamic  -L/usr/local/lib

/usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/lo

cal/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcryp
 t -lutil
 ./gen_test_char test_char.h
 ./gen_test_char: error in loading shared libraries: libperl.so: cannot
open
 shared object file: No such file or directory
 make[4]: *** [test_char.h] Error 127
 --
 Why libperl.so ? I want statically linked mod_perl.

 Perl ENV
 --
 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
 osname=linux, osvers=2.4.13, archname=i686-linux
 uname='linux warzavod 2.4.13 #1 wed oct 31 18:17:06 samt 2001 i686
 unknown '
 config_args='-d'
 hint=recommended, useposix=true, d_sigaction=define
 usethreads=undef use5005threads=undef useithreads=undef
 usemultiplicity=undef
 useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
 use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
 cc='cc', ccflags

='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFS
 ET_BITS=64',
 optimize='-O2',
 cppflags='-fno-strict-aliasing -I/usr/local/include'
 ccversion='', gccversion='2.95.2 2220 (Debian GNU/Linux)',
 gccosandvers=''
 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
 lseeksize=8
 alignbytes=4, usemymalloc=n, prototype=define
   Linker and Libraries:
 ld='cc', ldflags =' -L/usr/local/lib'
 libpth=/usr/local/lib /lib /usr/lib
 libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
 perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
 libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
 cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


 Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under linux
   Compiled at Nov 28 2001 11:57:27
   @INC:
 /usr/local/lib/perl5/5.6.1/i686-linux
 /usr/local/lib/perl5/5.6.1
 /usr/local/lib/perl5/site_perl/5.6.1/i686-linux
 /usr/local/lib/perl5/site_perl/5.6.1
 /usr/local/lib/perl5/site_perl
 .
 --

 Thanx in advance...

  ---
 Sergey BeerBong Polyakov
 chief of WebZavod (http://www.webzavod.ru)






Re: Why libperl.so?

2001-11-28 Thread BeerBong

Sorry, it is necessary for mod_perl now ?
I want to compile statically as many modules as I can.
 ---
Sergey BeerBong Polyakov
chief of WebZavod (http://www.webzavod.ru)


 try recompiling perl with
 sh Configure -Duseshrplib

 this will build the libperl.so file that apache needs

 -Original Message-
 From: BeerBong [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 28, 2001 12:31 PM
 To: mod-perl
 Subject: Why libperl.so?


 Hello!

 It may be very stupid problem, but I stuck - hard day.

 I installed Perl.
 Perl 5.6.1 with all default options on Debian Linux 2.4.13  - btw, it is a
 another problem, but 4 make test for Perl FAILED lib/dirhand and other, I
 found that kernerl 2.4.x is responsible for it, but didn't find how to
 resolve the problem.
 Also, I decided to renew other soft.
 upgrade kernel to 2.5.16.
 mod_perl 1.5.26 and apache 1.3.22
 String for mod_perl is the same as earlier
 --
 perl Makefile.PL APACHE_SRC=../apache_1.3.22/src \
  DO_HTTPD=1 USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1
 --
 when make
 --
 === src/main

cc -c -I.. -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -I../os/unix -I../in

clude   -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/loc
 al/include  -DUSE_HSREGEX -DNO_DL_NEEDED -DPERL_MARK_WHERE=1 `../apaci`
 gen_test_char.c

cc  -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/local/i
 nclude  -DUSE_HSREGEX -DNO_DL_NEEDED -DPERL_MARK_WHERE=1 `../apaci`   -o
 gen_test_char gen_test_char.o  -lm -lcrypt -rdynamic  -L/usr/local/lib

/usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/lo

cal/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcryp
 t -lutil
 ./gen_test_char test_char.h
 ./gen_test_char: error in loading shared libraries: libperl.so: cannot
open
 shared object file: No such file or directory
 make[4]: *** [test_char.h] Error 127
 --
 Why libperl.so ? I want statically linked mod_perl.

 Perl ENV
 --
 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
 osname=linux, osvers=2.4.13, archname=i686-linux
 uname='linux warzavod 2.4.13 #1 wed oct 31 18:17:06 samt 2001 i686
 unknown '
 config_args='-d'
 hint=recommended, useposix=true, d_sigaction=define
 usethreads=undef use5005threads=undef useithreads=undef
 usemultiplicity=undef
 useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
 use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
 cc='cc', ccflags

='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFS
 ET_BITS=64',
 optimize='-O2',
 cppflags='-fno-strict-aliasing -I/usr/local/include'
 ccversion='', gccversion='2.95.2 2220 (Debian GNU/Linux)',
 gccosandvers=''
 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
 lseeksize=8
 alignbytes=4, usemymalloc=n, prototype=define
   Linker and Libraries:
 ld='cc', ldflags =' -L/usr/local/lib'
 libpth=/usr/local/lib /lib /usr/lib
 libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
 perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
 libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
 cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


 Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under linux
   Compiled at Nov 28 2001 11:57:27
   @INC:
 /usr/local/lib/perl5/5.6.1/i686-linux
 /usr/local/lib/perl5/5.6.1
 /usr/local/lib/perl5/site_perl/5.6.1/i686-linux
 /usr/local/lib/perl5/site_perl/5.6.1
 /usr/local/lib/perl5/site_perl
 .
 --

 Thanx in advance...

  ---
 Sergey BeerBong Polyakov
 chief of WebZavod (http://www.webzavod.ru)








Re: Template or XML?

2001-09-15 Thread BeerBong
 if I wrong, there are many other
solutions, which do the same more efficient and simpler. This idealogy
(separate code and html) is far away from original ASP idea _embed_ code
into HTML.
Of course, there are ASP OO model, it is cool, but mod_perl API not so
difficult to learn. In most cases, use of pure Apache Perl API is more
simpler and efficient than Apache::ASP for us.

---
Sergey BeerBong Polyakov
Chief of WebZavod
http://www.webzavod.ru




Re: Template or XML = OpenInteract?

2001-09-15 Thread BeerBong

  We have also heard something about OpenInteract, which is based on
  Template Toolkit - may be it would be simplier to use it?

 It does sound like a possible good choice for your purposes, since it
 combines a basic application structure with Template Toolkit integration
and
 an object/relational mapping tool (SPOPS) for data management.

It seems to be interesting application.
We developed many content management systems for sites with more than one
access rights levels and more than one databases as storage of content
(MySQL and Oracle, if be precise).
May be we will use it, although it (SPOPS-0.50) don't want be compiled on my
home WinXP environment.
Errors while SPOPS make test
---
t\30_dbiok 4/18se of uninitialized value in string at
C:/TEMP/SPOPS-
0.50/blib/lib/SPOPS/DBI.pm line 634.
SPOPS::DBI::_save_insert (634)  Insert failed! Args:  $VAR1 = {
  'db' = bless( {}, 'DBI::db' ),
  'is_add' = 1,
  'table' = 'spops_test',
  'skip_cache' = 1,
  'field' = [
   'spops_goop',
   'spops_id',
   'spops_name',
   'spops_num'
 ],
  'value' = [
   'oopie doop',
   42,
   'MyProject',
   241
 ],
  'return_sth' = 1
};
---
and if I make install, I get a similar errors while do
oi_manage --package=INITIAL install_sql

 Personally, the way I would do this is to write the config stuff you're
 doing in XML as straight Perl data structures (nested hashes and arrays).
I
 would do all of the database processing in standard Perl modules, and only
 use TT to display results and editing forms.  If your TT templates seem
 messy, it may be because you're trying to do too much application logic in
 them.  It's best to avoid things like the DBI plugin and do all the real
 work before you run the template.

All logic performed in Perl modules, templates contains [% IF %] and [%
FOREACH %] tags only for designers as I wrote in previous letter. DBI plugin
in TT just for exmaple, in real scenario it is more simpler -

$self-{res}{rows} = $self-{dbh}-selectall_hashref(select * from test);

Our main goal:
Programmer write script with logic tags kinda
edit sql...
delete sql..
and choose from many usability tags, which are good looking, designers
made HTML blocks
table_edit
or
single_row_edit

BTW, Template Toolkit future version offers such ability

[%# Logic %]

[% XML %]
edit sql...
delete sql..
select sql..

[%# Design %]

table_edit
[% FOREACH %]
  single_row_edit
[% END %]

/table_edit
[% END %]

---
Sergey BeerBong Polyakov
Chief of WebZavod
http://www.webzavod.ru




Re: Template or XML?

2001-09-15 Thread BeerBong

 OpenInteract will probably do what you want, but one of its design
 philosophies is to have the templates to relatively simple work and
 handlers do the real data manipulation. So from the example in your
 original message:

   [% data=fetch({sql=SELECT MessageId, Subject FROM Messages}) %]

 You might do something like

 package MySite::Handler::Messages;

 sub listing {
 my ( $class, $p ) = @_;
 my $R = OpenInteract::Request-instance;
 my $message_iterator = eval { $R-message-fetch_group };
 my ( $error );
 if ( $@ ) {
 $error = Cannot retrieve messages: $SPOPS::Error::system_msg;
 }
 return $R-template( {}, { iter = $message_iterator,
error_msg = $error },
  { name = 'mypkg::message_list' } );
 }

 And in your template:

 --

 h1Summary of messages/h1

 [% IF NOT iter.has_next -%]

 pSorry, no messages to display./p

 [% ELSE -%]

 table border=0
 [% WHILE ( message = iter.get_next ) -%]
tr
  td[% message.subject %]/td
  td[% message.from %]/td
  [% view_url = OI.make_url( base = '/Message/show',
 message_id = message.id ) -%]
  tda href=[% view_url %]View message/a/td
/tr
 [% END -%]
 /table

 [% END -%]

 --

 So in your handler you have the option of ordering the messages as you
 wish, screening certain ones out, etc. And the template can make
 simple display decisions but doesn't do much with the data besides
 display it.

In the my answer to Joshua, I wrote that it was bad example of our usage of
TT.
Templates does not contain tags, besides IF and FOREACH usually.
All database access and any data processing on Perl module side.

 One last thing: I'm not sure how large your application is, but for
 small applications OpenInteract is most likely overkill. The only way
 I'd write something simple (e.g., a guestbook) in OI is if I already
 had an OI system installed and wanted to extend it.

We have about 20-30 sites with content management. All these content editors
has similar
HTML and code blocks.
(www.webzavod.ru/projects/contentum/ - example for future customers)
Our goal
1. Place all these CSS, images files and reusable HTML blocks (= includes or
xml tags) in one directory, which will be Aliased for every site.
2. There is Apache module Apache::Contentum with reusable subs, which also
we call xml tags.
3. For every site we can, if needed, create Apache module - descendant of
Apache::Contentum with specific for this site features.

As you can see it is not 'guestbook' task, and we will extend this system in
future and very important to choose right solution now. All these steps done
in many variants, but I don't like the results :( We want to share our work,
and create open project, but code is not pure, as yours... Learn, learn and
learn as told great Lenin :)

We wrote configs in Data::Dumper format, compiles them, inserts them into
Apache Perl module for every site.
We consider to place these data to one file with representation data now.
Clear TT solutions - too much [% PROCESS %], and it is not so reusable as
XML
I think, we dont know XML so good yet and how to implement well-defined
database driven features in XML, although we made 2 AxKit site
(http://nalog.samara.ru for example), we decided that database driven sites
simpler implement as Perl Module + TT.

About my problem with SPOPS...
I have - Win mysql 3.23.41
and DBI 1.14 (there is not newer version for Active Perl), DBD::MySQL 1.22
If I don't solve this problem by myslf I'll descibe it to
http://www.openinteract.org/support
Thanks...

---
Sergey BeerBong Polyakov
Chief of WebZavod
http://www.webzavod.ru




Re: Problem with Apache::DBI

2001-04-05 Thread BeerBong

I have exactly the same errors in my log.
AutoCommit not specified in connect method, therefore 'on' by default.
Now, specify AutoCommit explicitly and wait for errors.

-
Sergey Polyakov   aka "BeerBong"
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]
- Original Message -
From: "Tim Bunce" [EMAIL PROTECTED]
To: "Alec Smith" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 05, 2001 12:24 PM
Subject: Re: Problem with Apache::DBI


 You would only get that message if AutoCommit was off.
 It should not be off for DBD::mysql (since it doesn't yet support
 the transaction features of newer versions).

 Plus, disconnect doesn't do anything when using Apache::DBI
 (by design).

 Tim.

 On Wed, Apr 04, 2001 at 11:49:17PM -0400, Alec Smith wrote:
  Issuing rollback() for database handle being DESTROY'd without explicit
  disconnect() at /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 139.
 
  Using Apache::DBI 0.88+DBI 1.14+mod_perl 1.25+MySQL 3.23.36 I'm getting
the
  above in my error_log and am not sure why. Any ideas? I do have a
  $db-disconnect; line in my modules.
 
  Just a tad lost,
  Alec





Re: ASP / Apache

2001-03-27 Thread BeerBong

Apache::ASP is much better software than original ASP. More functionality
and freedom.
For me, Apache::ASP was perfect start point for ride from MS technologies to
rich
GNU world (Perl, Apache, Unix). We wrote about 40 projects with Apache::ASP
For big projects we use native Apache Perl modules with Template-Toolkit
now, but for common projects among
embedding scripting techniques Apache::ASP is perfect tool.
-
Sergey Polyakov   aka "BeerBong"
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]
- Original Message -
From: "Joshua Chamas" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: "Mod Perl" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 11:55 PM
Subject: Re: ASP / Apache


 Samuel Lellouche wrote:
 
  I'm planning on porting a website w/ ASP pages, from an IIS server, to
  an Apache Server...
 

 Well the model is similar, but there is no support for VBScript.
 I'd be happy to give a go a writing a VBScript emulation layer
 which could help your port but I'll need a site's source to base
 my work on, will you volunteer yours?

  Does Apache::ASP work well ?
 

 Yes.  It has the original ASP API mostly implemented, as
 well as extra features like:

   More Events http://www.apache-asp.org/events.html
   Custom Tags w/XMLSubs http://www.apache-asp.org/xml.html
   HTML Compression http://www.apache-asp.org/config.html#CompressGzip
   Auto FormFill http://www.apache-asp.org/config.html#FormFill
   Site Errors Emailed http://www.apache-asp.org/config.html#MailErrorsTo
   Cookieless Sessions
http://www.apache-asp.org/config.html#Cookieless%20Sessions

 Its also very fast, you can download a benchmark suite
 I wrote for comparing Apache development environments at:

   http://www.chamas.com/bench/hello.tar.gz

 Note the h2000 benchmarks are more indicative of real world
 performance, as it tries to measure the runtime speed.

  Does Anyone have good experiences whit it ?
 

 Yes, I'm the author so I'm biased.  You might contact
 admins running the sites listed at:

   http://www.apache-asp.org/sites.html

 Skip chamas.com  nodeworks.com as those are my sites.

  Does Apache::ASP interacts with SQLServer or MySql ?
 

 Check out this faq on database support:


http://www.apache-asp.org/faq.html#How%20is%20database%20connectivity%20hand
led%3F

 Also note that DBD::Sybase is probably the way to go to
 get to a MS SQLServer.  They both share a common code
 base, and that driver is reputed to work.  Lots of
 people use DBD::mysql, including myself, and its very
 fast.  Should you got that route DBD::Oracle is
 very robust.

 Best of luck.

 --Josh

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





Re[2]: File::Cache problem

2001-02-07 Thread BeerBong

Hello DeWitt,

Wednesday, February 07, 2001, 6:51:24 PM, you wrote:


DC On Wed, Feb 07, 2001 at 04:02:39PM +0400, BeerBong wrote:

 Cache size after 24 hours of working

 via 'du -s' - 53M
 via 'perl -MFile::Cacje -e"print File::Cache::SIZE('PRTL')"' - 10M

DC That looks like a serious bug.  Can you double check on that?  Where
DC are you running the "du -s"?

maul:/tmp/File::Cache/apache# ls
PRTL  PRTLDev
maul:/tmp/File::Cache/apache# du -s *
27924   PRTL
536 PRTLDev
maul:/tmp/File::Cache/apache# perl -MFile::Cache -e"print File::Cache::SIZE('PRTL')"
4178662
maul:/tmp/File::Cache/apache# perl -MFile::Cache 
-e"File::Cache::REDUCE_SIZE(100,'PRTL')"
maul:/tmp/File::Cache/apache# perl -MFile::Cache -e"print File::Cache:SIZE('PRTL')"
4178662
maul:/tmp/File::Cache/apache# 

DC The SIZE( ) method returns the total size of the objects in the cache,
DC not including the overhead of directories themselves.  As the
DC documentation explains, it isn't a perfect mechanism, but it should be
DC a lot closer than you experienced.

I understand that, but it is not a problem. Why size of cache is not
reduced ? There are not any warnings, just nothing happens.


 What is the best way to limit cache ?
 May be variant when File::Cache::REDUCE_SIZE(10485760) in cron.dayly
 will be better solution ? I this case max_size doesnt need to specify
 in object initialization params...

DC I personally prefer using a cron job to periodically limit the size of
DC the cache.  I don't like using "max_size" because of the overhead
DC involved on every set.  I'd rather just fine tune the number of times
DC a cron script is executed (i.e., once an hour vs. once a day).



 Another kind of problem appears recently.
 
 In logs
 [Wed Feb  7 15:42:57 2001] [error] Couldn't rename 
/tmp/File::Cache/.description.tmp13984 to /tmp/File::Cache/.description at 
/usr/web/inc/WebCache.pm line 15
 [Wed Feb  7 15:44:37 2001] [error] Couldn't rename 
/tmp/File::Cache/apache/PRTL/b/5/a/b5a261aa13cf0ddfd41beb7d64960248.tmp13441 to
 /tmp/File::Cache/apache/PRTL/b/5/a/b5a261aa13cf0ddfd41beb7d64960248 at 
/usr/web/inc/WebCache.pm line 87
 ...propagated at /usr/web/inc/Apache/Portal.pm line 109.
 
 What I can do ?

DC Unfortunately the error message doesn't tell me enough.  If you can,
DC please modify lines 1578 and 1579 of Cache.pm to read as follows:

DCrename ($temp_filename, $filename) or
DC  croak("Couldn't rename $temp_filename to $filename:  $!");


DC The next time it hangs, the error message will have more information.

DC I'll fix that in the next version of File::Cache.

Done...
Wait for errors now.

----
Sergey Polyakov   aka "BeerBong"
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]





File::Cache problem

2001-02-06 Thread BeerBong

Hello modperl,

There is Apache Perl module, which uses File::Cache.
File::Cache object is initialized in every request with params

namespace PRTL
max_size 10485760
expires_in 86400
cache_depth 3

Cache size after 24 hours of working
via 'du -s' - 53M
via 'perl -MFile::Cacje -e"print File::Cache::SIZE('PRTL')"' - 10M
Count of cache nodes is several thousands.

And when cache size is exceeded all mod_perl processes are hanging.
In logs
[Wed Feb  7 08:50:50 2001] [error] Undefined subroutine File::Cache::thaw called at 
/usr/local/lib/site_perl/File/Cache.pm line 601.

What is the best way to limit cache ?
May be variant when File::Cache::REDUCE_SIZE(10485760) in cron.dayly
will be better solution ? I this case max_size doesnt need to specify
in object initialization params...

And another question (I'm use Linux Debian Potato)...
Is there way to define params of the currently performing request
(URI, script, etc) of hanging mod_perl process ? I browsed /proc/[PID of
mod_perl]/, but I think this info is about first request. Am I wrong ?



Sergey Polyakov   aka "BeerBong"
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]





[BUG] Apache 1.3.14 front-end-back-end weirdness.

2000-12-08 Thread BeerBong

Hello!

I tried to migrate to Apache 1.3.14 from 1.3.12 ...
Heh.
After recompiling apache and starting the server with the same config get
400 Bad request on any request to mod_perl back-end server. Static html and
images are returned ok.

Some time was spent for hunting the problem.
Turn on rewriting log with level 9.

RewriteEngine On
RewriteLogLevel 9
RewriteLog /var/apache/simple_d/logs/rewrite.log
RewriteMap ports txt:/usr/local/apache/conf/port_d.map
RewriteRule ^/(.*\.s?asp)$ http://$host:${ports:%{SERVER_PORT}|8081}/$1
[P,L]

Request
/paper/test.asp
translated to
http://www.samara.ru:|8081}/paper/test.asp

It seems that mod_rewrite processes nested back references not correctly.
Just meets first closing brace and consider it as back reference.

I saw mod_rewrite fixes in CHANGES list, but it seems to be a candidate for
new fix.

During this hunting I found another security hole of my config...
http://forum.swarthmore.edu/epigone/modperl/shugrendbax/24191847.NAA4593
[EMAIL PROTECTED]
Proxy hijakers used my site very active, althoug in config was

RewriteRule ^proxy:.* - [F]

Fixed via ProxyRequests off...

--
Sergey Polyakov - chief of WebZavod
http://www.webzavod.ru


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Templates - what choose ?

2000-11-13 Thread BeerBong

Hello all!

For most projects we use Apache::ASP and it is sufficient and cool.
But now we develop regional WEB portal with many features including
publishing several magazines online on site, weather forecasts with
archiving them, forums, chats and many others services. All materials can be
binded with orher by some relations.

I think about implementaion of this project with Perl Apache handlers and
template system. There are HTML::Template, HTML::DynamicTemplate and I saw
others.
I installed HTML::Template 2.0, write mod_perl script anf compare it with
identical Apache::ASP script. Apache::ASP was faster slightly although I
used cache functionality of HTML::Template.

Can you advise simple, high performance Perl module for processing
templates.
What uses monsters kinda www.imdb.com ?

--
Sergey Polyakov - chief of WebZavod
http://www.webzavod.ru




Converting pseudo URI to QueryString

2000-10-12 Thread BeerBong

Hello all!

I learned that most search engines ignores scripts with query string
(Altavista for instance). Correct me if I wrong...
Most of my sites are several Apache::ASP scripts with query_string
parameters... They work with database.
I can convert pseudo URI kinda /band/134/ to /band.asp?id=134 via
mod_rewrite, but I want to configure this at runtime, without restarting
Apache... I want to use Apache::ASP further and get this ability...
Any advices ?

Thanx in advance!
--
Sergey Polyakov - chief of WebZavod
http://www.webzavod.ru




RE: ErrorDocument problem

2000-09-07 Thread BeerBong

Joshua, thanx for answer - I solve this problem already...

I had secured back-end server from direct client access. Only local proxy
requests was accepted. And after this condition I replaced IP address of
server with Real IP address of client. As result, on internal redirect (with
real address already) to ErrorDocument I got 404 File Not Found + additional
Forbidden on ErrorDocument redirect. (I did't see this text, because My
Explorer returns "friendly" response :)))
-
sub My::ProxyRemoteAddr ($)
{
my $r = shift;
return FORBIDDEN unless ($r-connection-remote_ip =~
"ip_address_of_my_server");
if (my ($ip) = $r-header_in('X-Real-IP') =~ /([^,\s]+)$/) {
  $r-connection-remote_ip($ip);
}
return OK;
}
-
I rewrite this sub - and now all is ok!
-
sub My::ProxyRemoteAddr ($)
{
my $r = shift;
return FORBIDDEN if (!($r-connection-remote_ip =~
"ip_address_of_my_server")  $r-prev  $r-prev-status != 404);
if (my ($ip) = $r-header_in('X-Real-IP') =~ /([^,\s]+)$/) {
  $r-connection-remote_ip($ip);
}
return OK;
}
-

 -Original Message-
 From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 07, 2000 2:14 PM
 To: BeerBong
 Cc: ModPerl
 Subject: Re: ErrorDocument problem


 I'm curious to know whether there's anything in your
 error_log if Debug is set to -2 for Apache::ASP, to
 see if Apache::ASP is handling the .asp request
 and not returning the right error code.  It should
 return the 404 just fine though and the ErrorDocument
 should pick it up from there.

 --Joshua

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




 BeerBong wrote:
 
  Hello all!
 
  I have a two apache server model (front-end - simple, back-end - power)
 
  I want return custom page on 404 status.
  .asp, .pl files are passed to back-end via mod_rewrite on
 simple Apache (I'm
  using Apache::ASP).
 
  When I trying to access
  1. /not_existing_file - works cgi script on simple, works fine
  2. /not_existing_file.asp - I get standart not found message,
 generated by
  browser!
  although
  3. /cgi-bin/error.pl - returns normal output generated by power apache.
 
  It seems that ErrorDocument for power Apache doesnt work...
  How I can fix this problem ? :(
 
  Part of httpd.conf
  ---
  IfDefine simple
ScriptAlias /cgi-bin/ /usr/web/cgi-bin/
Location /cgi-bin
  SetHandler cgi-script
/Location
 ErrorDocument 404 /cgi-bin/error.cgi
  /IfDefine
  IfDefine power
Alias /cgi-bin /usr/web/cgi-bin
Location /cgi-bin
  SetHandler perl-script
  PerlHandler Apache::Registry
  Options ExecCGI
  PerlSendHeader On
/Location
ErrorDocument 404 /cgi-bin/error.pl (error.pl is symbolic link to
  error.cgi)
  /IfDefine
  ---
 
  --
  Sergey Polyakov - chief of WebZavod
  http://www.webzavod.ru





ErrorDocument problem

2000-09-06 Thread BeerBong

Hello all!

I have a two apache server model (front-end - simple, back-end - power)

I want return custom page on 404 status.
.asp, .pl files are passed to back-end via mod_rewrite on simple Apache (I'm
using Apache::ASP).

When I trying to access
1. /not_existing_file - works cgi script on simple, works fine
2. /not_existing_file.asp - I get standart not found message, generated by
browser!
although
3. /cgi-bin/error.pl - returns normal output generated by power apache.

It seems that ErrorDocument for power Apache doesnt work...
How I can fix this problem ? :(


Part of httpd.conf
---
IfDefine simple
  ScriptAlias /cgi-bin/ /usr/web/cgi-bin/
  Location /cgi-bin
SetHandler cgi-script
  /Location
   ErrorDocument 404 /cgi-bin/error.cgi
/IfDefine
IfDefine power
  Alias /cgi-bin /usr/web/cgi-bin
  Location /cgi-bin
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
  /Location
  ErrorDocument 404 /cgi-bin/error.pl (error.pl is symbolic link to
error.cgi)
/IfDefine
---



--
Sergey Polyakov - chief of WebZavod
http://www.webzavod.ru




RE: ErrorDocument problem

2000-09-06 Thread BeerBong



 -Original Message-
 From: BeerBong [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 06, 2000 5:37 PM
 To: Nouguier
 Subject: RE: ErrorDocument problem
 
 
 Nope, I tried to copy error.cgi to error.pl - result the same :(
 --
 Sergey Polyakov - chief of WebZavod
 http://www.webzavod.ru
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On 
  Behalf Of Nouguier
  Sent: Wednesday, September 06, 2000 5:28 PM
  To: BeerBong
  Cc: ModPerl
  Subject: Re: ErrorDocument problem
  
  
  BeerBong wrote:
  
   Hello all!
  
   I have a two apache server model (front-end - simple, 
 back-end - power)
  
   I want return custom page on 404 status.
   .asp, .pl files are passed to back-end via mod_rewrite on 
  simple Apache (I'm
   using Apache::ASP).
  
   When I trying to access
   1. /not_existing_file - works cgi script on simple, works fine
   2. /not_existing_file.asp - I get standart not found message, 
  generated by
   browser!
   although
   3. /cgi-bin/error.pl - returns normal output generated by 
 power apache.
  
   It seems that ErrorDocument for power Apache doesnt work...
   How I can fix this problem ? :(
  
   Part of httpd.conf
   ---
   IfDefine simple
 ScriptAlias /cgi-bin/ /usr/web/cgi-bin/
 Location /cgi-bin
   SetHandler cgi-script
 /Location
  ErrorDocument 404 /cgi-bin/error.cgi
   /IfDefine
   IfDefine power
 Alias /cgi-bin /usr/web/cgi-bin
 Location /cgi-bin
   SetHandler perl-script
   PerlHandler Apache::Registry
   Options ExecCGI
   PerlSendHeader On
 /Location
 ErrorDocument 404 /cgi-bin/error.pl (error.pl is symbolic link to
   error.cgi)
   /IfDefine
   ---
  
   --
   Sergey Polyakov - chief of WebZavod
   http://www.webzavod.ru
  
  Hi sergey,
  Perhaps you should add FollowSymLinks to your Options...
  
  
  



[OT] mod_auth_digest bug; Programming modules information needed...

2000-04-27 Thread BeerBong

Hello all!

Today I tried to install mod_auth_digest (Apache 1.3.12).
Installed without any problems, but when I request scripts with parameters
in protected directory -

Bad Request
requested URI /manager/script.asp not equals /manager/script.asp?param_1=23

Or something like this.

I now that mod_auth_digest is experemental module, it is just bug report.

And another question.
I need to place homepages of one user's group on one site, and another group
on another.
mod_userdir does not allow to do this.
I found mod_userpath.c and change it slightly.
Script doesn't work, and I don't know where I can read documentation about
writing modules.
I know that there is www.modperl.com and O'Reilly book (I'm not too reach to
buy this book here - Russia), but may be you can tell me about another
resources ?

#include "httpd.h"
#include "http_config.h"

module userpath_module;

#define DEFAULT_USER_PATH "/usr/local/etc/httpd/htdocs/"


void *create_userpath_config (pool *dummy, server_rec *s)

return (void*)DEFAULT_USER_PATH;
}

char *set_user_path (cmd_parms *cmd, void *dummy, char *arg)
{
void *server_conf = cmd-server-module_config;

ap_set_module_config (server_conf, userpath_module,
   ap_pstrdup (cmd-pool, arg));
return NULL;
}

command_rec userpath_cmds[] = {
{ "UserPath", set_user_path, NULL, RSRC_CONF, TAKE1,
"the directory which contains all user html directories or
'disabled'" },
{ NULL }
};

int translate_userpath (request_rec *r)
{
void *server_conf = r-server-module_config;
char *userpath = (char *)ap_get_module_config(server_conf,
userpath_module)
;
char *name = r-uri;

if (userpath != NULL  strcasecmp(userpath, "disabled") != 0 
name[0] == '/'  name[1] == '~')
{
char *w, *dname;

dname = name + 2;
w = ap_getword(r-pool, dname, '/');

r-filename = ap_pstrcat (r-pool, userpath, "/", w, "/public_html",
dna
me, NULL);

return OK;
}

return DECLINED;
}

module userpath_module = {
   STANDARD_MODULE_STUFF,
   NULL,/* initializer */
   NULL,/* dir config creater */
   NULL,/* dir merger --- default is to override */
   create_userpath_config,  /* server config */
   NULL,/* merge server config */
   userpath_cmds,   /* command table */
   NULL,/* handlers */
   translate_userpath,  /* filename translation */
   NULL,/* check_user_id */
   NULL,/* check auth */
   NULL,/* check access */
   NULL,/* type_checker */
   NULL,/* fixups */
   NULL /* logger */
};


Sergey Polyakov - Chief of WebZavod.
http://www.webzavod.ru




mod_ssl in fronend-backend Apache configuration

2000-01-31 Thread BeerBong

Hello all!

I need encrypted access to some directories on some virtual hosts.

I have lightweight proxy apache server and backend mod_perl server.

mod_ssl is not a light thing, and I need encrypt mod_perl'd script results
only, therefore I think that mod_ssl should be in back-end server. Am I
right ? Does mod_proxy pass ssl encrypted data?

And if I'm right and such configuration is possible and correct, are there
any examples of configuring 2 apache servers
frontend - mod_proxy
backend - mod_perl + mod_ssl
on the net ?
Any advices are welcome.

Thanx in advance.
--
Sergey Polyakov (BeerBong)
Chief of Web Lab (http://www.mustdie.ru/~beerbong)






Advise is needed...

2000-01-25 Thread BeerBong

Hello all!

I need protect directory (/abonents) on server.
User database lies on Radius Server.

I have front-end (apache proxy) + back-end apache servers.
I've heard that authentication process must works on front-end server.
(Other protected directories via Apache core functions resides on front-end
server). I've had a problem when Authentication response from back-end not
passed through front-end Apache proxy server once and just replace
authentication to front-end.

Apache::AuthenRadius - requires mod_perl, therefore I cannot do it on
front-end. May be I fear for nothing and there is solution for
authentication on back-end?

I think, may be Apache::AuthCookie is right solution ?
Authentication process via Authen::Radius place into SI::AuthCookieHandler
for back-end server.

But I got
--
[Tue Jan 25 16:18:46 2000] [crit] [client 195.209.67.7] configuration error:
couldn't check user.  No
 user file?: /abonents/prtctd/index.shtml
--

httpd.conf for back-end
--
LoadModule env_module libexec/mod_env.so
LoadModule config_log_module  libexec/mod_log_config.so
LoadModule mime_modulelibexec/mod_mime.so
LoadModule negotiation_module libexec/mod_negotiation.so
LoadModule status_module  libexec/mod_status.so
LoadModule asis_modulelibexec/mod_asis.so
LoadModule action_module  libexec/mod_actions.so
LoadModule alias_module   libexec/mod_alias.so
LoadModule access_module  libexec/mod_access.so
LoadModule setenvif_modulelibexec/mod_setenvif.so
LoadModule perl_modulelibexec/libperl.so
LoadModule macro_module   libexec/mod_macro.so

ClearModuleList
AddModule mod_charset.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_asis.c
AddModule mod_actions.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_perl.c
AddModule mod_macro.c

PerlRequire /usr/local/apache/power/conf/startup.pl



IfDefine power
   Location /abonents/prtctd
PerlAuthenHandler SI::AuthCookieHandler-authen
PerlAuthzHandler SI::AuthCookieHandler-authz
AuthType Sample
AuthName Abonents
PerlSetVar AbonentsPath /abonents
PerlSetVar AbonentsLoginScript /abonents/index.html
require valid-user
   /Location
/IfDefine
--

startup.pl
--
use strict;

use lib qw(/usr/web/inc);

use Apache::Registry();
use Apache::Status();
use Apache::DBI();
use Apache::SSI();
use Apache::ASP();
use DBD::Oracle();
use SI::AuthCookieHandler;

$ENV{ORACLE_HOME}  = "/usr/local/oracle8";
$ENV{NLS_LANG} = "AMERICAN_AMERICA.CL8MSWIN1251";
$ENV{ORA_NLS}  = "$ENV{ORACLE_HOME}/ocommon/nls/admin/data";

use Apache::Constants qw(:common);

sub My::ProxyRemoteAddr ($)
{
my $r = shift;

# we'll only look at the X-Forwarded-For header if the requests
# comes from our proxy at localhost
return FORBIDDEN unless ($r-connection-remote_ip == "195.128.128.26");

if (my ($ip) = $r-header_in('X-Forwarded-For') =~ /([^,\s]+)$/)
{
   $r-connection-remote_ip($ip);
}

return OK;
}
1;

--
Sergey Polyakov (BeerBong)
Chief of Web Lab (http://www.mustdie.ru/~beerbong)






Re: Apache::ASP - I think bug...

1999-12-09 Thread BeerBong

Btw, I use Apache::ASP 0.17

 Your 2 server configuration has nothing to do with Apache::ASP
 errors.  However, depending on the ProxyPass used at the front
 server, you may end up with varying VirtualHosts handling
 the request on the backend server, so make sure you are connecting
 to the same vhost that the front end accelerator points at.

I'm sure that I'm connecting to the same vhost. I totally have 2 virtual
sites, therefore 2 vhost on simple and 2 vhost on power Apache. Other
virtual site doesn't have scripts with the same names, and therefore will
answer Not Found, if frontend server passes to other backend server.
--
Macro proxy_macro $ip $port
IfDefine simple
RewriteEngine On
RewriteLogLevel 0
RewriteRule ^/((cgi-bin/|perl/|cgi-perl/).*)$ http://$ip:$port/$1
[P,L]
RewriteRule ^/(.*\.(pl|shtml|asp))$   http://$ip:$port/$1
[P,L]

ProxyPassReverse   / http://$ip:$port/
/IfDefine
/Macro

Macro asp_script_macro $host $Debug
IfDefine power
PerlSetVar IncludesDir /usr/web/inc
Files ~ (\.shtml)
   SetHandler perl-script
   PerlHandler Apache::ASP
   PerlSetVar Debug $Debug
   PerlSetVar Global /usr/web/$host/global
   PerlSetVar NoState 1
   PerlSetVar DynamicIncludes 1
/Files
/IfDefine
/Macro

Macro vhost_editor $ip $directory $port1 $port2 $Debug
IfDefine simple
   Listen $ip:$port1
VirtualHost $ip:$port1
/IfDefine
IfDefine power
   Listen $ip:$port2
VirtualHost $ip:$port2
   PerlPostReadRequestHandler My::ProxyRemoteAddr
/IfDefine

   ServerName $directory
   DocumentRoot /usr/web/$directory/data

   Use no_users_macro
   Use asp_script_macro $directory $Debug
   Use proxy_macro $ip $port2
   Use log_macro $directory
   Use auth_macro $directory $directory

IfDefine simple
/VirtualHost
/IfDefine
IfDefine power
/VirtualHost
/IfDefine
/Macro

--


 
   Can't use string ("select level,rubric_id,parent_id") as a SCALAR ref
  while "strict refs" in use at (eval 13) line 14.
  , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1142
 

 You have use strict enabled, so you need to work through this
 error.  use strict error handling needs some work still, and
 dealing with them in Apache::ASP is fairly new business.

Joshua, this output
--
Can't use string ("select level,rubric_id,parent_id") as a SCALAR ref
  while "strict refs" in use at (eval 13) line 14.
--
is sent by another not completed script - rubrics.shtml, when I request
index.shtml! I tried to request 778 port while I'm writing rubrics.shtml


  After some refreshes - I got another output, which is not done by
  index.shtml!

 This sounds like a browser cache problem, make sure you hit
 shift+refresh (Netscape) or control-refresh(IE) to really reload
 a page.

I know what are browser cache problems :) Not it is not browser cache
problem, because after restarting Apache -browser and server works correct
after even 1000 requests, until I request 778 port.

 This could also be a bad mix of Apache::ASP  use strict
 errors.  Can you get me some code that reproduces this behavior?

Yes, I can, but I think it is not a cause of problem, because after restart
Apache
(I leave rubrics.shtml with silly error

my $sth_rubrics = my_prepare("select
level,rubric_id,parent_id,type_id,name,alt_name,priority from
portal.rubrics");
^
 error
must be
my $sth_rubrics = my_prepare(\$dbh,"select
level,rubric_id,parent_id,type_id,name,alt_name,priority from
portal.rubrics");
)
when I request rubrics.shtml I got a error above, but _all_ other scripts
works correct, until I request 778 port, all scripts are mixed, and
index.shtml returns error of rubrics.shtml and rubrics.shtml returns output
of divisions.shtml and etc.
And other (not shtml, driven by Apache::ASP) files returns correct.


 I think that there is some work to do on use strict error
 handling, but when in doubt, try stopping and then starting
 apache.

Stopping and starting solves this problem fine :) But how about other
solution...



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




Apache::ASP - I think bug...

1999-12-08 Thread BeerBong
input type=submit
value=Enter tabindex=3
 22:   /td
 23:  /tr
 24:  tr
 25:   th
 26:Password:
 27:   /td
 28:   td
 29:input type=password name=password tabindex=2
 30:   /td
 31:  /tr
 32: /table
 33:
 34: /form
 35:
 36: ');
 37:
 38:   footer ();
 39:   $Response-End();
 40: }
 41:
 42: if ($Request-Form("login")) {
 43:   my ($newsmaker_id,$password,$super);
 44:
 45:   my $dbh = my_DBInitialize ();
 46:   my $sth_login = my_prepare (\$dbh,"select
portal.newsmakers.newsmaker_id,password,super from
portal.newsmakers,portal.divisions,portal.divisions_newsmakers where login =
? and portal.newsmakers.newsmaker_id =
portal.divisions_newsmakers.newsmaker_id and
portal.divisions_newsmakers.division_id = portal.divisions.division_id");
 47:   $sth_login-bind_param(1,$Request-Form("login"));
 48:   $sth_login-execute();
 49:   $sth_login-bind_columns(\($newsmaker_id,$password,$super));
 50:
 51:   if ($sth_login-fetchrow_arrayref()) {
 52: if ($password ne $Request-Form("password")) {
 53:main_page ("Wrong password!");
 54:  } else {
 55:   $Response-Cookies("login_name", $Request-Form("login"));
 56:   $Response-Cookies("login_name",
"Expires",HTTP::Date::time2str(time+366*86400));
 57:   $Response-Cookies("login", "id", $newsmaker_id);
 58:$Response-Cookies("login", "super", $super) if ($super eq "y");
 59:
 60: $Response-Write('
 61: html
 62: !-- frames --
 63: frameset  rows="60,*"
 64: frame name=Menu src="menu.shtml" scrolling="no" frameborder="0"
 65: frame name=Main src="test.shtml" scrolling="auto" frameborder="0"
 66: /frameset
 67:
 68: /html
 69: ');
 70:
 71:  }
 72:   } else {
 73: main_page ("User not found or you have not any rights!");
 74:   }
 75: } else {
 76:   main_page ();
 77: }
 78:
 79:  ;; }


An error has occured with the Apache::ASP script just run. If you are the
developer working on this script, and cannot work through this problem,
please try researching the it at the Apache::ASP web site, specifically the
FAQ section. Failing that, check out your support options, and if necessary
include this debug output with any query.



After some refreshes - I got another output, which is not done by
index.shtml!
As you can see in debug output 'Last 100 Bytes of Buffered Output' is not
present in 'ASP to Perl Program' !
Because 'Last 100 bytes' - code of another script - divisions.shtml ! And
the same thing happens with all other scripts.
divisions.shtml shows code of rubrics.shtml and etc.

What you can say ?
--
Sergey Polyakov (BeerBong)
Chief of Web Lab (http://www.mustdie.ru/~beerbong)






Re: Content management system

1999-12-01 Thread BeerBong

 Try searching freshmeat (http://freshmeat.net/).

I found Zope there :)


 darren

 BeerBong ([EMAIL PROTECTED]) wrote:
  Hello all!
 
  Are there any freeware content management systems kinda Zope or simpler
on
  Perl ?
  What do you can recommend ?
  Where I can search for its ?
 
  --
  Sergey Polyakov (BeerBong)
  Chief of Web Lab (http://www.mustdie.ru/~beerbong)

 --
 Jesus saves, passes to Moses; shoots, SCORES!




Re: mod_perl-1.21 and apache-1.3.9

1999-11-09 Thread BeerBong

  I don't think it was Apache's DSO support that was broken, I had httpd
working
  just fine with dynamic everything except mod_perl. mod_perl worked
usually but
  seg faulted with one obscure xs package. I think other similar problems
have
  been observed too.
 
  In this case though I think the problem is that he's using the Red Hat
binary
  perl packages, which are known to be bogus. I'm not sure what Red Hat
does to
  their perl but it doesn't work right.
 
 Well, it's all fairly perplexing, because I and at least one other guy
 have had problems with Debian packages of mod_perl-1.21 and
 apache-1.3.9.  Looks like the next release of Debian will offer a static
 apache-mod-perl binary package because of this very problem.

 I'm just saying, mod_perl as a DSO seems a bit more definitively broken
 for some of us than "one obscure xs package"; and it's broken across
 Linux distributions.  Which is not a contradiction to what *you* said.

Hello!
I've Debian slink with 2.2.13 kernel, 2xPentium box, mod_perl 1.21 and
Apache 1.3.9
_ALL_ possible packages compiled as DSO. Apache uses DBD::Oracle,
Apache::DBI, Apache::ASP.
This machine is not a production server yet. But I've tested it hard via
ApacheBench - seems all to be ok.
Can you send scripts which makes SegFaults ?



Re: Embperl virtual log and mod_perl handlers

1999-10-04 Thread BeerBong

 Doesn't looks so good :-(

 BTW which version of mod_perl you are using?

1.21

Embperl 1.1.1 has problems with
 newer mod_perl versions, because of changes in the handling of $ENV inside
 mod_perl. So your problem may result from that,maybe...

 I would suggest to test 1.2b9. It's a really stable version. The only
thing
 that's missing to call it 1.2, is Apache::Session 1.04 on CPAN, but I hope
 Jeff will upload it soon.

I installed it, and no problems while make test, 1.1.1 had them.
But all troubles remain ;(
Huh, I'm going away on business right now, and I can give you login-password
to uncover the problems...
If you need it, reply right now :)