Re: Do all apache childs create persistant mysql connections?

2002-10-18 Thread Victor Tsang
 1) We have no idea why this happens at that particular time. There are
 no crons that run then, and we think have a finite ammount of users
 accessing the system who do not do anything different at the time the
 spike happens. The site is public though, so perhaps spiders could be
 doing this? Any suggestions?


  Try study your access log and see if you find something there.

 
 2) Does Apache create a new mysql connection/process for EVERY child
 apache process that is spawned? I assume some apache processes are
 spawned to handle simple non-database actions such as retrieving a
 graphic or static html file. Because we're using Apache::DBI, does
 this mean that even these little processes are creating a big mysql
 process?

  yes, if you are using Apache::DBI, that's what happen, one presistence
connection for each children.  Since connection to mysql is fairly
'cheap', it might be a good idea to disable Apache::DBI and establish a
connection everytime you need them.

  Or alternatively, try reducing your max apache children setting, that
should ease your overloading problem with mysql.


Good luck.

Tor.



Re: How would you organize custom logging?

2002-10-09 Thread Victor Tsang

Instead of developing something new, how about extending the
combined/common log format?  

That what I'm doing in my place, where we have to store a few extra bits
of info so to make the log more useful for  debugging, I added a little
routine in my startup.pl, to setup a few additional env variable, which
I linked the routine to mod_perl via the PostRequestHandler.  By
adjusting the combinded format to store these env vars, I build the log
format that address my need.

Tor.


Marcin Kasperski wrote:
 
 I am to provide some custom logging in my mod_perl
 application. Omitting some unnecessary details, I need to store some
 information after processing each request, putting this info into some
 central log (be it file or database) common for all apache processes
 and (if possible) common for multiple machines.
 
 I would like to ask for any suggestions/hints/patterns/... but there
 are also some specific qustions:
 
 1) Apache somehow gathers notes from multiple processes into single
 access.log and error.log. Is it possible to reuse this functionality
 somehow for writing my custom information somewhere else? Considering
 such functionality is already present I would not like to reimplement
 logic protecting from simultaneous write from multiple processess...
 
 2) Looking at the name, seems it is LogHandler where custom logging
 should take place. But does it really give real advantage over just
 logging on the end of PerlHandler? If so, how should I pass data
 between handlers - just stick to some perl global variable or use
 pnotes?
 
 3) Are there any tools of 'gather logs from multiple machines to the
 central location' you would recommend?
 
 --
 ( Marcin Kasperski   | Communication takes place between people, documents   )
 ( http://www.mk.w.pl |are secondary. (Booch) )
 ()
 ( Nie gub zgÝÕsze??bÞÐd?¢çä: http://www.mk.w.pl/narzedzia/narzedzia_bugewid)



Memory usage option in Apache::Status

2002-05-14 Thread victor

Hope someone can give me a hand on this, I am having some problem using
the Memory Usage option in the main menu of Apache::Status.  

It always return me a 500 with the following error.

[Tue May 14 08:48:21 2002] [error] Can't call method size on unblessed
reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
94.


This is the config I added to httpd.conf to enable the feature.

Location /perl-status
  SetHandler perl-script
  PerlModule Apache::Status
  PerlModule B::TerseSize
  PerlHandler Apache::Status

  PerlSetVar StatusOptionsAll On
  PerlSetVar StatusTerse On
  PerlSetVar StatusTerseSize On
  PerlSetVar StatusTerseSizeMainSummary On
/Location


Any idea what I have missed?


Tor.



Re: Memory usage option in Apache::Status

2002-05-14 Thread victor

 
 [EMAIL PROTECTED] wrote:
  Hope someone can give me a hand on this, I am having some problem using
  the Memory Usage option in the main menu of Apache::Status.
 
  It always return me a 500 with the following error.
 
  [Tue May 14 08:48:21 2002] [error] Can't call method size on unblessed
  reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
  94.


Thanks for you prompt reply stats.

 
 Do you have B::Size installed?
 
perl -MB::Size -e1
 
 Can you use TerseSize from the command line?
 
perl -MO=TerseSize -e '1'
 

  yes, I have both installed. and here's the return running the command
you gave.


[]$ perl -MB::Size -e1
[]$ perl -MO=TerseSize -e '1'
LISTOP leave 0x818acf0 {36 bytes}
OP enter 0x81c6c90 {24 bytes}

COPnextstate 0x8173900 {24 bytes}
OP null  0x81d6140 {24 bytes} [const - constant item]
-e syntax OK


 Also 5.6.0 is *very* buggy, so upgrading to 5.6.1 is a very good idea.


  Would love to, but it's a production machine, so .. I can't upgrade it
unless something major breaks.  (^_^!)


Tor.



Re: unable to use method type handlers?

2002-05-14 Thread victor

Try per load the class my::class via startup.pl or PerlModule

Tor.


Jeff AA wrote:
 
 Whenever I try to set up a method type handler
 
   PerlHandler my::classes-mymethod
 
 I get the following in the error log:
 
   Undefined subroutine my::classes-mymethod::handler called.
 
 using:
   Apache/1.3.23 (Unix) Debian GNU/Linux
   mod_perl/1.26 mod_ssl/2.8.7 OpenSSL/0.9.6c
 
 any hints would be appreciated



Re: Memory usage option in Apache::Status

2002-05-14 Thread victor


 ok, next trace to the offending code. Put in your startup.pl:
 
 use Carp;
 $SIG{__DIE__} = \Carp::confess;
 
 hopefully nobody redefines $SIG{__DIE__}


ok, this is what I get in the error log 


[Tue May 14 10:38:19 2002] [error] Can't call method size on unblessed
reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
94.
B::AV::size(1, 'B::AV=SCALAR(0xa063444)') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 438
B::TerseSize::PADLIST_size('B::CV=SCALAR(0xa0674a0)',
'B::CV=SCALAR(0xa0674a0)', 'B::CV=SCALAR(0xa0674a0)',
'B::CV=SCALAR(0xa0674a0)') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 190
B::TerseSize::CV_walk('slow', 'B::NULL::size', 'op_size') called
at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 123
B::TerseSize::package_size('B::NULL') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 542
B::TerseSize::apache_package_size('B::HV', 'B::Terse',
'B::SPECIAL', 'B::NULL') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 563
B::TerseSize::status_memory_usage('Apache=SCALAR(0x9e4ae5c)',
'CGI=HASH(0x9e4aa8c)') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Status.pm line 66
Apache::Status::handler('Apache=SCALAR(0x9e4ae5c)') called at
/usr/lib/perl5/5.6.0/Carp.pm line 119
require 0 called at /usr/lib/perl5/5.6.0/Carp.pm line 119


Would love to, but it's a production machine, so .. I can't upgrade it
  unless something major breaks.  (^_^!)
 
 This is a *major* reason for updating :)
 

I will see if I can borrow a testing machine tomorrow to try the
upgrade.

Tor.



Re: Security of a modperl enabled site

2002-03-19 Thread victor

Try this.

http://www.snert.com/Software/mod_throttle/

Tor.

fred wrote:

 Hi,

 I am in front of a security issue. We are running several site using
 modperl. Last days, a hacker used a script to call some script of our sites
 for bad purpose. He needed to be authenticated, but we are only using
 session cookies. Then, once he was loged in, he could retrieve this id and
 use it in his home made script.

 This is not the first time this kind of things happends. We use application
 level security addons to limit the effects. However, I am looking for a tool
 that could Limit user access by number of requests.

 I found on the guide Apache::AccessLimitNum, but I can not find it on the
 cpan, it seems to be discontinuated ...

 I'am sure i am not the only one to have such problems. How are you, guys,
 fighting that?

 Best regards,

 Fred




Help with tuning mod_perl under freebsd

2002-02-20 Thread victor

I'm having some trouble tuning startup.pl under FreeBSD, under linux, I
can easiler figure out how well my startup.pl works by looking at the
value RSS and SHARE in Top, but in freebsd the value SHARE is missing
and I'm unable to find any alternative index that indicate how the
startup.pl benefit each apache children's memory usage.

So, anyone can give me a hand on this?

Many thanks.
Tor.









Re: Apache::DBI

2001-10-02 Thread victor

Are you using redhat 7.1?

Tor.

Markus Linke wrote:

 Hi,

 we have a problem with Apache::DBI ... after activating it in httpd.conf
 the server-start fails when using Apache::DBI.

 The installation of mod_perl and mod_ssl brought up no error messages.

 Perl itself works fine
 Perl DBI works fine
 Appache works fine
 Apache Mod_SSL works fine
 Apache Mod_Perl works fine

 The recompilation of Apache did not bring any better results ...

 Any Ideas?

 Ciao  Thanks,
 Markus

 ---

 Start Apache:
 =

 /usr/local/apache/bin: apachectl restart
 ./apachectl restart: configuration broken, ignoring restart ./apachectl
 restart: (run 'apachectl configtest' for details)

 Apache Configtest:
 ==

 /usr/local/apache/bin: apachectl configtest
 Syntax error on line 1235 of /usr/local/apache/conf/httpd.conf:
 Can't load
 '/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBI/DBI.so' for
 module DBI: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation
 error: file
 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBI/DBI.so:
 symbol main: referenced symbol not found at
 /usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.  at
 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 189 BEGIN
 failed--compilation aborted at
 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 189.
 Compilation failed in require at
 /usr/local/lib/perl5/site_perl/5.6.1/Apache/DBI.pm line 4. BEGIN
 failed--compilation aborted at
 /usr/local/lib/perl5/site_perl/5.6.1/Apache/DBI.pm line 4. Compilation
 failed in require at (eval 3) line 3.

 Configuration File (Line 1229):
 ===

 #
 
 --
 # TradeDB Configuration: 27.09.01
 #
 
 --
 # 27.09.01 First Config
 #
 
 --

 PerlModule Apache::DBI
 PerlModule Apache::Registry
 PerlModule Apache::AuthDBI




Re: [OT] Re: DB_File needs compatible versions

2001-10-02 Thread victor

I have seen this one before, you will have to recompile DB_File.pm.  Maybe
someone can shade some light of why this happen, anyways here's how I fix it.

1) I changed the symlink of db.h under /usr/include (btw, I'm using redhat 7.1)
and point it to db2/db.h
i.e.   lrwxrwxrwx1 root root8 Jul 12 11:05 db.h - db2/db.h

2) untar the source of db_file.pm and modify the config.in file
  - change the value of INCLUDE to /usr/include
  - change the value of LIB to /usr/lib
  - change the value of DBNAME to -db2

3) save and compile, install the source.

-I have choose to use BerkelyDB 2 instead of 3, since I still have some berkely
db file generated with BerkelyDB2.

-I am not completely sure if this will cause any harm to the system (especially
the symlink part), but so far, everything works just fine for me.

Good luck.

Tor.


Robin Berjon wrote:

 On Tuesday 02 October 2001 20:19, [EMAIL PROTECTED] wrote:
  When I go to start apache with my startup.pl file it fails and says
 
  DB_File needs compatible versions of libdb  db.h
  you have db.h version 3.1.17 and libdb version 2.4.14

 Go to http://www.sleepycat.com, grab the latest BerkeleyDB, install it,
 re-install the Perl module DB_File, and try again. It's likely that RH messed
 these up somewhere. Otherwise, check that your includes and library paths are
 in sync (some versions of BerkeleyDB use different paths).

 --
 ___
 Robin Berjon [EMAIL PROTECTED] -- CTO
 k n o w s c a p e : // venture knowledge agency www.knowscape.com
 ---
 Radioactive cats have 18 half-lives.




Re: simple question

2001-06-22 Thread victor

This might help, in you httpd.conf file set this

  PerlSendHeader Off

Tor.

Michael wrote:

 when using mod perl to return plain text to the client how does one
 send without any headers in the response stream??

 $r-send_fd(F)

 works fine for files, but how do you do it for dynamically generated
 content.

 Michael

 [EMAIL PROTECTED]




Apache::Session::Postgres Segmentation Fault

2001-03-29 Thread Victor Michael Blancas

I'm using Apache::Session::Postgres with Apache::ASP.
I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
end of the script.  When I comment out the the $dbh-disconnect however, I
don't get any errors.  Having a script without a $dbh-disconnect at the
end is wrong isn't it.  Anyone encountered this before?

Thanks.

-- 
Mike




Apache::Session::Postgres Segmentation Fault Addendum

2001-03-29 Thread Victor Michael Blancas

I'm using Apache::Session::Postgres with Apache::ASP.
I'm getting a Segmentation Fault whenever I do a $dbh-disconnect at the
end of the script.  When I comment out the the $dbh-disconnect however, I
don't get any errors.  Having a script without a $dbh-disconnect at the
end is wrong isn't it.  Anyone encountered this before?

I just tested it as a simple perl script on the command line. I'm still
getting a core dumped Segmentation Fault whenever I do a disconnect at the
end of the script.




Re: Installing new modules via CPAN?

2001-03-29 Thread Victor Michael Blancas

On Thu, 29 Mar 2001, Bolt Thrower wrote:

 I've got a working mod_perl installation on a Linux 2.2.14 /
 Apache/1.3.17 (Unix) mod_perl/1.25 / perl 5.005_03 machine.  I'm trying
 to install Apache::AuthCookieDBI via my CPAN shell, and I keep getting
 errors of the sort:

 Can't locate object method "module" via package "Apache" at
 /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.

 It seems that something doesn't like the Apache-module() call, which
 wouldn't be available unless it's actually in a mod_perl environment.

 So how am I supposed to install Apache::AuthCookieDBI via the CPAN
 shell?

 Thanks,


`perl -MCPAN -e "install Apache::AuthCookieDBI"`

-- 
Mike




Re: ASP / Apache

2001-03-28 Thread Victor Michael Blancas

I've been using Apache::ASP for our clients for more than a year already.
Check out www.alumni.net, it's one of our biggest clients, all pages are
dynamic, database backend is Oracle via DBI.

I'm planning to implement a DBI session management integrated with
Apache::ASP, much like how Apache::Session works. Is this better for
clustered web servers with a single database server or do I just nfs mount
a shared directory and put the global directory there? Anyone doing this
already or do I just install Apache::Session and use its DBI session
management? Thanks.

On Tue, 27 Mar 2001, Joshua Chamas wrote:

 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 Compressionhttp://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%20handled%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


-- 
Mike




Apache::ASP FileUploadMax

2001-03-19 Thread Victor Michael Blancas

I've set FileUploadMax to 50 but I'm still am able to upload files
bigger.  Do I have to put this directive within a Directory Apache
Directive.

-- 
Mike




LimitRequestBody

2001-03-19 Thread Victor Michael Blancas

The httpd documentation says that the default LimitRequestBody
configuration is 0. However, i'm only able to upload files of size less
than 1.0MB. Any ideas, thanks.

-- 
Mike




Re: Reading email with mod_perl

2001-02-07 Thread Victor Michael Blancas

use the module MIME-tools.

On Wed, 7 Feb 2001, Jason Terry wrote:

 Does anybody have an information on how to read a MIME encoded email attachment with 
mod_perl?


-- 
Mike




Re: Sessions on win 32

2001-02-07 Thread Victor Michael Blancas

have u tried Apache::ASP by Joshua Chamas.  It has a nice Session and
Application state management.

On Wed, 7 Feb 2001, harilaos wrote:

 Hello,
 I have searched everywhere but there is documentation on
 how to implement Apache::Session on windows.
 Has anyone done this? Please point me to relevent
 docs if you know any.
 I have read about Apache::Session::Win32 but the package is
 removed and obsolete from the latest Apache::Session module.

 Thanks


-- 
Mike




Re: Issuing rollback() for database handle being DESTROY'd

2000-12-28 Thread Victor Michael Blancas

 I recently noticed some strange error messages in my error_log. This is
 from animelyrics.com, which uses Apache::ASP and MySQL.

 Issuing rollback() for database handle being DESTROY'd without explicit
 disconnect() at (eval 9) line 22.

 The above line keeps repeating over and over in the error log. There are
 two things that confuse me...

 (1) I never use rollback() anywhere in my code... so I'm wondering if
 something else could cause a rollback.

I get the same problem if I don't explicitly disconnect from the database.
You can ignore this problem if you're just making SELECT queries.  Also if
the MySQL version you're using doesn't use transactions then it
autocommits data by default.  DBI is also autocommit by default.  If
you're annoyed by the error.  put a 'dbh-disconnect' at the end of your
scripts.

 (2) The "(eval 9) line 22" message doesn't tell me what file the error is
 in. The modperl guide suggested adding the following lines to my perl
 startup file so that the messages would show the correct file:

 use Carp ();
 local $SIG{__WARN__} = \Carp::cluck;

 ...but they don't seem to have any effect after I added them and did an
 "apachectl restart".

 -Philip Mak ([EMAIL PROTECTED])

 .
  Mak ([EMAIL PROTECTED])

 .


-- 
Mike




Re: Problem with single quote ' character

2000-11-15 Thread Victor Michael D. Blancas

  Hi Rodney, thanks very much for your reply. I'm trying it now, but I'm doing
  something wrong. Here's what I have, could you take a look at it?
  
  #parse query string and enter into database if query string exists
  
  my $authors = $query{'authors'};
  my $title = $query{'title'};
  my $year = $query{'year'};
  my $source = $query{'source'};
  my $topic = $query{'topic'};
  my $purpose = $query{'purpose'};
  my $sample = $query{'sample'};
  my $gmc = $query{'gmc'};
  my $process = $query{'process'};
  my $outcome = $query{'outcome'};
  my $rater = $query{'rater'};
  my $results = $query{'results'};
  my $refs = $query{'refs'};
  my $notes = $query{'notes'};
  my $therapy = $query{'therapy'};
  my $analysis = $query{'analysis'};
  my $critique = $query{'critique'};
  my $getcopy = $query{'getcopy'};
  my $id = $query{'id'};
  
  
  #make sure all single quotes are escaped
  
  $q_authors = $dbh-quote($authors);
  $q_title = $dbh-quote($title);
  $q_year = $dbh-quote($year);
  $q_source = $dbh-quote($source);
  $q_topic = $dbh-quote($topic);
  $q_purpose = $dbh-quote($purpose);
  $q_sample = $dbh-quote($sample);
  $q_gmc = $dbh-quote($gmc);
  $q_process = $dbh-quote($process);
  $q_outcome = $dbh-quote($outcome);
  $q_rater = $dbh-quote($rater);
  $q_results = $dbh-quote($results);
  $q_refs = $dbh-quote($refs);
  $q_notes = $dbh-quote($notes);
  $q_therapy = $dbh-quote($therapy);
  $q_analysis = $dbh-quote($analysis);
  $q_critique = $dbh-quote($critique);
  $q_getcopy = $dbh-quote($getcopy);
  
  
  #update entry form into the database
  
  $sth = $dbh-prepare( "UPDATE tbl_sarah SET authors = '$authors', title =
  '$title', year = '$year', source = '$source', topic = '$topic', purpose =
  '$purpose', sample = '$sample', gmc = '$gmc', process = '$process', outcome
  = '$outcome', rater = '$rater', results = '$results', refs = '$refs', notes
  = '$notes', therapy = '$therapy', analysis = '$analysis', critique =
  '$critique', getcopy = '$getcopy' WHERE id = '$id'" );  
  $sth-execute();
  
  --I've put single quotes and also tried no quotes around the variables in
  the SQL statement; neither worked.
  
The solution is simple, put the bind variables in the '$sth-execute'
and it will automagically be quoted like so:

$sth = $dbh-prepapre("UPDATE tbl_sarah SET authors = ?, title = ? WHERE
id = ?");
$sth-execute($authors, $title, $id);

use one variable per placeholder '?'. no need to use single quotes in the
SQL statement. for more info read the DBI documentation.

you wouldn't need all those '$q_var = $dbh-quote($var)' lines in the top
too.

  Thanks again,
  Omri

Mike




need AuthName error

2000-11-08 Thread Victor Michael Blancas

Has anybody experienced something like this in their error log

[(date)] [error] [client (client's ip)] need AuthName: (filename)

But the pages are served without errors.

Using mod_perl 1.24_01 on Apache 1.3.14
Apache::ASP
-- 
Mike




RE: need AuthName error

2000-11-08 Thread Victor Michael Blancas

 Yep. Same "problem" here. I've been tearing my hair out trying to figure
 where that error message is coming from
 
 No problems with Apache/1.3.12 and nod_perl/1.23
 
the problem only appears for files handled by Apache::ASP.


-- 
Mike




Re: How can I tell if Apache::ASP is available?

2000-09-13 Thread Victor Michael D. Blancas

 This is the output of my httpd -l command .. how can I tell if Apache::ASP
 is available?

you can't from http -l. Apache::ASP is not an apache module but a perl
module.  try 'perldoc Apache::ASP' if you see the documentation then
Apache::ASP was properly installed.

another thing, you will not be able to run microsoft asp implementation on
Apache::ASP.  as of the moment it just gives an easy way of embedding perl
code directly into html so that you can still use your favorite html
editor without it mangling your perl code.

if your purpose in installing Apache::ASP is to run real microsoft asp
pages, then your going the wrong direction.  only NT/2000 with IIS will be
able to serve asp pages.

 
 
 [admin admin]$ httpd -l
 bash: httpd: command not found
 [admin admin]$ /usr/sbin/httpd -l
 Compiled-in modules:
   http_core.c
   mod_so.c
   mod_perl.c
 suexec: disabled; invalid wrapper /usr/sbin/suexec
 [admin admin]$
 
 

Mike




Re: Does anyone know of a Hello World program for mod_perl andApache::ASP

2000-09-13 Thread Victor Michael D. Blancas

On Wed, 13 Sep 2000, Jason wrote:

 I need a simple script that will test to see if these are working on my
 server.
 
 
 

Visit the Apache::ASP homepage, there are a lot of examples there
including the httpd.conf modification you may need.




Is there any support for `convert` utility

2000-07-26 Thread Victor Eryomenko

Is there any support for `convert` utility (i.e. function) in Perl? If
 no how can I perform system call of `covert` from inside mod_perl?

Victor Eryomenko
 http://Ricardo.ch
 mailto:[EMAIL PROTECTED]





Apache::ASP Question

2000-07-24 Thread Victor

I am trying to figure out what Apache::ASP is and how well it works. Can
anyone point me to information on the following points or provide me
with answers to the following?

1. How compatible is Apache::ASP with ASP?
2. How well does Apache::ASP perform?
3. Can Apache::ASP use COM?
4. What platforms does Apache::ASP run on?

I also wanted a clarification of ASP. As I understand it, ASP is M$'s
version of VB that runs in a way similar to how php does? Is ASP a
language or ... ? Does Apache::ASP support the vb syntax ?

Thanks for any input.
Victor




Re: Apache::ASP Question

2000-07-24 Thread Victor

So to move a page written in VB to unix, I'd need something like ChilliSoft
?

Vivek Khera wrote:

  "V" == Victor  [EMAIL PROTECTED] writes:

 V I also wanted a clarification of ASP. As I understand it, ASP is M$'s
 V version of VB that runs in a way similar to how php does? Is ASP a
 V language or ... ? Does Apache::ASP support the vb syntax ?

 No, ASP on M$ is _usually_ written in VB.  It is not a language, but a
 framework; You can write ASP pages in any language.  Apache::ASP lets
 you do it in Perl.




Re: Newbie Question

2000-02-01 Thread Victor Zamouline

Hi Ian,

 We run an NT Server using Apache Web Server and I want to run Perl scripts
 on our web site to handle our administration forms.

To get full advantage out of mod_perl, it is more interesting to use it on
UNIX machines. But, in this community, we will encourage you to use mod_perl
even if you are determined to use NT.

 I loaded the Activeperl software onto the server

With the ActivePerl distribution, you can run Perl scripts in plain CGI
mode, but you cannot use mod_perl.

 but then
 the service won't restart.

You should provide a complete technical description of your problem.

 I read a lot about the MOD-PERL but very little
 about what it is and how it works, is this my problem?

Yes. You should start by reading http://perl.apache.org/guide. Take your
time to read this document carefully.

 Is anyone willing to tell me in SIMPLE terms what i have to do to get
this
 thing working?

You should understand that mod_perl is a bridge between Perl and Apache,
which, apart from its technical excellence, allows Perl programmers to use
their Perl culture while configuring and programming their Web applications
not only at the application level (the script itself) but also at the system
level (the server, i.e. Apache).

Whether you use mod_perl or not, programming a Web application requires
understanding how the Web works and how http servers work. Reading
http://perl.apache.org/guide will attract your attention to mod_perl's major
ambitions.

Try to define what your application's ambition first of all, then look for
corresponding guidelines in that document.

Victor.



Re: runaway httpd processes

2000-02-01 Thread Victor Zamouline

 There are a large number of happy, silent Apache::Session users.

Yes, I am a silent and happy Apache::Session user. You're right Jeffrey,
happy users should not be silent.

So I confirm that my site www.jazzvalley.com, still a start-up but already
serving about 5,000 dynamic requests per day, uses Apache::Session to get
behind-the-cookie data on **every single request** landing on my site.

Million thanks for having made it possible.

Victor.





Name / brand overview version 2

1999-12-05 Thread Victor Zamouline

=
1. Known propositions for the name/symbol of Mod_Perl
=

1.1. Animals (independent symbols)
--

1.1.1. Eagle, proposed by Ged Haywood. Copyrighted by O'Reilly, but it looks
like this problem can be solved.
1.1.2. Hedgehog, proposed by Stas Bekman.
1.1.3. Oyster, proposed by Randy Harmon.
1.1.4. Elephant, proposed by Jay J.

1.2. Weird things / mixtures (the idea of a bridge)
---

1.2.1. Mythical beast with the head of an eagle and the body of a camel,
proposed by Rod Butcher.
1.2.2. Weird animal with recognizable features of the camel head and the
eagle, and feathers painted like the Apache feather, proposed by Bill
Desjardins.
1.2.3. Eagle with a single red-blue-yellow feather in its wing, proposed by
Salve Nilsen.
1.2.4. GRAY eagle with a COLOR feather, precision proposed by James Smith.
1.2.5. Camel with wings, proposed by Ken Williams.

1.3. Other ideas
---

1.3.1. Meld Pro, anagram proposed by Robin Berjon.
1.3.2. Red brick base of a building, with mod_perl inscribed on a brass
plaque, proposed by John Burns.

==
2. Known graphic resources
==

2.1. Various eagles and other birds, depository maintained by Victor
Zamouline.
http://www.jazzvalley.com/modperl/symbols/index.html

Selected by Stas out of the above:
http://www.jazzvalley.com/images/modperl/animals/birds/gif/hawk7.gif
http://www.jazzvalley.com/images/modperl/animals/birds/gif/baldegl1.gif
http://www.jazzvalley.com/images/modperl/animals/birds/gif/baldegl3.gif

2.2. Watermarks/sketches around the "Eagle" and "powered by" ideas, proposed
by Salve Nilsen.
http://sjn.nvg.org/mod_perl/watermark

2.3. Elephant resources, referred to by Ken Williams.
http://www.reno.quik.com/snow/elephant.html
http://www.lazoo.org/elephants/elephant_facts.html
http://www.lazoo.org/elephants/ELEPHANT.GIF


3. Pros and cons


3.1. Should the name change?


3.1.1.

Perhaps, just maybe, it should be Doug's decision whether mod_perl needs a
name change?
(Jason Bodnar)

3.1.2.

Personally, I think the name mod_perl should be kept, and mod_perl hackers
should start referring to themselves as "The Mod Squad". A logo could be
created based on the shape of Linc's hair from the Mod Squad TV series.
(David Emery)

3.1.3.

Keep the name! Why in the world should we throw away an established brand
name? mod_perl is recognizable, it tells something about what it is about,
and isn't too "flashy". If we need to say something about the abilities,
then let's do that with a logo and perhaps some catchphrase...
(Salve Nilsen)

3.2. Bridge or independent product?
---

3.2.1.

This talk is about a commercial success. The
/perl.apache.org/logos/mod_perl.gif logo represents a bridge between two
products (makes one think of a gadget!), not really a product. I remember my
first interest to Java associated with the coffee cup, or my first interest
to Perl associated with the camel, or even Apache's feather.
(Victor Zamouline)

3.2.2.

In the case of an
"independent product", I think that Mod_Perl should have its own isolated
symbol. What if some webmasters will also want to include their tribute to
Perl and Apache on their pages? Then, the three logos aligned together make
a perfect family.
(Victor Zamouline)

3.2.3.

But that is what it is. A very cool bridge indeed, but a bridge.
(Ask Bjoern Hansen)


3.3. Symbols


3.3.1.

I was thinking about hedgehog as one that
protected from everything, exactly like mod_perl...
(Stas Bekman)

3.3.2.

I suggest we keep the camel.
Maybe give him lots of muscle with the apache feather
in there somewhere.
(Baiju Thakkar)

3.3.3.

What about the red brick base of a building, with mod_perl inscribed on
a brass plaque?
Suggestions of sturdiness, of foundation, and "for-all-seasons" come to
mind.
Since the logo might show the intersection of building and ground, one
version could have tufts of grass, the other snow. It could adapted, much in
the
way the Linux penguin is adapted and co-opted banners and such.
(John Burns)

3.3.4.

The Eagle idea sounds really strong and symbolic behind ModPerl, and the
graphical image of it would be highly customizable, portable, simple and
color-independent.
(Victor Zamouline)

3.3.5.

"The association between the image of a white-tailed eagle and the
topic of Apache modules is a trademark of O'Reilly  Associates."
(Jim Winstead)

3.3.6.

How about an oyster?  Perhaps not as american-patriotic but just think how
sexy it sounds.
(Randy Harmon)

3.3.7.

The O'Reilly Eagle is a Tawny Eagle.
Thar be golden, spotted, bald, imperial, harpy ... well, plenty to go
around.
(Michael Dearma

Re: Logo / brand

1999-12-04 Thread Victor Zamouline

Eagle on top of camel and the Apache feather somewhere in a middle...
probably too complicated for a small scaled logo...


I am afraid, yes. We have not yet reached any opinion on whether the logo
should represent a "bridge" or an "independent product". In the case of an
"independent product", I think that Mod_Perl should have its own isolated
symbol. What if some webmasters will also want to include their tribute to
Perl and Apache on their pages? Then, the three logos aligned together make
a perfect family.

Vic.



Re: mod_perl Programmers demand is going up...

1999-12-04 Thread Victor Zamouline



Gunther Birznieks wrote:

 You don't have to be top 15th percentile VB or top 15th percentile Java to
 write ASPs or Servlets respectively. Although for servlets, I would say
 top 50th at least if you don't want a completely crappy OO servlet
 architecture.

I have organized a series of personnel trainings in a number of huge
French companies, and I have been constantly trying to spread the
mod_perl word and look at people's reaction.

If I talk about mod_perl on Monday:

A young computer genius (you know the kind of guy who will build his own
company when he is 25) will return to the training on Tuesday with the
Eagle book in his hands.

A well-placed VB script programmer just won't care. He will get very
nervous when I pronounce "Unix".

A convinced Java programmer will desperately seek for equivalent
functions for Enterprise Java Beans, CORBA, RMI, etc, then he will just
shrug his shoulders.

A decision maker will sleep until I say "performance". He will
completely wake up when I bring up statistics from Stas' guide. Then he
will ask me if I am willing to come back next week to give a profound
training on mod_perl, and then he will never call me back.

As I understand the companies' philosophy, mod-perl's advantages that we
bring up here are actually DRAWBACKS for them, as compared to VB Script.
They used to find immediate solutions for an immediate contract. When I
ask a question to a Perl or Java developer, most of the time he can
explain me the whole theory behind it. On the contrary, a VB developer
always answers "I don't know, I have always done this way and it works".

So, a company hiring VB developers knows that these are humble and
obedient guys who will make the application work, even if an extra
semicolon will ruin the whole program. And that is perfectly OK with
such companies because they sell the product and the MAINTENANCE behind
it (they call it "maintenance", but it actually means re-writing the
whole program when the client only needs an extra semicolon).

But a good Perl programmer is more often uncontrollable, he writes a
perfect program, but no one else understands it, and if he quits the
company tomorrow they won't find anyone else to do the "maintenance".

So when I spread the mod_perl word, I make sure I don't make my client
hire another bunch of VB programmers after what I told them about
mod_perl during the training. :)))

I also tried to take individual VB/PowerBuilder/etc. guys and teach Perl
to them. Well, I can make them understand the technical side but not the
BEAUTY of Perl. Maybe I am not a perfect trainer, but after such
trainings I see these guys LITERALLY TRANSLATE their programs from VB to
Perl.

Just to make a resume, I am afraid Mod_Perl will remain an
elite-oriented product. That is not really embarassing, because the
education guidelines change too, and more and more guys switch to the
elite layer, bringing up their own projects. So if this talk is about
spreading mod_perl to the whole Internet programming community, wouldn't
it be better to say, making mod_perl THE CHOICE of the BEST Internet
projects? 

Vic.



Re: Happy Birthday mod_perl Guide

1999-12-03 Thread Victor Zamouline

according to the mailing list archives, the Guide was first announced on
03/12/1998 so it makes a year now ! Many kudos to Stas and to all that have
participated (the list is *long*), as well as many thanks.


LOTS OF THANKS to Stas and to all contributors!!! I still carry the full
printed version of the Guide with me wherever I go.

Vic.



Re: mod_perl Programmers demand is going up...

1999-12-03 Thread Victor Zamouline

Now the question is: if this is truth and you feel the same way, how do we
make the world know that there is a great demand for mod_perl programmers
and that people should learn mod_perl and not the stright-forward choice
like VB, ASP or other technology that drives the web?


Great sites using mod_perl may want to explicitely state being proud of it,
with a kind of mod_perl logo. I will willingly decorate my mod_perl'ed site
(www.jazzvalley.com) with a mod_perl stamp on every page.

That takes a strong logo and... possibly a more artistic name for mod_perl?

Vic.



Re: mod_perl Programmers demand is going up...

1999-12-03 Thread Victor Zamouline


-Message d'origine-
De : Robin Berjon [EMAIL PROTECTED]


There are a few logos on the site, and we can add some more (I don't know
if we would manage to agree on one, though it'd give a stronger sense of
"brand").

Right. This talk is about a commercial success. The
/perl.apache.org/logos/mod_perl.gif logo represents a bridge between two
products (makes one think of a gadget!), not really a product. I remember my
first interest to Java associated with the coffee cup, or my first interest
to Perl associated with the camel, or even Apache's feather.

The problem I see with
changing the name is that there is already stuff out there that carries the
name.

Well, there have been precedents in history when a product found a new name
the day it wanted to tell the world about its existence. Look at how many
names java had gone through.

Also, looks like most software products now tend to take an existing notion
from life, use the word for the name and the image for the logo... sort of
marketing. :)))

Vic.




Re: mod_perl Programmers demand is going up...

1999-12-03 Thread Victor Zamouline

Maybe what we need is some open enrollment courses

I can organize that in France, I am in direct communication with all French
computer training companies.

Vic.




Re: mod_perl Programmers demand is going up...

1999-12-03 Thread Victor Zamouline

To my opinion, out of the responses to a definition of a "mod_perl
experience", two are worth emphasizing:

1. Perl programming style with mod_perl techniques in mind
2. Abstraction from standard CGI constraints and high stakes on mod_perl's
features unavailable in vanilla CGI

There should be a definition, right? :)))

Vic.



Logo / brand

1999-12-03 Thread Victor Zamouline

Talking about "let's do something" topics on the mod_perl list is a waste
of time, unfortunately... The motto of this list regarding new things is
"think it, implement it and give it"...


This is somewhat too straightforward, Stas. Look - I only suggested there
should be another name and another logo, and we have already had the "Eagle"
proposition from Ged, and the watermarks samples at
http://b179a.studby.ntnu.no/mod_perl/watermark/ from Salve.

The Eagle idea sounds really strong and symbolic behind ModPerl, and the
graphical image of it would be highly customizable, portable, simple and
color-independent. Many sites will thus accept to host the logo on the front
page, and many books will reveal a mystery behind an appealing eagle image.

I sat down and looked at Salve's  "Powered by mod_perl" watermarks for some
time, trying to imagine "Powered by Eagle"... What about "Eagle Perl"?
"Powered by Eagle Perl"?

Vic.



Re: Logo / brand

1999-12-03 Thread Victor Zamouline

"The association between the image of a white-tailed eagle and the
topic of Apache modules is a trademark of O'Reilly  Associates."


So it is either a question of getting O'Reilly's authorization, or
abandonning the eagle idea. Stats proposed a hedgehog. John Burns proposed a
red brick base of a building.

Vic.



Re: Logo / brand

1999-12-03 Thread Victor Zamouline

"The association between the image of a white-tailed eagle and the
topic of Apache modules is a trademark of O'Reilly  Associates."


The association between Camel and Perl is also O'Reilly's trademark, yet we
see a camel on www.perl.com, right?

Vic.



Re: Perl Domination in CGI Programming

1999-11-03 Thread Victor Zamouline

 
 * Most CGI apps do text processing, where perl excels at
 
 Well, if the trend continues we ought to learn Java some day :)
 

Java is magnificent, but VERY BURDENSOME when it comes to doing any kind
of text processing or designing tricky structures. There are plenty of
packages and tools written for Java that make it POSSIBLE to do it all,
but it is still very AWKWARD to code, as the language is the same.

Java is good for very technical applications, not good at all when you
want to relax and program to have fun.

I don't really think it will become a competitor for clever and
ambitious projects.

Victor.



Re: W32 + Apache::DBI ?

1999-10-26 Thread Victor Zamouline

 I have been digging around in the FAQ and archives for information about
 people running mod_perl on a windows box and also using Apache::DBI, but
 have come up with nothing.  I am under the impression that it is not
 going to work becase whenever I try to load up the Apache::DBI module
 apache starts up and then exists immediately leaving this in the error log:
 
 [Mon Oct 25 15:06:11 1999] file .\main\http_main.c, line 5890, assertion
 "start_mutex" failed

I once spent a good deal of time, trying to use Apache::DBI under WinNT.
I had to give up as I did not find any solution, nor someone who would
share a similar experience.

The problem was: whichever way should I call Apache::DBI during Apache
initialisation (whether it should be using PerlModule, or PerlRequire,
or by having Apache::DBI called in any other Perl script run during
Apache initialisation), I would always get the same error:

Can't locate object method "trace_msg" via package "DBI" at
C:\Perl\site\5.00503\lib/DBI.pm line 311.
END failed--cleanup aborted.

On the contrary, Apache::DBI would work perfectly if NOT in Apache
context, but I would probably not need it. :)))

The author of Apache::DBI recommended me to upgrade, but I WAS using all
the latest versions.

I definitely have an impression that there are not enough folks in the
"W32 + Apache::DBI" community, so you just have to rely upon your own
debugging skills.

Victor.



Re: W32 + Apache::DBI ?

1999-10-26 Thread Victor Zamouline

 Anyone having this problem can also fix it by adding this line to the top
 of the END block (around line 311):
   return unless defined DBI::trace_msg; # return unless bootstrap'd ok

If this works, it seems to be the easiest solution.

Thank you Tim.

Victor.



Re: Any help showing examples of database only web site w/mod_perl/my sql

1999-10-26 Thread Victor Zamouline

 I would like to build a 100% DB contained web site.  Meaning all users home
 directories, files etc.. exists within a database.  Any examples or places
 to look would be greatly appreciated.

I am working on a similar project, look at http://www.jazzvalley.com.

I have about 5000 musicians in my database, and each one has his own
homepage, automatically generated but also containing stuff which can be
personalized for each musician.

Same thing for musical scenes, with a completely different
implementation technique (much more personalization).

I am now working on an extension to this system, which will allow each
of the musicians to have a unique URI access, the URI's (non-existent, a
priori) being analysed by translation handlers and automatically
translated into script calls with parameters.

Lincoln and Doug's book contains excellent and very complete
explanations on how translation handlers work, thanks to Eric Cholet who
pointed me to the right direction.

Victor.