Re: Apache::ASP Configuration

2003-04-04 Thread Josh Chamas
Quan Mac wrote:
Hi, I just installed mod_perl and Apache::ASP on my computer and I was 
wondering if you could tell me how to configure my Apache httpd.conf 
file to make ASP pages work. I tried adding in the lines from the 
website for configuration and then I restarted Apache. All I get is the 
html, but none of my ASP is working and Im just trying to get it to 
print out a message. Your help would be greatly appreciated.
Please see:

  http://www.apache-asp.org/install.html#Quick%20Start

For more questions about Apache::ASP, please get on the mailing list
at [EMAIL PROTECTED]
Regards,

Josh

Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checkinghttp://www.nodeworks.com


Re: apache::ASP

2002-11-05 Thread Josh Chamas
[EMAIL PROTECTED] wrote:

Does this include an AddRotator?



On Win32 platforms, whatever COM objects exist there
can be accessed via the $Server-CreateObject API,
but on Unix platforms $Server-CreateObject does not work.

Please post future questions on Apache::ASP to [EMAIL PROTECTED]

Regards,

Josh

Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checkinghttp://www.nodeworks.com




Re: apache::ASP

2002-11-02 Thread Randy Kobes
On Mon, 28 Oct 2002 [EMAIL PROTECTED] wrote:

 Does this include an AddRotator?
 
 john welte

Check out http://www.apache-asp.org/ - that might be answered
there. There's also links there to a mailing list (and archives)  
for Apache::ASP that might help.

-- 
best regards,
randy kobes




Re: apache::ASP

2002-07-28 Thread Ron Savage

At 06:20 AM 28/07/2002 -0700, you wrote:
Hello,
   I have got some problems when I tried to install
Apache server together with mod_perl and Apache::ASP.
After I had located four subfolder to c:/ , which
mean, I have got c:/perl, c:/apache, c:/openssl,
c:/readmes.
When I tried to start apache.exe. There is an error
message showing that it can't load
c:/apache/modules/mod_perl.so.
But I am sure I got all the files I need.
Why is it like that?

Thanks so much for your help.

 From Jeremy.

http://savage.net.au/Perl.html#Configuring_Apache


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com


Cheers
Ron Savage
-- 
Associate Lecturer, School of Information Technology
Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia
Phone: +61-3-9251 7441, Fax: +61-3-9251 7604
Email: [EMAIL PROTECTED] WWW: http://www.deakin.edu.au/~rons/




Re: Apache ASP help not helpful. I'm not alone

2001-11-28 Thread Randy Kobes

On Wed, 28 Nov 2001, alan matthews wrote:

 I've just seen a pile of posts on a Yahoo board full
 of people with ASP problems.

For Win32 ActivePerl users, if the CPAN.pm method of installing
Apache::ASP becomes confused, you may want to try ppm:

C:\ ppm
ppm set repository some_name
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
ppm install Apache-ASP
ppm set save
ppm quit

where the 'set repository ...' command has been broken over
two lines for readability. This should install Apache::ASP
plus all its dependencies that you might not have - if it
doesn't, please let me know what it missed. After that, the
Apache::ASP docs and web site are very good at describing
the configuration and use.

See an earlier post today by Joshua Chamas about a way to disable
flock() on Win98 within Apache::ASP, which will be needed for
MLDBM::Sync.

best regards,
randy kobes




Re: Apache ASP help not helpfull :(

2001-11-28 Thread Joshua Chamas

alan matthews wrote:
 
 I wanted to run a local server but Microsoft PWS
 doesn't run on Win ME. Searching around I came across
 this http://www.ricocheting.com/sever/index.html I
 found it very helpful, albeit a bit out of date.
 
 So, I've installed apache_1.3.22-win32-x86.msi onto
 this Win ME machine as a localhost and it works fine.
 
 I've installed ActivePerl, and it works fine too.
 
 I want to run ASP, so I download Apache-ASP-2.29
 

[[ for Apache::ASP support, get on its mail list by emailing
   [EMAIL PROTECTED] ]]

For a quick start, I'd recommend installing the prebuilt 
win32 mod_perl / apache from:
  
  http://perl.apache.org/distributions.html

This page ends up referring you to:

  ftp://theoryx5.uwinnipeg.ca/pub/other/perl-win32-bin-0.7.exe

It comes fortunately with a working Apache::ASP.  You will 
still need to update the ./perl/lib/Config.pm to point to your
compiler installation if you want to build your own perl 
modules later.

This hint is provided here:
  http://www.apache-asp.org/install.html#Win32%20Instal93dbe80f

As a user going through these woes, it would be helpful if you could
suggest how I could make that part of the install help stand out more,
and content that would be more useful  accurate to you?

What is not in the help is a bug/workaround for WinME / Win9x users
that occurred recently in the 2.25 release of Apache::ASP.  The bug
is that MLDBM::Sync uses flock() which is not implemented on WinME.

The fix is to add this to you httpd.conf, preferrably

Perl
*CORE::GLOBAL::flock = sub { 1 };
/Perl

This fix is not necessary if you do not use $Session
or $Application though, which you can turn off with
the httpd.conf config:

  PerlSetVar NoState 1

 Then as per the instructions I did
 ___
  shell prompt perl -MCPAN -e shell
  ...
  cpan install Bundle::Apache::ASP
 ___
 
 A huge amount of text flowed down the screen which
 ended with
 ___
 Removing previously used
 \.cpan\build\Apache-ASP-2.29\.
 Couldn't find \.cpan\build\Apache-ASP-2.29\. at
 C:/Perl/lib/CPAN.pm line 1972
 ___
 

I will check out the bundle files and see how they can be improved
for the next release.

 I tried to run some of Perl's sample asp pages but
 nothing worked. Clealy the phrase:-
 
 'The easiest way to install Apache::ASP for the first
 time from perl is to fire up the CPAN shell like:'
 
 isn't quite as easy as it claims.
 
 The rest of the information at
 http://www.nodeworks.com/asp/install.html
 is unitelligable to anyone who hasn't worked with
 servers, and all the FAQ's seem to assume your an
 expert, so I'm no better off.
 

Apache::ASP isn't geared towards new users.  It makes a lot of
of assumptions like knowledge of perl, apache,  unix ( perl is
unix paradigm programming often, even on win32 platforms ).
I would like it to make it more user friendly, and I understand
the docs  site can help, so please send me your suggestions.

 So, is there any chance of an Idiot's guide to getting
 this ASP to work?

Not yet!  I have long considered writing a book on Apache::ASP,
which would probably have at least a chapter as the Idiot's guide.
I don't think it would be out in time for your needs though :(

-- Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks Founder   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Apache ASP help not helpful. I'm not alone

2001-11-28 Thread Joshua Chamas

alan matthews wrote:
 
 I've just seen a pile of posts on a Yahoo board full
 of people with ASP problems.
 

If these are Apache::ASP users, they need to get on the 
mail list for it at [EMAIL PROTECTED] ...

If they are using IIS / VBScript or PerlScript ASP, 
then they may be in the right place?

--Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks Founder   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Apache::ASP - using Apache::Session

2001-09-21 Thread Joshua Chamas

Jindo Soul wrote:
 
 Hi!
 
 I recently made a decision to adopt Apache::ASP as the template tool for my site.  
The only thing I'd like to find out is whether or not Apache::ASP works with 
Apache::Session.  I read from an online article 
http://perl.apache.org/features/tmpl-cmp.html that Apache::ASP can be  hookied up to 
Apache::Session.  However, I just could not find the instruction on how this can and 
should be done.  Am I mistaken or have I missed something in the online docs?
 

Note the Apache::ASP mailing list is now at: [EMAIL PROTECTED]
Subscribe by sending an email to [EMAIL PROTECTED]

Integration of Apache::Session is similar to other environments,
except where you put the code.  In Apache::ASP, you can put it
in global.asa Script_OnStart to get run every time, then you
can init the session to look like the ASP $Session.  

The only differences are you don't get the ASP API around $Session, 
like session management with garbage collection/timeouts, events,
or other API calls like Lock(), Abandon(), SessionID().
Also, without using ASP session, you won't get to use
SessionQueryParse cookieless sessions either.

Here is some untested code that you could start with
for using Apache::Session with MySQL:

# in httpd.conf, turn off $Application, $Session
PerlSetVar NoState 1

# in global.asa
use Apache::Session::MySQL; 
sub Script_OnStart { 
  # ... init mysql dbh before 
  my $id = $Request-Cookies(SESSION_ID);
  tie %hash, 'Apache::Session::MySQL', $id, { Handle = $dbh, LockHandle = $dbh }; 
  if($id ne $hash{_session_id}) { 
$Response-Cookies(SESSION_ID, $hash{_session_id}); 
  } 
  $Session = \%hash; 
  $Server-RegisterCleanup(sub { untie (%$Session) }); }
}

--Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks Founder   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Apache::ASP error re: subroutines

2001-05-22 Thread Joshua Chamas

Andrew Koebrick wrote:
 
 Howdy,
 
 I am attempting to move a few subroutines from my Apache::ASP pages into a central 
module, but get the error:
 
 Undefined subroutine Apache::ASP::Demo::date_swap called at (eval 6) line 67. , 
/usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1506

PerlSetVar GlobalPackage is set to Apache::ASP::Demo I bet, and you called
the sub date_swap() which was not defined there.

 
 Is there something funky in the Apache::ASP environment regarding how/where modules 
are handled?  The functions work when in the page, so I dont think there is an 
internal error there.  I am calling the module with a basic use ASK (ASK.pm is the 
module name).  The module has appropriate ownership/rights.
 

If you sub is in ASK.pm, then you can reference it like:

  ASK::date_swap()

or you could define the sub in the global.asa, which takes
on the package name from GlobalPackage, so the sub will be 
in the same package that all your scripts are compiled into.

 I am especially curious why it is looking for dateswap under Apache::Demo::XXX
 

This is the package that your ASP scripts  includes are compiled into.

Also there is a new mailing list for Apache::ASP at [EMAIL PROTECTED],
but I have been slow to update the docs at the ASP web site  README.

--Josh

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



Re: Apache::ASP extra newline in script output start - killing IEpdf recognition

2001-04-27 Thread Philip Mak

On Fri, 27 Apr 2001, Joel W. Reed wrote:

 %@ LANGUAGE=PerlScript %
 %
   do neat perl things
 %

Have you tried this:

@ LANGUAGE=PerlScript %%
do neat perl things
%

-Philip Mak ([EMAIL PROTECTED])




Re: Apache::ASP extra newline in script output start - killing IE pdf recognition

2001-04-27 Thread Joel W. Reed

On Apr 27, [EMAIL PROTECTED] contorted a few electrons to say...
Philip On Fri, 27 Apr 2001, Joel W. Reed wrote:
Philip 
Philip  %@ LANGUAGE=PerlScript %
Philip  %
Philipdo neat perl things
Philip  %
Philip 
Philip Have you tried this:
Philip 
Philip @ LANGUAGE=PerlScript %%
Philip do neat perl things
Philip %

yes i did  it does work, but the problem is the
orig. script on windows works while under Apache::ASP
it does not.

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


Re: Apache::ASP extra newline in script output start - killing IEpdf recognition

2001-04-27 Thread Joshua Chamas

Philip Mak wrote:
 
 On Fri, 27 Apr 2001, Joel W. Reed wrote:
 
  %@ LANGUAGE=PerlScript %
  %
do neat perl things
  %
 
 Have you tried this:
 
 @ LANGUAGE=PerlScript %%
 do neat perl things
 %
 

This is probably your work around for now.  What I'll 
probably do with this is try to optmize the above
construct to the latter format, or even eliminating
the %\s+% during the parse stage.  This will change
the output for constructs like this or 

  % for (1..X) { %
% for (1..Y) { %

To have X less \n\t in the output, but this is likely
a valid optimization that many other embedded scripting
languages seem to offer, witnessed during my Hello World
benchmarks.

--Josh

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



Re: Apache::ASP error

2001-04-18 Thread Joshua Chamas

Rick Glunt wrote:
 
 I have Apache::ASP setup and running.  The sample site works and very simple
 asp pages I created work, however, I have a page that is generating the
 following error in the Apache error log and will not display on my browser:
 
 [error] Undefined subroutine
 Apache::ASP::Compiles::_usr_local_apache_htdocs_www_aspdomain___global_asa:
 :Form called at (eval 24) line 1. -- ,
 /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1506.
 

It looks like there is a function called Form that is being
called that does not exist. Make sure that you are trying to 
execute perl script only, Apache::ASP does not support VBScript.  
Also, if you would like more debug info, set PerlSetVar Debug 2, 
and you will see the script ASP is trying to compile in your browser.

--Josh

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



Re: Apache::ASP and no global.asa

2001-04-18 Thread Joshua Chamas

Rick Glunt wrote:
 
 I am trying to setup Apache::ASP to handle asp pages for one of my virtual
 domains in Apache but I am getting an 'Internal Server Error' on the browser
 and an error in the Apache log files that goes something like
 
 [error] Undefined subroutine
 Apache::ASP::Compiles::_usr_local_apache_htdocs_www_aspdomain___global_asa:
 :Form called at (eval 24) line 1. -- ,
 /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1506.
 

I believe I already answered this question in a prior mail to
the list, but wanted to clarify that Apache::ASP creates an empty
global.asa for you if you don't have one, and it is into this
perl package that all your scripts and includes are compiled
so that they can share perl global values more easily.

So the namespace is a bit misleading.  If you wanted to rename
the global.asa perl package, set the GlobalPackage config.

--Josh

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



Re: Apache::ASP

2001-04-11 Thread alexus

well apache won't start

i wouldn't be writing here if it would work fine..


- Original Message -
From: "Escario Julien" [EMAIL PROTECTED]
To: "alexus" [EMAIL PROTECTED]
Cc: "Joshua Chamas" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 11, 2001 5:37 AM
Subject: Re: Apache::ASP


 Do you really thing this is an error ?
 This depend on your syslog.conf rules but this is only a notice ...
 I have the same message when restarting apache or when rebooting and
nothing
 goes wrong

 alexus wrote:

  I dont run two web servers
 
  all i want is to run fully functional mod_perl so i can run Apache::ASP
on
  my *one* (single) webserver
 
  please advice
 
  - Original Message -
  From: "Joshua Chamas" [EMAIL PROTECTED]
  To: "alexus" [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, April 10, 2001 11:49 AM
  Subject: Re: Apache::ASP
 
   alexus wrote:
   
I don't know what there wrong to setup
   
i have in httpd.conf
following lines:
   
LoadModule perl_modulelibexec/libperl.so
and
AddModule mod_perl.c
   
and whenever I start apache I get this in error_log
   
[Tue Apr 10 00:40:23 2001] [notice] Apache/1.3.19 (Unix)
PHP/4.0.4pl1
mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6 configured -- resuming
normal
operations
   
  
   Recently, someone else posted with this problem where
   they had 2 web servers, the one running modperl was
   running on a high port in a dual httpd / proxypass
   situation.  If this is your case, you need to
   run scripts through that web server, say by going
   to port 2000 or through the /path/ that gets forwarded
   to that other server.
  
   At the end of it all, you know modperl is working
   correctly when things like PerlHandler don't error.
   I have only seen this error because of configuration
   problems or modperl not being installed.
  
   --Josh
  
   _
   Joshua Chamas Chamas Enterprises Inc.
   NodeWorks  free web link monitoring Huntington Beach, CA  USA
   http://www.nodeworks.com1-714-625-4051
  






Re: Apache::ASP

2001-04-10 Thread Joshua Chamas

alexus wrote:
 
 I don't know what there wrong to setup
 
 i have in httpd.conf
 following lines:
 
 LoadModule perl_modulelibexec/libperl.so
 and
 AddModule mod_perl.c
 
 and whenever I start apache I get this in error_log
 
 [Tue Apr 10 00:40:23 2001] [notice] Apache/1.3.19 (Unix) PHP/4.0.4pl1
 mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6 configured -- resuming normal
 operations
 

Recently, someone else posted with this problem where
they had 2 web servers, the one running modperl was
running on a high port in a dual httpd / proxypass
situation.  If this is your case, you need to 
run scripts through that web server, say by going
to port 2000 or through the /path/ that gets forwarded
to that other server.

At the end of it all, you know modperl is working
correctly when things like PerlHandler don't error.
I have only seen this error because of configuration
problems or modperl not being installed.

--Josh

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



Re: Apache::ASP

2001-04-10 Thread alexus

I dont run two web servers

all i want is to run fully functional mod_perl so i can run Apache::ASP on
my *one* (single) webserver

please advice

- Original Message -
From: "Joshua Chamas" [EMAIL PROTECTED]
To: "alexus" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, April 10, 2001 11:49 AM
Subject: Re: Apache::ASP


 alexus wrote:
 
  I don't know what there wrong to setup
 
  i have in httpd.conf
  following lines:
 
  LoadModule perl_modulelibexec/libperl.so
  and
  AddModule mod_perl.c
 
  and whenever I start apache I get this in error_log
 
  [Tue Apr 10 00:40:23 2001] [notice] Apache/1.3.19 (Unix) PHP/4.0.4pl1
  mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6 configured -- resuming normal
  operations
 

 Recently, someone else posted with this problem where
 they had 2 web servers, the one running modperl was
 running on a high port in a dual httpd / proxypass
 situation.  If this is your case, you need to
 run scripts through that web server, say by going
 to port 2000 or through the /path/ that gets forwarded
 to that other server.

 At the end of it all, you know modperl is working
 correctly when things like PerlHandler don't error.
 I have only seen this error because of configuration
 problems or modperl not being installed.

 --Josh

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





Re: Apache::ASP

2001-04-09 Thread Joshua Chamas

alexus wrote:
 
 Files ~ (\.asp)
  SetHandler perl-script
  PerlHandler Apache::ASP
  PerlSetVar Global /tmp
 /Files
 
 I start geting this:
 
 su-2.04# /usr/local/apache/bin/apachectl configtest
 Syntax error on line 1242 of /usr/local/apache/conf/httpd.conf:
 Invalid command 'PerlHandler', perhaps mis-spelled or defined by a module
 not included in the server configuration
 su-2.04#

This is a FAQ, see: http://www.apache-asp.org/faq.html#Installation

Your modperl is not installed or setup correctly.  If this is
a prebuilt distribution, make sure you are starting your apache
such that modperl is activated.

-- Josh

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



Re: Apache::ASP

2001-04-09 Thread alexus

I don't know what there wrong to setup

i have in httpd.conf
following lines:

LoadModule perl_modulelibexec/libperl.so
and
AddModule mod_perl.c

and whenever I start apache I get this in error_log

[Tue Apr 10 00:40:23 2001] [notice] Apache/1.3.19 (Unix) PHP/4.0.4pl1
mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6 configured -- resuming normal
operations

seems like it's installed...

is there something else i should've put in httpd.conf?

- Original Message -
From: "Joshua Chamas" [EMAIL PROTECTED]
To: "alexus" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, April 10, 2001 1:47 AM
Subject: Re: Apache::ASP


 alexus wrote:
 
  Files ~ (\.asp)
   SetHandler perl-script
   PerlHandler Apache::ASP
   PerlSetVar Global /tmp
  /Files
 
  I start geting this:
 
  su-2.04# /usr/local/apache/bin/apachectl configtest
  Syntax error on line 1242 of /usr/local/apache/conf/httpd.conf:
  Invalid command 'PerlHandler', perhaps mis-spelled or defined by a
module
  not included in the server configuration
  su-2.04#

 This is a FAQ, see: http://www.apache-asp.org/faq.html#Installation

 Your modperl is not installed or setup correctly.  If this is
 a prebuilt distribution, make sure you are starting your apache
 such that modperl is activated.

 -- Josh

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





Re: Apache::ASP -- Corruption of statedir files/truncation of methodnames

2001-04-05 Thread Carl Lipo


The statedir is local so it doesnt seem to be an NFS issue. There
definitely seems to be a corruption of the StateDir files: here is a error
that crops up in our error log.

[Thu Apr  5 08:09:07 2001] [notice] child pid 11555 exit signal
Segmentation fault (11)
Use of uninitialized value at /usr/lib/perl5/MLDBM.pm line 161 (#1)

(W) An undefined value was used as if it were already defined.  It was
interpreted as a "" or a 0, but maybe it was a mistake.  To suppress
this warning assign an initial value to your variables.



Unauthorized use, disclosure, or distribution of information within
this message is prohibited.

On Wed, 4 Apr 2001, Joshua Chamas wrote:

 Carl Lipo wrote:
  
  I've just started having problems with asp state files for Apache::ASP
  2.09 becoming corrupted during use. My application will work just fine but
  at somepoint the session asp state files get corrupted and only deleting
  them allows the application to continue working. Oddly, this occurs on two
  different servers so the problem does not appear to be machine specific.
  
  The symptom of the problem is that application errors are returned
  from the asp code execution that look something like this:
  
  Uncaught exception from user code:
  Can't locate object method 'Quer' via package
  quot;Apache::ASP::Request'; at (eval 263) a href=#167l
  ine 167/a. 
INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called
  at /usr/local/lib/site_perl/Apache/
  ASP.pm line 1504
  
 
 Generally problems of this nature, where even perl data seems
 to be corrupted, seem to be from buffer overrun type issues
 that normally result in segfaults.  Looking at your config, 
 I would suspect the culprit to be use of DB_File on your
 StateDir, where /usr/local/etc/infosource/apps/netcfg/state-dir
 may be mounted over NFS.  NFS typically does not support the 
 flock() style locking that Apache::ASP uses to protect DB_File 
 from corruption.  
 
 If you are  must use NFS, don't use DB_File, use the default 
 SDBM_File, which does not corrupt as easily.  If you need to 
 get past the 1000 byte limit, then you might use 
 MLDBM::Sync::SDBM_File which I developed just for this purpose.
 I need to add config support for this still to Apache::ASP though.
 If you can switch to a CIFS/or samba mounted file system, do 
 this, as this supports flock() semantics.
 
 If StateDir is mounted locally, then possibly there is a bug in 
 Apache::ASP StateDB locking, but this is less likely the case
 and we might look at other types of buffer overrun issues that
 might corrupt perl data structures.  If your modperl httpd is compiled
 DSO, compile it static, as I have seen no end of odd errors with
 the DSO config from time to time.  
 
 Also, DBD::Oracle and long values with CLOBs/BLOBs can create 
 another type of buffer overrun, which is supposedly on OCI bug, 
 though you didn't mention use of Oracle this is an odd bug that 
 stung me recently.
 
 If you give up on trying to find this bug, which seems to be 
 related to StateDB corruption, you may create $Application  
 $Session objects with Apache::Session in the global.asa Script_OnStart, 
 which would at least eliminate the StateDB issue.
 
 -- Josh
 
 _
 Joshua Chamas Chamas Enterprises Inc.
 NodeWorks  free web link monitoring Huntington Beach, CA  USA 
 http://www.nodeworks.com1-714-625-4051
 
 






Re: Apache::ASP -- Corruption of statedir files/truncation of methodnames

2001-04-04 Thread Carl Lipo


In addition:  here are the httpd.conf configurations for this application:

FilesMatch "\.(htm|asp)$"
PerlSetVar Global /usr/local/etc/infosource/apps/netcfg/
# PerlSetVar Global .
PerlSetVar GlobalPackage INAP::NEIS
PerlSetVar StateDir /usr/local/etc/infosource/apps/netcfg/state-dir
PerlSetVar CookiePath  /apps/netcfg
SetHandler perl-script
PerlHandler Apache::ASP Apache::SSI
PerlSetVar SessionTimeout 90
#0 production, 2 or 1 for dev
PerlSetVar Debug 0
PerlSetVar StatINCMatch PNAP|NCM
# PerlSetVar StatINC 1
#0 production, text compression
# PerlSetVar DynamicIncludes 0
PerlSetVar Clean 0
PerlSetVar StateDB DB_File
PerlSetVar AllowSessionState 1
PerlSetVar DebugBufferLength 500
PerlSetVar StateCache 0
# PerlSetVar UseStrict 1
PerlSetVar TimeHiRes 1
/FilesMatch


On Wed, 4 Apr 2001, Carl Lipo wrote:

 
 I've just started having problems with asp state files for Apache::ASP
 2.09 becoming corrupted during use. My application will work just fine but
 at somepoint the session asp state files get corrupted and only deleting
 them allows the application to continue working. Oddly, this occurs on two
 different servers so the problem does not appear to be machine specific. 
 
 The symptom of the problem is that application errors are returned
 from the asp code execution that look something like this:
 
 Uncaught exception from user code:
 Can't locate object method 'Quer' via package
 quot;Apache::ASP::Request'; at (eval 263) a href=#167l
 ine 167/a. 
INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called
 at /usr/local/lib/site_perl/Apache/
 ASP.pm line 1504
 
 or
 
 $Response::Appe not defined at /usr/local/lib/site_perl/Apache/ASP.pm a
 href=#3132line 3132/a
 
 Where the object method that cant be located is truncated from the actual
 ASP method (i.e., Query will be truncated to be Quer or $Response::Append
 to log will be tructed at Response::Appe). What appears to be happnening
 is that the namespace is corrupted somehow and the Apache::ASP/mod_perl is
 not mapping the names of methods correctly. 
 
 When we delete the state files, the problem goes away (and then returns at
 some point in the future). Has anyone encountered this problem? Is there a
 bug in the 2.09 code?
 
 This is our environment:
 Linux,  Apache 1.3.19, mod_perl 1.25
 Apache::ASP 2.09
 
 
 Here is the actual error output:
 
 table
 trtd valign=topfont size=-1b Global: /btd valign=topfont size=-1 
/usr/local/etc/infosource/apps/netcfg/
 trtd valign=topfont size=-1b   File: /btd valign=topfont size=-1 
/usr/local/applprod/infosource/apps/netcfg/viewNodes.htm
 trtd valign=topfont size=-1b IP: /btd valign=topfont size=-1 
64.94.117.16
 trtd valign=topfont size=-1b HTTP_*: /btd valign=topfont size=-1 
HTTP_ACCEPT= image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*br
   HTTP_ACCEPT_CHARSET= iso-8859-1,*,utf-8br
   HTTP_ACCEPT_ENCODING= gzipbr
   HTTP_ACCEPT_LANGUAGE= enbr
   HTTP_CONNECTION= Keep-Alivebr
   HTTP_COOKIE= session-id=0eef76d5377c6e62def6333423014869br
   HTTP_HOST= applprod4.sea.internap.combr
   HTTP_REFERER= https://applprod4.sea.internap.com/apps/netcfg/searchNode.htmbr
   HTTP_USER_AGENT= Mozilla/4.75 [en] (X11; U; Linux 2.2.16 i686)
 trtd valign=topfont size=-1b  Query: /btd valign=topfont size=-1 
 trtd valign=topfont size=-1b   Form: /btd valign=topfont size=-1 
search=   Search  br
   searchLocation= br
   searchNodeName= br
   searchNodeStatus= br
   searchNodeType= br
   searchRack= br
   searchSiteCode= seabr
   sessionActive= Active
 /table
 
 tt
 buErrors Output/u/b
 ol
 
 li Uncaught exception from user code:
   Can't locate object method quot;Querquot; via package 
quot;Apache::ASP::Requestquot; at (eval 263) a href=#167line 167/a.
   INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() 
called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504
   eval {...} called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504
   Apache::ASP::Execute('Apache::ASP=HASH(0x8d7d930)') called at 
/usr/local/lib/site_perl/Apache/ASP.pm line 174
   Apache::ASP::handler('Apache=SCALAR(0x8d2b978)') called at /dev/null line 0
   eval {...} called at /dev/null line 0
 , /usr/local/lib/site_perl/Apache/ASP.pm line 1506
 /ol
 
 buDebug Output/u/b
 ol
 
 li Uncaught exception from user code:
   Can't locate object method quot;Querquot; via package 
quot;Apache::ASP::Requestquot; at (eval 263) line 167.
   INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() 
called at /usr/local/lib/site_perl/Apache/ASP.pm line 1504
   eval {...} called at 

Re: Apache::ASP -- Corruption of statedir files/truncation of methodnames

2001-04-04 Thread Joshua Chamas

Carl Lipo wrote:
 
 I've just started having problems with asp state files for Apache::ASP
 2.09 becoming corrupted during use. My application will work just fine but
 at somepoint the session asp state files get corrupted and only deleting
 them allows the application to continue working. Oddly, this occurs on two
 different servers so the problem does not appear to be machine specific.
 
 The symptom of the problem is that application errors are returned
 from the asp code execution that look something like this:
 
 Uncaught exception from user code:
 Can't locate object method 'Quer' via package
 quot;Apache::ASP::Request'; at (eval 263) a href=#167l
 ine 167/a. 
INAP::NEIS::_usr_local_applprod_infosource_apps_netcfg_viewNodes_htmxINL() called
 at /usr/local/lib/site_perl/Apache/
 ASP.pm line 1504
 

Generally problems of this nature, where even perl data seems
to be corrupted, seem to be from buffer overrun type issues
that normally result in segfaults.  Looking at your config, 
I would suspect the culprit to be use of DB_File on your
StateDir, where /usr/local/etc/infosource/apps/netcfg/state-dir
may be mounted over NFS.  NFS typically does not support the 
flock() style locking that Apache::ASP uses to protect DB_File 
from corruption.  

If you are  must use NFS, don't use DB_File, use the default 
SDBM_File, which does not corrupt as easily.  If you need to 
get past the 1000 byte limit, then you might use 
MLDBM::Sync::SDBM_File which I developed just for this purpose.
I need to add config support for this still to Apache::ASP though.
If you can switch to a CIFS/or samba mounted file system, do 
this, as this supports flock() semantics.

If StateDir is mounted locally, then possibly there is a bug in 
Apache::ASP StateDB locking, but this is less likely the case
and we might look at other types of buffer overrun issues that
might corrupt perl data structures.  If your modperl httpd is compiled
DSO, compile it static, as I have seen no end of odd errors with
the DSO config from time to time.  

Also, DBD::Oracle and long values with CLOBs/BLOBs can create 
another type of buffer overrun, which is supposedly on OCI bug, 
though you didn't mention use of Oracle this is an odd bug that 
stung me recently.

If you give up on trying to find this bug, which seems to be 
related to StateDB corruption, you may create $Application  
$Session objects with Apache::Session in the global.asa Script_OnStart, 
which would at least eliminate the StateDB issue.

-- Josh

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



Re: Apache::ASP - Server-CreateObject

2001-03-23 Thread Joshua Chamas

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

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

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

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

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

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

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

-- Josh

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



Re: Apache::ASP FileUploadMax

2001-03-19 Thread Joshua Chamas

Victor Michael Blancas wrote:
 
 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.
 

To see the settings that Apache::ASP picks up, set Debug to 
-1,-2, or -3 for system level debugging, and look at the 
error_log during a file upload.  Apache::ASP uses CGI for 
file uploads, so this code gets run:

 if($asp-{file_upload_max} = $r-dir_config('FileUploadMax')) {
 $CGI::POST_MAX = $r-dir_config('FileUploadMax');
 }

and file_upload_max in in the error log when it prints itself
out is what it is using.

You may be running into some limit that Apache has or even
your browser, I don't know.  I don't think CGI has file upload
limits beyond setting the POST_MAX variable.

I believe Apache has the setting LimitRequestBody which could
be set in your httpd.conf and killing your file uploads.

--Josh

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



Re: Apache::ASP problems

2001-03-14 Thread Joshua Chamas

Leighton Donal Jones wrote:
 
 Hello,
  Would anybody be able to help with this problem? I am using
 Apache, mod_perl and Apache::ASP.When I call an asp file from the browser
 it seems to read the file content as html, eg on a form, in the input area
 it shows the name of the variable, it dosen't recognise the perlScript and
 just prints it as text. You don't know what might be causing this problem
 ? Is this a configuration error.
 

Your Apache::ASP config is likely not being picked up, so 
the ASP script is being rendered as straight HTML.

Make sure you can get the ./site/eg examples that come
with the Apache::ASP distribution working.  Once done
with that, you can likely leverage your configuration 
know-how into real development and production configs.

The examples in particular need to have their .htaccess
activated, see http://www.apache-asp.org/install.html#Quick%20Start

Make sure you also understand what the various config options
do for you once you get ASP working. If you don't need it, 
don't use it!  See:

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

--Josh

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



Re: Apache::ASP Sessions + mod_ssl + ParanoidSessions

2001-03-04 Thread Joshua Chamas

Eric Bellotti wrote:
 
 Is it possible that when "paranoid sessions" are enabled in Apache::ASP
 under mod_ssl, sessions get occasionally dropped?  Not a big deal though. =)
 

Not likely, but if a paranoid sessions security check fails, 
you'll get a "[security] hacker guessed ..." warning in the 
apache error_log, see this bit of code from Apache::ASP:

if(defined($state_ua) and $state_ua ne $asp-{'ua'}) {
$asp-Log("[security] hacker guessed id $id; ".
  "user-agent ($asp-{'ua'}) does not match 
($state_ua); ".
  "destroying session  establishing new session id"
  );
$state-Init();
undef $state;
goto NEW_SESSION_ID;

There might be other reasons for the session-id cookie getting dropped,
especially for IE browsers. ( painful lessons I've learned recently )
These reasons have nothing to do with SSL.

When IE opens a new window, it may create this window in a "new process".
Occasionally a new IE process will not have the same temporary cookies,
as the old process/window.  This is documented somewhere in the MS 
knowledge base with the only work around being to use permanent cookies.

Another real work-around is to make sure your web app does not create
new windows during the course of its execution.  The bug in the knowledge
base FAQ indicates that the real problem is new framesets, so you may
be all right if your new windows don't use framesets.  

I could enable this perm session cookie feature automatically for Apache::ASP, 
with a config like SessionCookiePermanent, and just set to to expire in one 
year or something.  The ASP session will timeout in SessionTimeout minutes
anyway at the server.  But because this radically changes the notion of a 
session,it would have to be a new config, and not a default.

Another reason could be that some IE versions seem to have a 20 cookie limit,
after which some cookies will be dropped.  If your application is setting
too many cookies, then you might get this behavior after the application
is running for a while and sets that many cookies.

I have not yet seen an instance of Netscape dropping cookies, but
I imagine it could if you set a cookie that it too long, as there
is some limit in size to its cookies like 1024 or 4096 bytes
last I heard.

-- Josh

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



Re: Apache::ASP, Response-Flush problems ...

2001-02-28 Thread Joshua Chamas

"Demetrios C. Christopher" wrote:
 
 Hello all,
 due to some issues with long-running scripts and impatient users
 we decided to display some sort of message (either in the window
 or in a popup - better!) that would say "Chill out, don't refresh
 or double-click" etc, etc.  I was trying to take advantage of
 $Response-{Buffer} and $Response-Flush() but apparently it does
 not work.  Clearing and Flushing may work in the "end product"
 which is what you see on your browser but the timing is not correct.
 That is, when I say "$Response-Flush()" I actually want the user

It should work, the code that's relevant in Apache::ASP::Response::Flush(),
but its seems not to be working for me either.  My real problem
here is that I've fixed this before, so I obvi need to create a decent
make test case for this routine.  My humble apologies.

I'll get back to you when I have this fix.

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



Re: Apache::ASP, Response-Flush problems ...

2001-02-28 Thread Joshua Chamas

"Demetrios C. Christopher" wrote:
 
 Hello all,
 due to some issues with long-running scripts and impatient users
 we decided to display some sort of message (either in the window
 or in a popup - better!) that would say "Chill out, don't refresh
 or double-click" etc, etc.  I was trying to take advantage of
 $Response-{Buffer} and $Response-Flush() but apparently it does
 not work.  Clearing and Flushing may work in the "end product"

The old $Response-Flush() functionality will be back in 2.11.  
If you'd like my latest copy, I can send it to you, or you can 
patch up ASP.pm yourself:

*** ASP.pm~ Mon Feb 26 19:40:09 2001
--- ASP.pm  Wed Feb 28 18:43:43 2001
***
*** 3392,3397 
--- 3392,3398 
#unless($self-{r}-connection-aborted) {
# OK to print random ouput for 200's  300's
if(! defined $self-{Status} or ($self-{Status} = 200 and $self-{Status}  
400)) {
+   local $| = 1;
$self-{r}-print($out);
}
#   }

This change in mod_perl behavior really killed me.
Funny little thing, but at least its more perlish. :)

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



Re: apache::ASP errors

2001-02-26 Thread Joshua Chamas

"Brooks M. Roy" wrote:
 
 Hi,
 
 I installed apache::ASP and have a problem when i try a simple asp file.
 
 [Mon Feb 26 01:17:02 2001] [error] Can't locate object method "dir_config"
 via package "Apache" at /usr/local/lib/site_perl/Apache/ASP.pm line 136.
 

The line in the source that creates this error is:
if($r-dir_config('TimeHiRes')) {

The $r object is likely corrupt.  I tend to hear of this when 
people are using DSO mod_perl, and it doesn't work.  Try 
compiling your httpd with modperl and compile statically.  
The build script I use is copied below.  You'll have to 
tweak the numbers for your sources and modules you are 
compiling in. DSO is still marked as *EXPERIMENTAL* 
as far as I know, thought recent versions of modperl tend
to behave better loaded that way.

 Also how can i setup my httpd.conf so when .asp is the file name it will
 automatically parse it, i dont need a .htaccess file or something..
 

Files ~ (\.asp$)
SetHandler perl-script
PerlHandler Apache::ASP
PerlSetVar ParanoidSession 1
PerlSetVar StateDir /tmp/asp
PerlSetVar Global /path/to/global/dir
/Files

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

#!/bin/bash

# SSL
SSL_BASE=/usr/local/openssl
export SSL_BASE
cd mod_ssl-2.7.*
./configure \
--with-apache=../apache_1.3.14


# PERL
cd ../mod_perl-1.2*
cd mod_perl*
perl Makefile.PL \
APACHE_SRC=../apache_1.3.14/src \
NO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1

make
#make test
make install

# APACHE
cd ../apache_1.3.14
#cd apache_1.3.14
./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/perl/libperl.a \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=ssl \
--enable-module=proxy \
--enable-module=so \
--disable-rule=EXPAT

#make certificate
#make clean
make
make install



Re: apache::asp

2001-02-25 Thread Joshua Chamas

"[EMAIL PROTECTED]" wrote:
 
 Hello
 
 I was wondering if the support for asp in apache also includes ODBC access from a 
asp script to a MS Access database or other ODBC source.
 Like it is posible in a MS Web server?
 

Perl database access is handled through the DBI layer,
check out: http://dbi.symbolstone.org/

In general, I don't think you will find much support for
Access on unix, however, if you are using Apache::ASP + mod_perl
on Win32 platform, you may get an ADO object through the 
$Server-CreateObject() API.

Generally, people recommend that you look at MySQL for 
database access if you are looking at moving to Unix.

-- Josh

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



Re: Apache::ASP and Apache::Sandwich

2001-02-24 Thread Joshua Chamas

Joseph Mallett wrote:
 
 If you look at http://www.jmallett.org/asp/env.asp, you will see the ASP
 code that SHOULD appear sandwiched between my rtop and bottom headers, but
 it isn't getting processed. I want to filter the top and bottom sandwiches
 through Apache::ASP, then put them together, and filter out any asp that's
 left. Any ideas how this can be accomplished?
 

You can use the Apache::ASP event model to create your own sandwiches.
Just include the headers and footers...

# in global.asa
sub Script_OnStart { $Response-Include("header.inc"); }
sub Script_OnEnd   { $Response-Include("footer.inc"); }

The header and footer may be in your local directories,
Global directory, or IncludesDir directories.

From the perldoc on Apache::Sandwidch, it seems like you could also:

# in global.asa
sub Script_OnStart { Apache::Sandwidch::insert_parts('HEADER') }
sub Script_OnEnd   { Apache::Sandwidch::insert_parts('FOOTER') }

or in your Apache::ASP script:
## ASP Script
Apache::Sandwidch::insert_parts('HEADER');
  # content here
Apache::Sandwidch::insert_parts('FOOTER');

Just as in perl itself, TIMTOWTDI :)

If you are performance minded, the first method is likely the 
best, as page will be served by only one Apache::ASP request,
where as in the Apache::Sandwich model, you'd have 3 apache
requests per page served.  Apache::ASP includes get compiled
as perl code, so get served very very fast, especially if you
precompile the site with Apache::ASP-Loader()

--Josh

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



Re: [Apache::ASP] Problems with SSI and XSLT

2001-02-23 Thread Joshua Chamas

"S.tygian B.lacksmith S.tudios" wrote:
 
 Hello,
 
 I've been having some troubles with the SSI and XSLT examples in the /eg/
 directory in my Apache::ASP installation: the SSI example works to a point,
 but there's an extra opening comment tag ("!--") that appears at the end of
 the file, after the closing tag for the html element. The XSLT problem is
 worse - it won't work at all. The process seems to loop and finally short
 out.
 

Would you please send me separately the output of the HTML, and the 
source file itself for the ssi example.  I thought I fixed a bug in 
there but perhaps not.  Actually, if you'd like, I'll email you separately
my dev 2.11 release which may fix your SSI problem, as the content length
was being set when it shouldn't be in 2.09 while filtering, and this may
be the issue, especially if viewing in IE I believe.

 Excuse me if I'm missing something obvious here. I'm still a bit green with
 these things. :(

You have done remarkably to get this far!

 
 Any ideas what could be causing the problems? I'm guessing that the odd
 opening comment effect is related to the $Response-End() call in the
 "virtual" include in ssi_filter.ssi, but I'm at a loss as to what could be
 causing the problems with the xslt.xml example.
 

For XML::XSLT, I would recommend sticking with the .24 release from the 
Bundle::XML, or which you can download from the SourceForge site
for it.  Sorry no URL handy.  The issue seems that the new XML::XSLT
module maintainer has harshly deprecated the old API I used, and 
may have broken some things in the process.  I found .32 not to work
on my own Linux box, where .24 still does.

I will need to rewrite the XSLT interface for Apache::ASP for the 
lastest XML::XSLT, and while I'm at it, I think I will be adding
support for XML::Sablotron, for those that need the speed.  I may
also add a caching layer to keep the pace up, as XSLT tends to 
be rather slow.  I had a Tie::Cache RAM cache before, and I'll
likely add a file based cache instead as that is more appropriate
for these kinds of large slow data sets.

--Josh

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



Re: Apache::ASP Undefined symbol Perl_Tstack_sp_ptr

2001-02-22 Thread Joshua Chamas

CioccarelliA wrote:
 
 Hi,
 
 I am trying to get Apache ASP to work but haven't had a lot of luck. I
 have Apache 1.3.17 compiled with mod_ssl, php3 and mod_perl (which is
 as a module). Everyting is working fineexcept ASP pages. I am trying the
 demo ones included but each time I try I get the following in the error
 log.
 
 /usr/libexec/ld-elf.so.1:
 /usr/local/lib/perl5/5.6.0/i386-freebsd-multi/auto/SDBM_File/SDBM_File.so:
 Undefined symbol "Perl_Tstack_sp_ptr"
 

There is something wrong with your perl build.  I would recommend
rebuilding it so that SDBM_File works, which is a standard
module that comes with perl  that Apache::ASP uses.  If you
don't wan't to deal with it, you can comment out instances of:

  use MLDBM;
  use SDBM_File;

in ASP.pm and then set PerlSetVar NoState 1, but you won't get 
$Session or $Application objects.  If you wanted a $Session still,
you could then use Apache::Session to initialize $Session in your 
global.asa Script_OnStart and it would be much the same for you
with $Session available to all your scripts.

To test your perl for SDBM_File working, you can do something like 

  perl -MSDBM_File -e ';'

which will at least test the module for loading.

If you want to rebuild your perl, I'd recommend installing it into
another part of your system, so if your old perl were in /usr/...
then I'd install the new perl in /usr/local/..., this way so you
don't have to deal with one perl overlaying another possibly.

Then you'd have to rebuild mod_perl against your new perl.

-- Josh

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



Re: Apache::ASP Troubles

2001-02-22 Thread Joshua Chamas

"Boeringa, Michael" wrote:
 
 I recently installed and confiugured Linux-Mandrake 7.2 on my machine. I was
 trying to get Apache up and running and found that Mandrake 7.2 runs two
 versions of Apache 1.3.14 - the regular httpd Daemon (p80) and a httpd-perl
 Daemon (p8007) that is set up in httpd.conf to proxy all cgi-scripts to the
 httpd-perl daemon runing on port 8007. My problem is that when I try to add
 the Directory structure or and Files structures to set up the
 Apache::ASP in the httpd.conf file it does not understand the PerlHandler
 directive. I took out the Directory structure and placed it into the

 httpd-perl.conf but when I type the URL of the ASP demos on the web server
 all it does is print the source on the screen. I cannot get the webserver to
 process the ASP. Please help!
 

Try doing what's suggested at http://www.apache-asp.org/install.html#Quick%20Start

Its a matter of telling Apache which files to let Apache::ASP
handle.  The above link suggests you can start with letting
the ./site/eg/.htaccess activate the example files.

-- Josh

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



Re: Apache::ASP, SSL problems ... must be LWP ...

2001-02-16 Thread Demetrios C. Christopher

Hey guys, thanks for nothing ... this is the second reply
to my own email :(

Anyway, I contacted the site with which we were having problems
and they went through their logs only to discover that the only
difference between LWP https calls that were successful and those
that failed was the return code!!!

When I ran the local web script (that contacted the remote https
web server) under https then the request would come back 403.5.
When I ran it under http then it would come back 200.  It appears,
although LWP knows it's doing a https call and it successfully
connects, the SSL cipher it used was not 128-bit or was corrupted.
Now think, why would the mode of the server on which the process
is running bear an effect on the outcome of the connection miles
away?  I'm guessing there's a conflict of interest ... Stronghold
is tapping the SSL library (I can find out which one if people are
interested in helping, ah-hem) and when LWP is trying to form a
128-bit cipher it's getting some junk or errors.  Go figure.

Ok guys, I did most of the investigation work, anyone out there
who has seen this before?  Is Joshua out sick or something ;)

Thanks,
Demetrios

My original message follows, useful now that I also cross-posted
to libwww.  Please note that my problem described above has
temporarily subsided after installing Apache::ASP 2.09 (from 2.03).
Given though that the problem appeared all of the sudden without
any "cause", I am not so sure this is going to fly either.  Perhaps
resetting the server cleared some junk.


Hello all,
I am running A::A 2.03 on a Solaris 2.6 box with Stronghold 2.4.2, whatever.
The truth is I doubt the rest matters ... I am running a pretty cool web app
where fields are collected, validated and then appropriate action is taken,
one of which is to make an HTTP call (LWP) to a third-party site and
exchange
some info, register, blah-blah-blah.

To the point: when I use http for everything, the session variables work
fine
and everything works perfectly, as it's coded to do.  The moment I try to
take everything under https (since some of the information is personal and
of
financial nature) things work intermittently.  I have it down to a script of
what things you can do and what you cannot.  There is no logic behind having
to enter everything the first time around (the script is self-posting,
self-validating) in order to get the proper outcome.  At some point I
started
to dump the Session variables to see what's in them and found data from
_OTHER_ sessions!  Argh!  No, this has nothing to do with perl's closure
issue ... all functions come from .pm's and there is no problem with
function
calls.

I am at wits end ... I just went through all this in the last couple of days
and just bothered to check for a newer version of Apache::ASP.  I will try
to
upgrade soon to see if that does anything but I was hoping someone might
have seen this problem before where SSL session information did not work
as well as it should.

Did I mention this?: under https, calls to some remote server would
intermit.
fail and give back a 403 - Access Forbidden ... what the heck?  This
function
merely took data from the session and passed it as parameters ... what sort
of influence would which port the server was running on have on the HTTP
req.
being made and/or on the remote server's ability to process the
request?!?!?!

Oh well, hope someone out there can help out.  Thanks in advance.

Demetrios




Re: Apache::ASP, Sessions and SSL ...

2001-02-16 Thread Joshua Chamas

"Demetrios C. Christopher" wrote:
 
 Having been trained in the Microsoft Arts, I decided
 upgrading instead of troubleshooting the problem might
 be well worth it ... I upgraded to 2.09 and things are
 working fine now ... if things stop working again I'll
 be paying Joshua a visit! (just kidding, we love you JC).
 
 Still, if anyone can think of why all of the sudden
 adding SSL to the ASP/Sessions equation would make
 things get all screwed up I'd like to hear it.
 

This problem doesn't really make much sense to me.  The
SSL transport layer SHOULD be independent of the mod_perl
layer that Apache::ASP resides in.  I imagine that there
could have been something funny with the browser behavior,
but not to share sessions' data.

Also, I looked at the change log between 2.03  2.09,  didn't
see anything that would indicate a fix to this problem.  I know
there was a lot of work done on the Sessions implementation,
as well as random session-id generation, but I didn't know of
any bugs with what was there before in this regards.

-- Josh

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



Re: Apache::ASP, SSL problems ... must be LWP ...

2001-02-16 Thread Joshua Chamas

"Demetrios C. Christopher" wrote:
 
 Hey guys, thanks for nothing ... this is the second reply
 to my own email :(
 
 Anyway, I contacted the site with which we were having problems
 and they went through their logs only to discover that the only
 difference between LWP https calls that were successful and those
 that failed was the return code!!!
 

Give me your URL that you are contacting, I'll see how it works
with my LWP.  You might try upgrading the Crypt::SSLeay https LWP 
library to the latest should you have an old one.  The latest 
Crypt::SSLeay supports SSLv3 and all that.

 Now think, why would the mode of the server on which the process
 is running bear an effect on the outcome of the connection miles
 away?  I'm guessing there's a conflict of interest ... Stronghold
 is tapping the SSL library (I can find out which one if people are
 interested in helping, ah-hem) and when LWP is trying to form a
 128-bit cipher it's getting some junk or errors.  Go figure.
 

I feel that this problem might be that the stronghold server was
insisting on its 128 bit SSLv3, and LWP might have been going 
for a SSLv2 or SSLv23 with 56bit, thus a funky 403. error, but
only time will tell!  It seems to clean an error to be some king
of corruption.

 Ok guys, I did most of the investigation work, anyone out there
 who has seen this before?  Is Joshua out sick or something ;)
 

Like Ged said...

--Josh

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



Re: Apache::ASP - AS PerlScript compatibility request

2001-02-15 Thread Joshua Chamas

"Joel W. Reed" wrote:
 
 On Feb 15, [EMAIL PROTECTED] contorted a few electrons to say...
 modperl to be more fully compliant with ActiveState's PerlScript
 modperl we need the following methods on Apache::ASP::Collection
 modperl object.
 modperl
 modperl sub Count -- # of keys in $Request-QueryString or $Request-Form
 modperl
 modperl sub Key {
 modperlmy ($self, $keynum) = @_;
 modperl }

I'll be happy to roll this functionality into 2.11 release
for Apache::ASP.  If you'd like an early test version, please
let me know.

-- Josh

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



Re: Apache::ASP, Sessions and SSL ...

2001-02-15 Thread Demetrios C. Christopher

Having been trained in the Microsoft Arts, I decided 
upgrading instead of troubleshooting the problem might
be well worth it ... I upgraded to 2.09 and things are
working fine now ... if things stop working again I'll
be paying Joshua a visit! (just kidding, we love you JC).

Still, if anyone can think of why all of the sudden
adding SSL to the ASP/Sessions equation would make
things get all screwed up I'd like to hear it.

Take care,
Demetrios




Re: Apache::ASP and Undefined subroutine #::handler called.

2001-02-11 Thread Joshua Chamas

Eric Bellotti wrote:
 
 Hello,
 
 I set BufferingOn = 1, Debug was already = 2.
 
 access-log reports a 500,
 
 216.221.202.194 - - [10/Feb/2001:14:47:22 -0500] "GET /categories.asp
 HTTP/1.1" 500 578
 
 error-log reports
 
 [Sat Feb 10 14:52:05 2001] [error] Null filename used at (eval 23) line 2.
 [Sat Feb 10 14:52:05 2001] [error] Undefined subroutine #::handler called.
 

OK, still no clue here, try Debug -2, which is system level debugging,
and can you please provide your script that does this, and the error log 
from a fresh apache stop/start.  Also you might try making sure you 
have the latest Apache::ASP v2.09 and modperl statically compiled into
apache, not DSO, but the latter is a long shot that it might be
related to this.

--Josh



Re: Apache::ASP and Undefined subroutine #::handler called.

2001-02-10 Thread Joshua Chamas

Eric Bellotti wrote:
 
 Hello,
 
 I am having some strange problems with my apache + mod_perl + mod_ssl +
 Apache::ASP.
 I compiled all 3 from the latest sources as explained in the mod_perl
 directory.  After some light brain surgery, I had an httpd with mod_perl
 (EVERYTHING=1) and mod_ssl.  But, funny things happened.
 ...
 [Fri Feb  9 19:11:04 2001] [error] Undefined subroutine #::handler called.
 Now I can live with the error message, after all, this is not mission
 critical.  However, it puts a nasty error dump at the end of the page, see
 http://systemcrash.org/categories.asp

OK, checked out the URL, but couldn't tell from that error there, try 
setting PerlSetVar Debug 2, which is developer debugging, and PerlSetVar BufferingOn 
1, 
so the error is clean, and not mixed with prior HTML output.  If you'd post 
the full error message that you get under those conditions, that'd be great.
I cannot guess what #::handler is coming from quite yet.

--Josh

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



RE: Apache::ASP and Undefined subroutine #::handler called.

2001-02-10 Thread Eric Bellotti


Hello,

I set BufferingOn = 1, Debug was already = 2.

access-log reports a 500,

216.221.202.194 - - [10/Feb/2001:14:47:22 -0500] "GET /categories.asp
HTTP/1.1" 500 578

error-log reports

[Sat Feb 10 14:52:05 2001] [error] Null filename used at (eval 23) line 2.
[Sat Feb 10 14:52:05 2001] [error] Undefined subroutine #::handler called.

And as you can see (at the URL), the error message is no more descriptive
than it was before.  I'm on
openbsd 2.8 GENERIC
apache_1.3.17
mod_perl-1.25
mod_ssl-2.8.0-1.3.17

There's another behavior I ran into with my new httpd that may be related
and might help shed some light; If persistent HTTP connections are enabled,
the client will receive only a part of a document, then on the next refresh,
receive the rest.

Regards,

Eric


-Original Message-
From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 10, 2001 12:26 PM
To: Eric Bellotti
Cc: [EMAIL PROTECTED]
Subject: Re: Apache::ASP and "Undefined subroutine #::handler called."


Eric Bellotti wrote:

 Hello,

 I am having some strange problems with my apache + mod_perl + mod_ssl +
 Apache::ASP.
 I compiled all 3 from the latest sources as explained in the mod_perl
 directory.  After some light brain surgery, I had an httpd with mod_perl
 (EVERYTHING=1) and mod_ssl.  But, funny things happened.
 ...
 [Fri Feb  9 19:11:04 2001] [error] Undefined subroutine
#::handler called.
 Now I can live with the error message, after all, this is not mission
 critical.  However, it puts a nasty error dump at the end of the page, see
 http://systemcrash.org/categories.asp

OK, checked out the URL, but couldn't tell from that error there, try
setting PerlSetVar Debug 2, which is developer debugging, and PerlSetVar
BufferingOn 1,
so the error is clean, and not mixed with prior HTML output.  If you'd post
the full error message that you get under those conditions, that'd be great.
I cannot guess what #::handler is coming from quite yet.

--Josh

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




Re: apache::ASP

2001-02-09 Thread G.W. Haywood

Hi there,

On Fri, 9 Feb 2001, Compagnon, Jean-Charles wrote:

 Hi, I have a cobalt raQ3 and I'd like to implement the apache::asp module.
 the raQ3 runs linux on a MIPS processor and I was wondering if any of you
 can confirm that it will work under MIPS.

Apache::ASP is pure Perl, so if you have mod_perl running on your box
then Apache::ASP will be OK.

73,
Ged.





RE: Apache::ASP Best Language to use?

2001-02-06 Thread S Muthu Ganesh



 -Original Message-
From:   [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]  On Behalf Of
Matthew Schroeder
Sent:   05 February 2001 21:13
To: '[EMAIL PROTECTED]'
Subject:Apache::ASP Best Language to use?

Currently the company I work for is using ASP code running on Windows
servers.

We'd like to run a web server that isn't microsoft based for obvious
reasons.
We don't have so much ASP code, so it would be possible to scrap it and
start over.

What would you guys suggest as the best option:
1. Porting our ASP code to Apache::ASP and continue development in ASP
2. Doing new development in JSP
3. Doing new development in CGI
4. Doing new development in Coldfusion

ANSWER : 2 (TWO)

Please reply to my private email, since I'm not a subscriber to the modperl
mailing list.

Sincerely,

Matthew Schroeder
PMAI
Software Developer
Phone: 517-788--8100 ext. 352




Re: Apache::ASP Best Language to use?

2001-02-05 Thread Silvia Bogarim

Please reply to the mailing list as well, because I'm also interested 
in the answers this post is likely to get.

Matthew Schroeder wrote:
 
 Currently the company I work for is using ASP code running on Windows
 servers.
 
 We'd like to run a web server that isn't microsoft based for obvious
 reasons.
 We don't have so much ASP code, so it would be possible to scrap it and
 start over.
 
 What would you guys suggest as the best option:
 1. Porting our ASP code to Apache::ASP and continue development in ASP
 2. Doing new development in JSP
 3. Doing new development in CGI
 4. Doing new development in Coldfusion
 
 Please reply to my private email, since I'm not a subscriber to the modperl
 mailing list.
 
 Sincerely,
 
 Matthew Schroeder
 PMAI
 Software Developer
 Phone: 517-788--8100 ext. 352

-- 
+---V---+ Silvia Dutoit Bogarim  *Alcanet voice:2-420.1093
| A L C A T E L | SRD Systems  Network  *  Phone +351.21.485.9093
+---+ Fax +351.21.485.9107   *GSM +351.96.803.9408
PORTUGAL  mailto:[EMAIL PROTECTED]



Re: Apache::ASP installation problem

2001-02-02 Thread Joshua Chamas

"Wang, Pin-Chieh" wrote:
 
 Hi,
 I am using Apache 1.3.14 with mod_perl-1.24_01 on Solaris system
 The Apache/Mod_perl part of build is working fine.
 But when I installed Apache-ASP-2.07, during the make test part I got
 Undefied Routine Devel/Symdump error
 therefore the make test failed.
 So, I download and try to install Devel-Symdump-2.00,
 the make test failed with error code 29 on Command failed for target
 'test-dynamic'
 

Your other mail said that you got Devel-Symdump-2.01 working.
Just closing this thread.

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



RE: Apache::ASP

2001-02-01 Thread Wang, Pin-Chieh


If Ged did not answer your question well enough, check out
this answered as an FAQ item at:


http://www.apache-asp.org/faq.html#Apache%20errors%20on%20the%20PerlHandler%
20directive%20%3F

--Josh

Hi, Josh,
I now re-installed a fresh copy Apache_1.3.14 with mod_perl-1.24_01 with
USE_DSO=1
  -- now the LoadModule and AddModule directive is automatically added in
httpd.conf 
I then did the following steps
1. Installed Apache-ASP-2.07
2. Copied Apache-ASP-2.07/site/eg directory into /usr/local/apache/htdocs
3. Modified httpd.conf file by adding 
Directory "/usr/local/apache/ htdocs/eg"
Options All
AllowOverride All
Order allow,deny
Allow from all
 /Directory
   AND
 Location /asp/
SetHandler perl-script
PerlHandler Apache:ASP
PerlSetVar Global /tmp
 /Location

When I call http://host/eg/index.html to test asp I got
#!/usr/local/bin/perl5 asp
[0]%([0]%source)

on the browser

there is no error at error_log. and the perl on my machine is at
/usr/local/perl and is 5.6
I tried to modify the #! line to indicate the location of local perl, but
still not work.

any body give me any guidance?

Thanks

PC






Re: Apache-ASP, XML::XSLT, XML::DOM

2001-02-01 Thread Joshua Chamas

 Christian Heiss wrote:
 
 I have to install Apache-ASP, and there is a optional modul XSLT.
 I tried to install this module but there is another prerequisite
 Modul XML::DOM needed. If I want install this, the "make test"
 command failed, with the error message:
 
 "Can't locate object method 'equals' via package 'XML::Parser::ContentModel' at 
CmpDOM.pm line 168"
 

You only need this if you want to use the XSLT feature for
Apache::ASP, which is unlikely.  If you do, then I would 
suggest installing with CPAN   Bundle::XML , and then 
build your apache with the disable-rule=EXPAT like so:

# modperl part
perl Makefile.PL \
APACHE_SRC=../apache_1.3.14/src \
NO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1

# apache part
./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/perl/libperl.a \
--enable-module=proxy \
--enable-module=so \
--disable-rule=EXPAT

-- Josh

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



RE: Apache::ASP

2001-02-01 Thread Wang, Pin-Chieh



Make sure you got the .htaccess file from the site/eg 
example directory .. the problem here is that your ASP
config has not been activated.  You could also try setting
the Location to /eg/

--Josh

I just noticed the "make test" part of installation has error  * error
code 29
with Command failed for target 'test_dynamic'

any ideal why this is failed? if this failure cause asp not running
correctly?

PC



Re: Apache::ASP

2001-02-01 Thread Joshua Chamas

"Wang, Pin-Chieh" wrote:
 
  Location /asp/
 SetHandler perl-script
 PerlHandler Apache:ASP
 PerlSetVar Global /tmp
  /Location
 
 When I call http://host/eg/index.html to test asp I got
 #!/usr/local/bin/perl5 asp
 [0]%([0]%source)
 

Make sure you got the .htaccess file from the site/eg 
example directory .. the problem here is that your ASP
config has not been activated.  You could also try setting
the Location to /eg/

--Josh



RE: Apache::ASP::Lite - CGI::ASP::Lite ( Please )

2001-01-31 Thread Ferguson, Ross


 I'm more than happy to have it renamed to CGI::ASP::Lite 
 
 I will upload a CGI-ASP-Lite-1.01.tar.gz

And delete the existing one. 

thanks and sorry for any mis-interpretation.
 
-Ross


-Original Message-
From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 4:27 AM
To: Ferguson, Ross
Cc: [EMAIL PROTECTED]; Mod Perl
Subject: Apache::ASP::Lite - CGI::ASP::Lite ( Please )


Ross,

I believe I already expressed this, but would like to 
revisit that I think Apache::ASP::Lite is not appropriately
named, and detracts from the current Apache::ASP namespace,
which I maintain.

I believe Apache::ASP::Lite should be named CGI::ASP::Lite
because it creates ASP objects for use in perl CGI scripting.  
Further, unlike most Apache::* modules, it does not run under 
mod_perl which is what the Apache::* namespace is for.  It is built
for the CGI model of execution, which Apache does in fact do, but
the Apache::* namespace is misleading in this regard. 

Further, there may be a namespace collision one day as 
Apache::ASP currently relies on a variety of sub Apache::ASP::*
modules to do its dirty work, such as:

 grep ^package src/ASP.pm
package Apache::ASP;
package Apache::ASP::STDERR;
package Apache::ASP::GlobalASA;
package Apache::ASP::Request;
package Apache::ASP::Response;
package Apache::ASP::Server;
package Apache::ASP::Application;
package Apache::ASP::Session;
package Apache::ASP::State;
package Apache::ASP::CGI;
package Apache::ASP::Collection;
package Apache::ASP::CollectionItem;
package Apache::ASP::Load;

What if you wanted to create your own objects as you extend
the framework, or I create a Apache::ASP::Lite for use in 
Apache::ASP ( very possible ).

Again, I beg you to pick another namespace for your work.
Note that it will likely be used by others if more appropriately
named in the CGI::* namespace.

Thanks,

Josh




This e-mail, its content and any files transmitted with it are intended solely for the 
addressee(s) and may be legally privileged and/or confidential. If you are not the 
named addressee you should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this e-mail by mistake 
and delete this e-mail from your system. E-mail transmission cannot be guaranteed to 
be secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses.  The sender therefore does 
not accept liability for any errors or omissions in the contents of this message and 
any attachments  which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.  This message is provided for information 
purposes and should not be construed as a solicitation or offer to buy or sell any 
securities or related financial instruments.



RE: Apache::ASP

2001-01-31 Thread G.W. Haywood

Hi there,

On Wed, 31 Jan 2001, Wang, Pin-Chieh wrote:

 How do I load mod_perl?
 in httpd.conf

Please read the installation section of the Guide.

http://perl.apache.org/guide


73,
Ged.
 




Re: Apache::ASP

2001-01-31 Thread Joshua Chamas

If Ged did not answer your question well enough, check out
this answered as an FAQ item at:

  
http://www.apache-asp.org/faq.html#Apache%20errors%20on%20the%20PerlHandler%20directive%20%3F

--Josh

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


"Wang, Pin-Chieh" wrote:
 
 How do I load mod_perl?
 in httpd.conf
 Thanks
 PC
 
 -Original Message-
 From: G.W. Haywood [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 31, 2001 2:07 PM
 To: Wang, Pin-Chieh
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: Apache::ASP
 
 Hi there,
 
 On Wed, 31 Jan 2001, Wang, Pin-Chieh wrote:
 
  Invalid Command 'PerlHandler' perhaps mis spelled or defined by module not
  included in the server configuration.
 
 You don't appear to have mod_perl in your server.
 
 Have you loaded it in httpd.conf?
 
 73,
 Ged.



RE: Apache::ASP (Using Apache::ASP Session information in a CGI script)

2001-01-25 Thread Earle F. Ake

Maybe someone else then has done what I want to do and can offer
some code snippets.

The entire site is run using Apache::ASP.  I am uploading and
downloading files.  I am using username/password authentication and storing
that username and id in the database in the session information.

For security reasons, I am using cgi to do the actual file uploads
and downloads.  The files are stored outside the web root.  I am calling the
cgi like: /cgi-bin/download.cgi/102/something.doc.  The entry in the
database for the file is 102 and the name the client should see is
something.doc.  I have the file stored internally with a different name.

I need to keep track of who downloads what files so that is why I
need the session information so I can make the proper SQL call to put the
number of the file and the user id into the database.  I could add it to the
above URL but I have two problems.  First is someone else could get credited
(blamed) for downloading that file and second is the fact that now I have no
way of knowing if the person is actually signed in or not.

I need to get the session information using a cgi script so I can
verify they have logged in and make the proper entry in the database that
they downloaded that file.  The reason I need to run it as a CGI is I need
this to run as the owner of the web and not the webserver itself.


-Earle

-Original Message-
From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 8:12 PM
To: Earle F. Ake
Cc: '[EMAIL PROTECTED]'
Subject: Re: Apache::ASP


"Earle F. Ake" wrote:
 
 I have an application which I am using the perl based ASP for.
All
 of my pages except for one as written using this.  I need one using plain
 perl based cgi so the process runs as the user and not the web server for
 file security reasons.  The problem is I need to get to some of the
Session
 information and I can't seem to get it in the cgi.
 

You can't load Apache::ASP like this in a CGI.  You might
try to run a program from your ASP script, passing it the 
needed session information as a argument, or STDIN.

You could also set up a CGI that take the session data
on the QUERY string, and then use Apache::Filter  Apache::SSI
to run that CGI using SSI tactics.

--Josh



Re: Apache::ASP

2001-01-25 Thread G.W. Haywood

Hi there,

On Thu, 25 Jan 2001, Ilya Krel wrote:

 I am running Freebsd 4.2, Summary of my perl5 (5.0 patchlevel 5 subversion
 3), Apache/1.3.14, mod_perl/1.24  (from ports collection).

 any suggestions how to fix it?

Did you compile Perl, Apache and mod_perl yourself?

If not, try it (like nasty medicine: it's good for you:).
And like Apache::ASP says, don't use DSO.

73,
Ged.





Re: Apache::ASP

2001-01-25 Thread Joshua Chamas

Anyone see why a $r = Apache=SCALAR(0x8461790) might not
respond true to $r-can('filename') on Ilya's below FreeBSD
setup?  The relevant ASP code is below.

Ilya, worst case, you can tweak that code to make it 
work for you, for example does a line like 

unless($r  ($r =~ /^Apache/)) {

work instead ?  This might be a suitable test.

--Josh

sub handler {
my($package, $r) = @_;
my $status = 200;

# allows it to be called as an object method
ref $package and $r = $package;

# rarely happens, but just in case
unless($r  $r-can('filename')) {
# this could happen with a bad filtering sequence
warn(ERROR);
No valid request object ($r) passed to ASP handler; if you are getting
this error message, you likely have a broken DSO version of mod_perl
which often occurs when using RedHat RPMs.  One fix reported is to
configure "PerlSendHeader On".  Another fix is to compile
statically the apache + mod_perl build as RedHat RPMs have been trouble.
Please check FAQ or mod_perl archives for more information.
ERROR
  ;

Ilya Krel wrote:
 
 I am running Freebsd 4.2, Summary of my perl5 (5.0 patchlevel 5 subversion
 3), Apache/1.3.14, mod_perl/1.24  (from ports collection).
 Apache:ASP installed from cpan says:
 Bundle id = Bundle::Apache::ASP
 CPAN_USERID  CHAMAS (Joshua Chamas [EMAIL PROTECTED])
 CPAN_VERSION 1.00
 CPAN_FILEC/CH/CHAMAS/Apache-ASP-2.07.tar.gz
 MANPAGE  Bundle::Apache::ASP - Install Apache::ASP and related
 modules
 CONTAINS MLDBM Data::Dumper MD5 CGI HTML::Clean Net::SMTP HTTP::Date
 Devel::Symdump Apache::DBI Compress::Zlib Tie::Cache Time::HiRes Apache::ASP
 INST_FILE/usr/local/lib/perl5/site_perl/5.005/Bundle/Apache/ASP.pm
 INST_VERSION 1.00
 
 when i try to access the examples in site/eg I get thsi in error_log :
 No valid request object (Apache=SCALAR(0x8461790)) passed to ASP handler; if
 you are getting
 this error message, you likely have a broken DSO version of mod_perl
 which often occurs when using RedHat RPMs.  One fix reported is to
 configure "PerlSendHeader On".  Another fix is to compile
 statically the apache + mod_perl build as RedHat RPMs have been trouble.
 Please check FAQ or mod_perl archives for more information.
 
 any suggestions how to fix it?
 
 thx



Re: Apache::ASP

2001-01-25 Thread John Hurst


You may also want to try

   unless(UNIVERSAL::can($r, 'filename')){
 ...
   }

which also nicely avoids having to test $r first.

-jh



At 05:05 PM 1/25/01, Joshua Chamas wrote:
Anyone see why a $r = Apache=SCALAR(0x8461790) might not
respond true to $r-can('filename') on Ilya's below FreeBSD
setup?  The relevant ASP code is below.

Ilya, worst case, you can tweak that code to make it
work for you, for example does a line like

 unless($r  ($r =~ /^Apache/)) {

work instead ?  This might be a suitable test.

--Josh

sub handler {
 my($package, $r) = @_;
 my $status = 200;

 # allows it to be called as an object method
 ref $package and $r = $package;

 # rarely happens, but just in case
 unless($r  $r-can('filename')) {
 # this could happen with a bad filtering sequence
 warn(ERROR);
No valid request object ($r) passed to ASP handler; if you are getting
this error message, you likely have a broken DSO version of mod_perl
which often occurs when using RedHat RPMs.  One fix reported is to
configure "PerlSendHeader On".  Another fix is to compile
statically the apache + mod_perl build as RedHat RPMs have been trouble.
Please check FAQ or mod_perl archives for more information.
ERROR
   ;

Ilya Krel wrote:
 
  I am running Freebsd 4.2, Summary of my perl5 (5.0 patchlevel 5 subversion
  3), Apache/1.3.14, mod_perl/1.24  (from ports collection).
  Apache:ASP installed from cpan says:
  Bundle id = Bundle::Apache::ASP
  CPAN_USERID  CHAMAS (Joshua Chamas [EMAIL PROTECTED])
  CPAN_VERSION 1.00
  CPAN_FILEC/CH/CHAMAS/Apache-ASP-2.07.tar.gz
  MANPAGE  Bundle::Apache::ASP - Install Apache::ASP and related
  modules
  CONTAINS MLDBM Data::Dumper MD5 CGI HTML::Clean Net::SMTP 
 HTTP::Date
  Devel::Symdump Apache::DBI Compress::Zlib Tie::Cache Time::HiRes 
 Apache::ASP
  INST_FILE/usr/local/lib/perl5/site_perl/5.005/Bundle/Apache/ASP.pm
  INST_VERSION 1.00
 
  when i try to access the examples in site/eg I get thsi in error_log :
  No valid request object (Apache=SCALAR(0x8461790)) passed to ASP 
 handler; if
  you are getting
  this error message, you likely have a broken DSO version of mod_perl
  which often occurs when using RedHat RPMs.  One fix reported is to
  configure "PerlSendHeader On".  Another fix is to compile
  statically the apache + mod_perl build as RedHat RPMs have been trouble.
  Please check FAQ or mod_perl archives for more information.
 
  any suggestions how to fix it?
 
  thx





Re: Apache::ASP

2001-01-25 Thread Ilya

I think I was editing wrong file all the time ;)

unless($r  $r-can('filename')) {  gives:
No valid request object (Apache=SCALAR(0x83ec2c4)) passed to ASP handler; if
you are getting
this error message, you likely have a broken DSO version of mod_perl
which often occurs when using RedHat RPMs.  One fix reported is to
configure "PerlSendHeader On".  Another fix is to compile
statically the apache + mod_perl build as RedHat RPMs have been trouble.
Please check FAQ or mod_perl archives for more information.

unless (ref($r) and ($r-can('filename')){  gives:
Global symbol "$r" requires explicit package name at
/usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 134.
Global symbol "$status" requires explicit package name at
/usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 200.
[Fri Jan 26 01:51:28 2001] [error] syntax error at
/usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 127, near ";"
  (Might be a runaway multi-line  string starting on line 119)
syntax error at /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 231,
near "}"

[Fri Jan 26 01:51:28 2001] [error] Undefined subroutine
Apache::ASP::handler called

unless($r  ($r =~ /^Apache/)) {  gives:
[Fri Jan 26 01:53:13 2001] [error] Can't locate object method "dir_config"
via package "Apache" at /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm
line 134.

unless(UNIVERSAL::can($r, 'filename')){ gives:
No valid request object (Apache=SCALAR(0x841deb8)) passed to ASP handler; if
you are getting
this error message, you likely have a broken DSO version of mod_perl
which often occurs when using RedHat RPMs.  One fix reported is to
configure "PerlSendHeader On".  Another fix is to compile
statically the apache + mod_perl build as RedHat RPMs have been trouble.

sorry about misinformation
Please check FAQ or mod_perl archives for more information.




Re: Apache::ASP

2001-01-24 Thread G.W. Haywood

Hi there,

On Wed, 24 Jan 2001, Earle F. Ake wrote:

 open(OUT, "/tmp/debug.log");

Do you mean 

open(OUT, "/tmp/debug.log");

?

73,
Ged.





Re: Apache::ASP

2001-01-24 Thread Joshua Chamas

"Earle F. Ake" wrote:
 
 I have an application which I am using the perl based ASP for.  All
 of my pages except for one as written using this.  I need one using plain
 perl based cgi so the process runs as the user and not the web server for
 file security reasons.  The problem is I need to get to some of the Session
 information and I can't seem to get it in the cgi.
 

You can't load Apache::ASP like this in a CGI.  You might
try to run a program from your ASP script, passing it the 
needed session information as a argument, or STDIN.

You could also set up a CGI that take the session data
on the QUERY string, and then use Apache::Filter  Apache::SSI
to run that CGI using SSI tactics.

--Josh



Re: Apache::ASP help!

2001-01-24 Thread Joshua Chamas

Philippe Ratt wrote:
 
 Hello :)
 
 My Apache::ASP is working; i've copied the ./site/eg/ dir to my htdocs, and
 all that works..
 
 In my root dir, ( / ) i've made a simple ASP document. When I run it, it
 gives me the following errors:
 
 Errors Output
 Undefined subroutine Apache::ASP::date called at (eval 9) line 1. ,
 /usr/lib/perl5/site_perl/Apache/ASP.pm line 1471

Congrats on getting this far! ( not an easy task for some )

date() is probably a VBScript command, but Apache::ASP supports
perl scripting only.  You could likely use HTTP::Date::time2str()
for similar effect, do a "perldoc HTTP::Date" for more info.

Better yet, if you really were expecting VBScript, then you might
want to learn perl, or get a web app environment that supports 
VBScript like Chilisoft's ASP.

--Josh

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



Re: Apache::ASP

2001-01-23 Thread Joshua Chamas

Francis Mendoza wrote:
 
 Hello Help,
 
 I'd like to check my website and see why my test.asp is not working or
 showing up on the browser.
 http://www.technokia.com/test.asp
 

This is a VBScript page, Apache::ASP only support perl scripting
with ASP.

 I have installed everything and followed the instruction at
 http://www.apache-asp.org/
 
 for my location this is what i have.
 
 Location /www/technokia/html/asp/
 SetHandler perl-script
 PerlHandler Apache::ASP
 #PerlSetVar Global /tmp
 /Location

As long as you have restarted your apache, and 
your files are in /www/technokia/html/asp/, then
your ASP scripts should work fine.

--Josh

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



Re: Apache::ASP [error] need AuthName

2001-01-21 Thread Joshua Chamas


 "Pavel P. Zabortsev" wrote:
 
 Hello,
 I'm using apache-1.3.12 at RedHat 7.0 box.
 Sometime I've installed Apache::ASP 2.07 and as result got strange error:
 [Sun Jan 21 22:28:01 2001] [error] [client 127.0.0.1] need AuthName: /index.shtml
 

I'll have this bug fixed in Apache::ASP 2.09.  Till then, 
follow Andrew's advice.  -- Josh

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



Re: Apache::ASP

2001-01-16 Thread G.W. Haywood

Hi there,

On Tue, 16 Jan 2001, Francis Mendoza wrote:

 Does this mean that I have Apache::ASP installed in my Linux already?

Looks that way.

 If I do have Apache::ASP already installed in my Linux.. What is my
 next step?

You need to do some reading.  The documentation is in there with
Apache::ASP.  Try 'perldoc Apache::ASP'.  If that doesn't work, find
the directory with ASP.pm in it.  Go there and try 'perldoc ./ASP.pm'.

73,
Ged.




Re: Apache::ASP compiling extensions

2001-01-12 Thread Joshua Chamas

Aaron Johnson wrote:
 
 I think to help people coming from CGI or EmbPerl that are used to having all params 
in the same
 place that having $Form be automatic is a must have. You can have it be an option in 
the globals if
 there is any potential performance hit for doing it I suppose ( could it even be on 
if the passed
 information was huge since it is referenced or does it have dereference then build a 
new reference?

The auto form fill for ASP is just done, see prior mail.
Additional, I propose that setting PerlSetVar RequestParams 1
will create a $Request-{Params} collection like Form  QueryString,
but represents a fused version of both, as in:

if($r-dir_config('RequestParams')) {
$self-{'Params'} = bless { %$parsed_query, %$form }, 
'Apache::ASP::Collection';
} 

If someone then wanted to use params as form, they could:

use vars qw($Params);
sub Script_OnStart {
  $Request-{Form} = $Request-{Params}; # or script global $Params
  $Params = $Request-{Params};
}

   - Poor error reporting.  This seems to be possibly a resurfaced bug, but
   when use strict is turned on ( not the global one, but on a per page
   level ) when testing a page for compliance it gives no intelligent error

I'll check it out later.  Did you have "PerlSetVar UseStrict 1" set?
You need to have this when doing "use strict" coding.

 I am interested in the compile time feature, but will it in fact then run any code?  
With EmbPerl it
 has custom meta commands and the automated html handling, will those blocks of code 
be passed to
 that module or will they simply be lost?  I for one would rather see ASP use some of 
the more
 helpful features of other packages, but have them be built in.
 

The compile time features would be aimed at translating foreign
tokens or tags, like [+ +], cfif, xsp:logic to the ASP 
structural equivalent prior to parsing to perl code  compilation.

 - Perl programmers are Lazy why should they have to add a function to something that 
could be done
 inside the existing structure with little change on the maintainers end and the 
knowledge that it is
 done right for the end user.
 
 - There is already code that is outside of the ASP "standard" (Script_OnStart etc.) 
so adding other
 features is truly enhancing the reasons to use Apache::ASP vs. MS ASP.
 
 - New users don't want to have to wade through modules and probably can't and for 
them to understand
 references is a bit of a stretch.  So yes some of the added code is ridiculously 
simple if you know
 what is does, but that is the beauty of being the magician.
 

Yes, yes, yes.

-- Josh



Re: Apache::ASP compiling extensions

2001-01-11 Thread Aaron Johnson

Joshua Chamas wrote:

 Aaron Johnson wrote:
 
  If what you are saying is that current EmbPerl code would be able to run
  almost unchanged under ASP that would be very interesting, but presently
  my biggest issues with Apache::ASP are:
 
  - Doesn't "help" with any HTML.
 

 I think I know what you mean, and I'm not sure that's its worth
 developing those things, is this a big priority?

 Embperl:
 table
   tr bgcolor="[+ $row % 2?'gray':'white' +]"
 td align="center"font size="+1"[+ $multi[$row][$col] +]/font/td
   /tr
 /table

  VS.

 ASP:
 table
  % for my $row (0..$#multi) { %
tr bgcolor="%= $row % 2 ? 'gray' : 'white' %"
% for my $col (0..$#array) { %
  td align="center"font size="+1"%= $multi[$row][$col] %/font/td
% } %
/tr
  % } %
 /table


There are other things, like auto href, form elements etc. that are very helpful.  
Perhaps it is the
lack of examples then on how to emulate some of the functions from other modules.


  - QueryString and Form from the Response are separate, this makes a
  programming headache if you are used to Embperl or if you are not sure
  what type of input is coming in for some reason.



 sub Script_OnStart {
   $Form = { %{$Request-{Form}}, %{$Request-{QueryString} };
 }

 does this need a config?


I think to help people coming from CGI or EmbPerl that are used to having all params 
in the same
place that having $Form be automatic is a must have. You can have it be an option in 
the globals if
there is any potential performance hit for doing it I suppose ( could it even be on if 
the passed
information was huge since it is referenced or does it have dereference then build a 
new reference?
).  One less thing to add to "remember/keep track" of.  Remember I am a Lazy Perl 
programmer :^).  I
want things under mod_perl to be as simple as possible for new comers, I think have 
POST and GET in
separate variables is only relevant to people coming from MS ASP platform, which is 
good, but not at
the expense of proficient CGI programmers.


  Shouldn't they just be the same information?
  Is there a need to keep them separate?

 Its the ASP API.  I just ported it.

  - Slow processing time, on the Hello World test it is one of the slower
  ones.  EmbPerl 2.0 is supposed to be even faster then the present
  version.
 

 Huh?  From http://www.chamas.com/bench/hello.tar.gz, so you
 can run it yourself ...

 hello]# ./bench.pl -version -time=15 ASP Embperl

 Test Name  Test File  Hits/sec   Total Hits Total Time sec/Hits  
 Bytes/Hit
    -- -- -- -- 
-- --
 Apache::ASP v2.09 2000 h2000.asp   229.1 3444 hits  15.03 sec  0.004365  
 28997 byte
 HTML::Embperl v2.0a18 2000 h2000.epl   248.7 3732 hits  15.01 sec  0.004022  
 28809 byte
 Apache::ASP v2.09  hello.asp   395.1 5933 hits  15.02 sec  0.002531  
 241 bytes
 HTML::Embperl v2.0a18  hello.epl   461.4 6933 hits  15.03 sec  0.002167  
 219 bytes

 Apache Server Header Tokens
 ---
 (Unix)
 Apache/1.3.14
 OpenSSL/0.9.6
 PHP/4.0.3pl1
 mod_perl/1.24
 mod_ssl/2.7.1

 PERL Version: 5.00503

 Operating System: Linux 2.2.14-5.0smp (root@porky) (gcc egcs-2.91.66) #1 2CPU [gate]

 Sorry, I can't get it much faster on hello world, Embperl is written
 in C, Apache::ASP in perl.  But check out the h2000 tests, much more
 representative of real world templates, not just startup time.


My bad, I hadn't looked at the latest results and I wasn't reading the h2000 results 
correctly.


  - Poor error reporting.  This seems to be possibly a resurfaced bug, but
  when use strict is turned on ( not the global one, but on a per page
  level ) when testing a page for compliance it gives no intelligent error
  message as to where the problem might be.  I see in the docs where this
  has been addressed (fixed) before.

 I haven't seen this in a while, give me a test script  I'll fix it.


%
use strict;
$greeting = "Hello";
print "$greeting";
%
( used Apache::ASP 2.03 and it worked correctly, 2.07 on a different machine and it 
didn't )

This gets me undefined subroutine as the error message.  If I comment out 'use strict' 
it runs fine.

I am getting different messages on more complex pages, but this was working correctly 
before, but I
am not sure when it broke. ( post 2.03 maybe )


  - No automatic variable clean up.  I think EmbPerl runs each page as its
  own package to keep things "clean" is that possible under Apache::ASP?
 

 ASP does have a UniquePackages feature that could possibly make use
 of this garbage collection, but then you are not in the same package
 as global.asa where you get to init easy to use globals  such,
 its a trade off.

 To do things really cleanly, keep one global hash for per
 process data, and then undef it in Script_OnEnd.  The rest
 should be caught by the UseStrict config.

  - No auto form fillin.  I know this has been 

Re: Apache::ASP compiling extensions

2001-01-10 Thread Aaron Johnson

If what you are saying is that current EmbPerl code would be able to run
almost unchanged under ASP that would be very interesting, but presently
my biggest issues with Apache::ASP are:

- Doesn't "help" with any HTML.

- QueryString and Form from the Response are separate, this makes a
programming headache if you are used to Embperl or if you are not sure
what type of input is coming in for some reason.
Shouldn't they just be the same information?
Is there a need to keep them separate?
Why don't other modules do it that way if there is?

- Slow processing time, on the Hello World test it is one of the slower
ones.  EmbPerl 2.0 is supposed to be even faster then the present
version.

- Poor error reporting.  This seems to be possibly a resurfaced bug, but
when use strict is turned on ( not the global one, but on a per page
level ) when testing a page for compliance it gives no intelligent error
message as to where the problem might be.  I see in the docs where this
has been addressed (fixed) before.

- No automatic variable clean up.  I think EmbPerl runs each page as its
own package to keep things "clean" is that possible under Apache::ASP?

- No auto form fillin.  I know this has been discussed, I have even made
crude code that allows it.

To be fair I better list some of what I like:

- Script_OnStart and Stop: This makes it easy to build headers and
footers for even complex applications.
- Built in Session handling
- Only one type of tag to remember ( % ), well ok two if you count %=

There are others, but those are the main ones I can think of off the top
of my head.

I think making it do its job better and faster is more important then
trying to allow for other delimiters IMHO.

Aaron Johnson

Joshua Chamas wrote:

 Hey,

 I am considering long belated compile time extensions
 that would allow at least partial handling of other languages
 formats like Cold Fusion, XSP, Embperl, ... a developer would
 be able to rewrite a template at compile time into ASP.

 Here's what I have in mind:

 PerlSetVar TagParseMatch ^xsp:
 ## for XSP conversion of xsp:logic.../xsp:logic
 # global.asa
 sub Script_OnTagParse {
my($tag, $begin, $args) = @_;
if($tag eq 'xsp:logic') {
   my $replace = $begin ? '%' : '%';
} ...
 }

 PerlSetVar TokenParseMatch [+,+],[*,*]
 ## for Embperl conversion of [* *] type constructs
 # global.asa
 sub Script_OnTokenParse {
my $token = shift;
if($token eq '[*') {
   '%';
} elsif($token eq '*]') {
   '%';
} ...
 }

 The results would then be inserted into the parse stream
 for ASP before other language parsing is done.
 Once compiled, there would be no extra overhead to
 running the code, unlike with XMLSubsMatch.  XMLSubsMatch
 will continue to be the only way to handle the text
 contained within a tag like tag text /tag.

 So what do you think?  Will anyone use this?

 -- Josh




Re: Apache::ASP compiling extensions

2001-01-10 Thread Joshua Chamas

Aaron Johnson wrote:
 
 If what you are saying is that current EmbPerl code would be able to run
 almost unchanged under ASP that would be very interesting, but presently
 my biggest issues with Apache::ASP are:
 
 - Doesn't "help" with any HTML.
 

I think I know what you mean, and I'm not sure that's its worth 
developing those things, is this a big priority?

Embperl:
table
  tr bgcolor="[+ $row % 2?'gray':'white' +]"
td align="center"font size="+1"[+ $multi[$row][$col] +]/font/td
  /tr
/table

 VS.

ASP:
table
 % for my $row (0..$#multi) { %
   tr bgcolor="%= $row % 2 ? 'gray' : 'white' %"
   % for my $col (0..$#array) { %
 td align="center"font size="+1"%= $multi[$row][$col] %/font/td
   % } %
   /tr
 % } %
/table

 - QueryString and Form from the Response are separate, this makes a
 programming headache if you are used to Embperl or if you are not sure
 what type of input is coming in for some reason.

That's the way the API is, I could create a config to merge them,
but its always seemed as easy to 

sub Script_OnStart {
  $Form = { %{$Request-{Form}}, %{$Request-{QueryString} };
}

does this need a config?

 Shouldn't they just be the same information?
 Is there a need to keep them separate?

Its the ASP API.  I just ported it.

 - Slow processing time, on the Hello World test it is one of the slower
 ones.  EmbPerl 2.0 is supposed to be even faster then the present
 version.
 

Huh?  From http://www.chamas.com/bench/hello.tar.gz, so you 
can run it yourself ...

hello]# ./bench.pl -version -time=15 ASP Embperl

Test Name  Test File  Hits/sec   Total Hits Total Time sec/Hits   
Bytes/Hit  
   -- -- -- -- -- 
-- 
Apache::ASP v2.09 2000 h2000.asp   229.1 3444 hits  15.03 sec  0.004365   
28997 byte 
HTML::Embperl v2.0a18 2000 h2000.epl   248.7 3732 hits  15.01 sec  0.004022   
28809 byte 
Apache::ASP v2.09  hello.asp   395.1 5933 hits  15.02 sec  0.002531   
241 bytes  
HTML::Embperl v2.0a18  hello.epl   461.4 6933 hits  15.03 sec  0.002167   
219 bytes  

Apache Server Header Tokens
---
(Unix)
Apache/1.3.14
OpenSSL/0.9.6
PHP/4.0.3pl1
mod_perl/1.24
mod_ssl/2.7.1

PERL Version: 5.00503

Operating System: Linux 2.2.14-5.0smp (root@porky) (gcc egcs-2.91.66) #1 2CPU [gate]

Sorry, I can't get it much faster on hello world, Embperl is written 
in C, Apache::ASP in perl.  But check out the h2000 tests, much more
representative of real world templates, not just startup time.

 - Poor error reporting.  This seems to be possibly a resurfaced bug, but
 when use strict is turned on ( not the global one, but on a per page
 level ) when testing a page for compliance it gives no intelligent error
 message as to where the problem might be.  I see in the docs where this
 has been addressed (fixed) before.

I haven't seen this in a while, give me a test script  I'll fix it.

 - No automatic variable clean up.  I think EmbPerl runs each page as its
 own package to keep things "clean" is that possible under Apache::ASP?
 

ASP does have a UniquePackages feature that could possibly make use
of this garbage collection, but then you are not in the same package
as global.asa where you get to init easy to use globals  such,
its a trade off.

To do things really cleanly, keep one global hash for per
process data, and then undef it in Script_OnEnd.  The rest
should be caught by the UseStrict config.

 - No auto form fillin.  I know this has been discussed, I have even made
 crude code that allows it.
 

I would like to develop this too.  Thanks for your feedback.
So I take it you're not particularly interested in the
compile time feature additions? :)

--Josh

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



Re: Apache::ASP

2000-12-21 Thread Joshua Chamas

Loay Oweis wrote:
 
 Hello
 
 I am trying to find a feasible solution for configuring an apache web
 server to serve asp, ssi and jsp.
 
 I am leaning towards RedHat due to my experience with it. I have tried
 the lated RH7.0 which comes with mod_perl but not perl-apache-asp. I
 have tried an Apache::ASP CPAN install with no luck simply getting the
 Internal Server Error page. I thinking of going to RH6.2 and trying the

RH 7.0 should be fine ( though I'm using 6.2 personally), what's in your 
httpd error_log, the problem is likely easy to fix.

--Josh

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



Re: Apache::ASP permissions problem?

2000-12-21 Thread Joshua Chamas

Michael Hurwitch wrote:
 
 I have been trying to install Apache:ASP 2.07 on Solaris 2.6 with Perl
 5.6.0. When I try to load an ASP page, I get the following errors:
 
 Errors Output
   1.. Can't open /tmp/.state/3d/3d8ae603196.lock: ,
 /raid1/perl5.6.0/lib/site_perl/5.6.0/Apache/ASP.pm line 4831
 Debug Output
   1.. Can't open /tmp/.state/3d/3d8ae603196.lock: ,
 /raid1/perl5.6.0/lib/site_perl/5.6.0/Apache/ASP.pm line 4831
 ASP to Perl Script
 
 Here is the directory listing:
 zeus:mhurwitch/tmp/.state/3d ls -ltotal 0-rw-r-   1 nobody   nobody
 0 Dec 21 10:07 3d8ae603196.dir-rw-rw-rw-   1 nobody   nobody 0 Dec
 21 10:07 3d8ae603196.lock-rw-r-   1 nobody   nobody 0 Dec 21
 10:07 3d8ae603196.pag
 

This looks like a bug in the way Apache::ASP sets the file
permissions.  Before you do anything, I would like to see
the ls -allg for .state and .state/3d ... but to 
fix your problem temporarily so you can move onto 
development, you can "chmod -R 0755 .state"

-- Josh

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



Re: Apache::ASP

2000-12-19 Thread Stas Bekman

On Tue, 19 Dec 2000, Shane Reid wrote:

 I've run into a problem with the examples (eg).  I downloaded, ran the
 Makefile.pl and the make and make install all of those work then copied the
 eg directory under the www directory for the webserver edited the httpd.conf
 file to change AllowOverride from None to All then restarted and tried to go
 to the examples directory -- Internal Server Error.  The logs show the
 particular error, thinking it was a problem with MD5 I tried to install it,
 it was up to date so did a clean then installed it over and it still gave
 same error.  If you have any ideas please throw them at me.
 
 [Tue Dec 19 17:55:44 2000] [error] Can't locate Digest/Perl/MD5.pm in @INC

cauze it looks for Digest/Perl/MD5.pm -- grep the code for:
Digest::Perl::MD5

looks like a typo to me

 (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503
 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
 /usr/local/lib/perl5/site_perl/5.005 . /usr/local/etc/apache/
 /usr/local/etc/apache/lib/perl) at
 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/Digest/MD5.pm line 20.
 BEGIN failed--compilation aborted at
 /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 13.
 
 [Tue Dec 19 17:55:44 2000] [error] Undefined subroutine
 Apache::ASP::handler called.
 
 Thanks
 -Shane Reid
 
 



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





Re: Apache::ASP

2000-12-19 Thread Joshua Chamas

Stas Bekman wrote:
 
 On Tue, 19 Dec 2000, Shane Reid wrote:
 
  to the examples directory -- Internal Server Error.  The logs show the
  particular error, thinking it was a problem with MD5 I tried to install it,
  it was up to date so did a clean then installed it over and it still gave
  same error.  If you have any ideas please throw them at me.
 
  [Tue Dec 19 17:55:44 2000] [error] Can't locate Digest/Perl/MD5.pm in @INC
 
 cauze it looks for Digest/Perl/MD5.pm -- grep the code for:
 Digest::Perl::MD5
 

I've never heard of it either, try doing a forced install
of Digest::MD5 or a force install of MD5, which should
result in the same thing.  The Digest::MD5 package provides
the deprecated interface for MD5 now.

--Josh

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



Re: Apache::ASP NFS Clustering

2000-12-19 Thread Joshua Chamas

Tuc wrote:
 
 This will only work if the NFS attributes on the client
 mount are set to no caching.
 
 It seems to work great in 2 known web clusters.
 -
 
 Wondering if you can expand on this a little.  We are
 trying to do DBM on NFS and think it might be causing a problem.
 Setting no caching has been suggested...
 

Setting no caching on your NFS is a good step, but ...

I personally wouldn't do this, as DB_File needs write locking
to maintain data integrity or they could become corrupt.  
I believe they were using it at RedHat, without problems, but
if it were me, I wouldn't.  I would stick with the default 
SDBM_File, which is really hard to corrupt, but you have the 
1024 key/value byte limit, so its not good for storing large
objects.

If you really want DB_File, I would use a samba mount which
I tested recently, and does support file locking very well.
You may get away with using DB_File over NFS for session state
if your site doesn't have frames, because you wouldn't expect
concurrent access to $Session under those conditions.

If you don't need Session_OnStart / Session_OnEnd events,
then you can easily create a database backed Apache::Session
solution, by setting $Session in global.asa Script_OnStart

-- Josh

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



Re: Apache::asp

2000-12-11 Thread Joshua Chamas

Eran Keshet wrote:
 
 hi,
 im trying 2 call the "handler" function in Apache::asp from a perl module
 (in apache with mode_perl),
 i need 2 pass parameters 2 that function like the filename, and i tried 2
 modify the handler function accordingly,
 but i keep getting errors like " [client 10.10.10.19] need AuthName: /Test"
 ,

Just set AuthName in your httpd.conf.  I'll make this error go away
next release.  Also, set $r-filename($value) before you call the handler
and your file will work fine.  

 and i also need 2 change the file type from html 2 other types (like .wml)
 does anyone have experience in this stuff ?
 

$Response-{ContentType} ... you can do this for all your scripts
in your global.asa Script_OnStart based on matching the file's
extension.

-- Josh

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



Re: Apache::ASP problem with post data

2000-12-10 Thread Luc Willems

I think this will be intresting in the future when HTTP servers will be
used for other things than just web pages serving.
First thing i can think of is XML-RPC and SOAP technologie . Maybe this
is something for a future release of the ASP framework ?

greetings,
luc

Joshua Chamas wrote:
 
 I have an ASP version which incorporates this patch for reading
 non-form POST data.  Let me know if you all want it.
 
 --Josh
 
 Luc Willems wrote:
 
  the result of $Response- is also empty.
 
  i had a look into the Apache::ASP source code and found this :
  (line 843)
 
  $self-{content} = $r-content();
  tie(*STDIN, 'Apache::ASP::Request', $self)
if defined($self-{content});
 
  this means that it's comming from $r-content() which i think is a
  apache object.
  (what the tie does , i don't know )
  so looking further in the apache module i found that
 
  sub content {
  my($r) = @_;
  my $ct = $r-header_in("Content-type") || "";
  return unless $ct eq "application/x-www-form-urlencoded";
  my $buff;
  $r-read($buff, $r-header_in("Content-length"));
  parse_args(wantarray, $buff);
  }
 
  it seems that the "Content-type" must be
  "application/x-www-form-urlencoded" before we can get anything out of
  the content() routine from mod_perl :-(
 
  So i tried  this
 
  #Get posted XML query
  $len = $Request-{TotalBytes};
  $Request-{asp}-{r}-read($i,$len);
 
  this will work always without taking into acount the content-type ,
  which is text/xml
 
  I don't know if there is any problem with doing it this way ?
 
  If anybody has a clue on this , let me know .
 
  greetings,
  luc
 
  Brendan McKenna wrote:
  
   Hi,
  
   The 156 bytes are your data.  Since you're using Perl, you should be
   able to access your data using $Response-content;
  
   Brendan
   :
   :   hello ,
   :
   :
   : i'm working on a project that involves some XML-RPC system. The idea is
   : to POST a XML to a ASP script which will than process this
   : and return a XML back to the client.
   :
   : To do that a send sommething like this (output from ethereal dump) :
   :
   : POST /cp-bin/rc2.asp HTTP/1.0
   : Host: linux
   : User-Agent: libwww-perl/5.36
   : Content-Length: 156
   : Content-Type: text/xml
   :
   : ?xml version="1.0"?
   : methodCall
   : methodNameexamples.getStateName/methodName
   : params
   : paramvaluei41/i4/value/param
   : /params
   : /methodCall
   :
   : The problem now is , that in the asp script i get a Totalbytes of 156
   : bytes but the content string is empty ?
   :
   : #Get posted XML query
   : my $len = $Request-{TotalBytes};
   : my $i   = $Request-BinaryRead($len);
   :
   : #log input query
   : $Response-Debug("recieved $len bytes");
   : $Response-Debug("data [$i]");
   :
   : Does anybody has a clue where the 156 bytes are ???
   :
   :   thanks
   :   luc willems
   :
   : -
   : To unsubscribe, e-mail: [EMAIL PROTECTED]
   : For additional commands, e-mail: [EMAIL PROTECTED]
   :
  
   --
   Brendan McKenna
   Technical Director  Phone: +353-(0)61-338177 x4143
   W3 Services Ltd.  Fax: +353-(0)61-338065
   Innovation Centre   Email: [EMAIL PROTECTED]
   National Technological Park
   Limerick
   Ireland



Re: Apache::ASP problem with post data

2000-12-08 Thread Joshua Chamas

Luc Willems wrote:
 
 it seems that the "Content-type" must be
 "application/x-www-form-urlencoded" before we can get anything out of
 the content() routine from mod_perl :-(
 
 #Get posted XML query
 $len = $Request-{TotalBytes};
 $Request-{asp}-{r}-read($i,$len);
 

I'll change the Apache::ASP code to read() instead 
of content() just for this reason.  I might only
parse it for Form() if "application/x-www-form-urlencoded"
but at least it'll be there for BinaryRead()

Thanks for figuring this out.

--Josh

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

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




Re: Apache::ASP problem with post data

2000-12-07 Thread Luc Willems

the result of $Response- is also empty.

i had a look into the Apache::ASP source code and found this :
(line 843)

$self-{content} = $r-content();
tie(*STDIN, 'Apache::ASP::Request', $self)
  if defined($self-{content});

this means that it's comming from $r-content() which i think is a
apache object.
(what the tie does , i don't know )
so looking further in the apache module i found that

sub content {
my($r) = @_;
my $ct = $r-header_in("Content-type") || "";
return unless $ct eq "application/x-www-form-urlencoded";
my $buff;
$r-read($buff, $r-header_in("Content-length"));
parse_args(wantarray, $buff);
}

it seems that the "Content-type" must be
"application/x-www-form-urlencoded" before we can get anything out of
the content() routine from mod_perl :-(

So i tried  this

#Get posted XML query
$len = $Request-{TotalBytes};
$Request-{asp}-{r}-read($i,$len);

this will work always without taking into acount the content-type ,
which is text/xml

I don't know if there is any problem with doing it this way ?


If anybody has a clue on this , let me know .

greetings,
luc





Brendan McKenna wrote:
 
 Hi,
 
 The 156 bytes are your data.  Since you're using Perl, you should be
 able to access your data using $Response-content;
 
 Brendan
 :
 :   hello ,
 :
 :
 : i'm working on a project that involves some XML-RPC system. The idea is
 : to POST a XML to a ASP script which will than process this
 : and return a XML back to the client.
 :
 : To do that a send sommething like this (output from ethereal dump) :
 :
 : POST /cp-bin/rc2.asp HTTP/1.0
 : Host: linux
 : User-Agent: libwww-perl/5.36
 : Content-Length: 156
 : Content-Type: text/xml
 :
 : ?xml version="1.0"?
 : methodCall
 : methodNameexamples.getStateName/methodName
 : params
 : paramvaluei41/i4/value/param
 : /params
 : /methodCall
 :
 : The problem now is , that in the asp script i get a Totalbytes of 156
 : bytes but the content string is empty ?
 :
 : #Get posted XML query
 : my $len = $Request-{TotalBytes};
 : my $i   = $Request-BinaryRead($len);
 :
 : #log input query
 : $Response-Debug("recieved $len bytes");
 : $Response-Debug("data [$i]");
 :
 : Does anybody has a clue where the 156 bytes are ???
 :
 :   thanks
 :   luc willems
 :
 : -
 : To unsubscribe, e-mail: [EMAIL PROTECTED]
 : For additional commands, e-mail: [EMAIL PROTECTED]
 :
 
 --
 Brendan McKenna
 Technical Director  Phone: +353-(0)61-338177 x4143
 W3 Services Ltd.  Fax: +353-(0)61-338065
 Innovation Centre   Email: [EMAIL PROTECTED]
 National Technological Park
 Limerick
 Ireland

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




Re: Apache::ASP problem with post data

2000-12-06 Thread Joshua Chamas

Luc Willems wrote:
 
 hello ,
 
 i'm working on a project that involves some XML-RPC system. The idea is
 to POST a XML to a ASP script which will than process this
 and return a XML back to the client.
 
 To do that a send sommething like this (output from ethereal dump) :
 
 POST /cp-bin/rc2.asp HTTP/1.0
 Host: linux
 User-Agent: libwww-perl/5.36
 Content-Length: 156
 Content-Type: text/xml
 
 ?xml version="1.0"?
 methodCall
 methodNameexamples.getStateName/methodName
 params
 paramvaluei41/i4/value/param
 /params
 /methodCall
 
 The problem now is , that in the asp script i get a Totalbytes of 156
 bytes but the content string is empty ?
 

I don't know why this is happening.  Everything looks like it
should work fine.  Can you write a mini Apache::Registry script
with the same call to it, and do:

   print Apache-content();

In Apache::ASP, content is initialized like:

   $self-{content} = $r-content();

very straightforward, so if the above shows content, but
Apache::ASP isn't getting any, I'll be a little stumped.
Also, what is the output from:

 %= $Request-BinaryRead() %

which should return all of the output.  Your other code should
have worked, but just in case.  BinaryRead w/o a length just
returns all of it.

This shouldn't be the problem, but is there the chance that
there is something else calling $r-content() first?  Maybe
some other code in another PerlHandler stage?  This should
not be the problem because one would expect your script to hang
in this case, but again I'm a bit stumped.

-- Josh

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

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




Re: Apache::ASP (QueryString eats +)

2000-11-28 Thread Joshua Chamas

sergen wrote:
 
  When sending text with "+" by "?" on url $Request-QueryString eats
 "+" (the text is absolutely the same but only this sign).
Is it a bug or may be some else ?
 
using: Mandrake 7.2
 Apache 1.3.14-2mdk
apache-mod_perl 1.3.14_1.24-2mdk
Apache-ASP 2.002mdk
httpd-perl (proxied)
 

Apache::ASP doesn't kill the + in a query string when parsing,
but mod_perl might?  Check out what you get in Apache-args
which is where Apache::ASP gets the query string from before
parsing.  You can do a %= Apache-args % in an ASP script.

Apache::ASP does escape + to ' ', space, and if you really want
to have a + in your URL, you will want to escape it with 
$Server-URLEncode($data), or $Server-URL($url, \%params)

--Joshua

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

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




Re: Apache::ASP (QueryString eats +)

2000-11-21 Thread Stephen Beitzel

On 21 Nov, sergen wrote:
 
  When sending text with "+" by "?" on url $Request-QueryString
  eats
 "+" (the text is absolutely the same but only this sign).
Is it a bug or may be some else ?
 
using: Mandrake 7.2
 Apache 1.3.14-2mdk
apache-mod_perl 1.3.14_1.24-2mdk
Apache-ASP 2.002mdk
httpd-perl (proxied)
 
If someone know what to do pls send a sign, thnks

Note that URL encoding treats the symbol '+' as the URL encoded version
of the symbol ' ' (space, ASCII 32). The sequence of characters you need
to include in a query string in order to have your script interpret it
as the symbol '+' is '%43'.

Your problem report isn't exactly clear on what you mean by "eats", but
this may be your trouble.

HTH

Steve


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




Re: Apache::ASP

2000-11-20 Thread Joshua Chamas

[EMAIL PROTECTED] wrote:
 
 Hi,
 
 I've got a problem with Apache::ASP. I've installed according to the install doc 
with all the needded modules ( using CPAN).
 
 When I try to use the /eg/ directory it gives me the following.
 
 #!/usr/local/bin/perl5 asp
 {PRIVATE}{HYPERLINK "%=$_-"}[0]% ({HYPERLINK 
"source.asp?file=%=$_-"}[0]%source)
 
 Can anyone please help me?
 

You have either not installed Apache::ASP/mod_perl correctly,
or you have not activated Apache::ASP to run the files in /eg/
which is more a general Apache config issue.  Make you you did
what's at

  http://www.apache-asp.org/install.html#Quick%20Start

--Joshua

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

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




Re: Apache::ASP and Frontpage extensions

2000-11-12 Thread G.W. Haywood

Hi there,

On Tue, 7 Nov 2000, Garth Parfitt wrote:

 I still cannot run a particular script that runs perfectly well
 under Microsoft IIS 4.0.

In what language is this script written?

73,
Ged.




Re: Apache::ASP

2000-11-08 Thread Joshua Chamas

What's your error log say?  Often your solution lies
there.  -- Joshua

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

danfromtitan wrote:
 
 Hi there
 
 I'm running Apache 1.3.14 on a redhat 6.1 machine.
 I've installed apache from the souce files, then every
 other modules are needed for a succesfull istallation
 of Apache::ASP module. Finaly the ASP module
 instalation worked fine (the "install test" was ok).
 
 My problem is that when I try to run the asp example
 included in the packet, the server tells me there is
 an internal error. Thi is happening with every other
 asp page.
 
 Could you tell me please what else should I configure?
 The ones in asp README (like PerlHandler or
 PerlSetVar) make the httpd to give error messages and
 it doesn't work.
 
 Thank you very much.
 
 Dan
 
 __
 Do You Yahoo!?
 Thousands of Stores.  Millions of Products.  All in one Place.
 http://shopping.yahoo.com/



Re: Apache::ASP/Solaris 2.7 - session locking issues

2000-11-07 Thread G.W. Haywood

Hi there,

On Tue, 7 Nov 2000, Daniel Little wrote:

 Has anyone had any problems with failure to write locks on Apache:ASP 
 under Solaris or any other platform?

I just grepped one of my logfiles (a small one, about 70 megabytes:)
and there was no occurrence of this message.  Linux 2.2.16, Perl
5.6.0, Apache 1.3.12, mod_perl 1.24, ASP 0.19 (yes, 0.19).  I did it
on this log because it's the only server (in development) I've got
which is running 5.6.0.

Solaris does funny things sometimes, but I think Josh might have
something to say about this one if you're patient.

73,
Ged.




Re: Apache::ASP/Solaris 2.7 - session locking issues

2000-11-07 Thread Daniel Little

From: "G.W. Haywood" [EMAIL PROTECTED]

 On Tue, 7 Nov 2000, Daniel Little wrote:
 
  Has anyone had any problems with failure to write locks on 
 Apache:ASP 
  under Solaris or any other platform?
 
 I just grepped one of my logfiles (a small one, about 70 megabytes:)
 and there was no occurrence of this message.  Linux 2.2.16, Perl
 5.6.0, Apache 1.3.12, mod_perl 1.24, ASP 0.19 (yes, 0.19).  I did it
 on this log because it's the only server (in development) I've got
 which is running 5.6.0.

There are only two things different to that on our environment - ASP 
2.03 (instead of 0.19 - ouch!) and Solaris 2.7 (instead of Linux 
2.2.16). All the rest are the same (and we're on a Sparc - I presume 
yours is Intel?). 

 Solaris does funny things sometimes, but I think Josh might have
 something to say about this one if you're patient.

Sure, I can wait for Josh's response. We had to backout our Solaris 
version this A.M. due to these problems. Note, we did find the problem 
with the form variables that were just showing up as plain incorrect. 
All I can say is 'use strict;' - it pays. I had some difficulties 
with 'use strict;' on NT about a year ago and when we moved the 
platform to UNIX, had a number of issues around variables getting 
clobbered, getting lost entirely, etc., and switching to using strict 
with all variables assigned in the ASP script solved the problems. I 
guess that's what I get for practicing unsafe code practices... ;)

Anyway, thanks for the response. I think we're going to have to build a 
load test platform to reproduce the bugs without going live. Most of 
these problems did not show up in more than three months of testing the 
environment. Sigh. 

Daniel.


begin:vcard
n:Little;Daniel
fn:Daniel Little
tel;cell:(204) 955-0300
tel;fax:(204) 487-6680
tel;work:(204) 837 5503
url:http://www.metrex.net
org:Metrex Systems Consulting Inc.;
version:2.1
email;internet:[EMAIL PROTECTED]
title:President
end:vcard




Re: Apache::ASP/Solaris 2.7 - session locking issues

2000-11-07 Thread G.W. Haywood

Hi Daniel,

On Tue, 7 Nov 2000, Daniel Little wrote:

 we're on a Sparc - I presume yours is Intel?

Yes.  Er, well, AMD K6-2/450 in that case.

 All I can say is 'use strict;'

Like it says in the Guide :)

 Anyway, thanks for the response. I think we're going to have to
 build a load test platform to reproduce the bugs without going
 live. Most of these problems did not show up in more than three
 months of testing the environment. Sigh.

Nothing like going live to test a system.  I think I may have
mentioned that before...

73,
Ged.




Re: Apache::ASP/Solaris 2.7 - session locking issues

2000-11-07 Thread Joshua Chamas

Daniel Little wrote:
 
 Has anyone had any problems with failure to write locks on Apache:ASP
 under Solaris or any other platform? Getting quite a number of the
 following in the log files...
 
 [Tue Nov  7 10:23:11 2000] [error] [asp] [6708] [error] can't write
 lock /usr/apache/asp.global/.state/57/57d8991eb40ed4d6e886304ac5806101.l
 ock: Bad file
 number, /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 4670
 
 ...but not very consistent. Most of the time, it works just fine.
 

There are a few race conditions that could contribute to this state. 
One is fixed by the Apache::ASP v2.0x releases, and another 2
is covered by my development version 2.07 which I am about to release.
If you would like to test this ahead of time, before it reaches CPAN
in the next couple days, that would be great.  Just let me know and
I'll send it separately.

--Joshua

 When it does fail, it seems to trigger a bug in the UnLock module in
 that the global $UNLOCK value gets set to LOCK_SH|LOCK_EX (which is
 invalid) in the code that is commented as being written for QNX. For
 some reason, Fcntl::FUNLCK is returning LOCK_SH|LOCK_EX on Solaris, and
 the next time the module attempts to unlock a lock file, the call to
 flock($file, ($UNLOCK || LOCK_UN)) [line 4687 or thereabouts] fails
 with an 'Invalid argument' error.
 
 Anyway, ending up with some really weird issues using ASP on Solaris.
 We have one code base for a client that is used on both NT and Solaris
 (spent a fair bit of time getting that to work). But now, even some
 form values in the Solaris version appear to be getting corrupted
 somehow. For some unknown reason, a form that is submitted is getting a
 key value that is not at all what is in the form - it almost appears to
 be coming from another instance of the same form from another user on
 the system at the time.
 
 We're using the latest version of the ASP code so if anyone has any
 ideas, it would be most useful. Thanks in advance!
 
 Daniel.



Re: Apache::ASP + Apache::Filter - how fast? (was:sending Apache::ASPoutput to a variable?)

2000-10-31 Thread Joshua Chamas

Jeff Ng wrote:
 
 Turns out that speed is not the only problem...
 
 I'm having some form submission problems when I chain modules like so:
 PerlHandler inFilter Apache::ASP
 
 If I call $r-content in inFilter, Apache::ASP just hangs.  Has anyone seen
 this before?
 
 Could it be because Apache and mod_perl were installed from RPMs?  I'll do a
 rebuild this weekend to check.
 

This is common in chaining and module cooperation because
$r-content is a one time event, as the content gets consumed
on the first read.  What you can do is use Apache::ASP first
and your module second, no prob, because in Apache::ASP, I cache
the input and retie STDIN, so other environments, like CGI
can be initialized without interfering.

So it should work the other way around at least. I might also 
try creating creating a subclass of the apache request object, 
and override content to make it reusable.  I don't even know if 
its possible, but its worth looking into.

This is a common problem to chaining, filtering, and using
different environments at the same time.  If you repost
this as a more generic mod_perl problem, you may get 
more diverse responses.

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



Re: Apache::ASP question: undefined subroutines

2000-10-31 Thread Joshua Chamas

Carl Lipo wrote:
 
 Does anyone know what causes these kinds of errors? The 'subroutine' that
 the output is referring to is the name of the page (in this case
 search.htm) that is being loaded and that sits in the content directory --
 there are no real missing subroutines...Maddeningly, if I hit reload
 enough times the page will finally load at some point and then error a few
 reloads later.
 
 The page (search.htm) sits on an NFS mount (could that be a problem?).
 
 Errors Output
 
 1.Undefined subroutine
 InterNAP::NFT::_home_staff_carl_htdocs_apps_nft_search_htmxINL called at
 /usr/local/lib/site_perl/Apache/ASP.pm line 1395. ,
/usr/local/lib/site_perl/Apache/ASP.pm line 1397
 

Somehow, your perl sub that is the compiled version of a page gets
undefined.  In order to track down the problem, set Debug to -1,
and get me the error_log output ( in a private email ) from 
a fresh server start until the error occurs.  I need to see
how the subroutine is being undefined, and whether Apache::ASP
might be responsible for this.

You can also try my latest dev release to see if that helps,
but I don't think we'll be solving the real problem if we did
that.  What version are you running BTW?

--Joshua

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



Re: Apache::ASP + Apache::Filter - how fast? (was:sending Apache::ASPoutput to a variable?)

2000-10-26 Thread Joshua Chamas

Jeff Ng wrote:
 
 Thanks Ged.  I started down that path, but found that Apache::Filter
 combined with Apache::ASP basically does the job I need.  There are a few
 limitations, but it should be good enough.  The only remaining concern is
 speed.
 
 Does anyone have experience with this setup?
 

No real world experience, but in the lab it seems speedy enough,
but then it all depends on what you need to get out of it.
Your own performance analysis will be the best here.
I would recommend cranking on it with ab for a rough 
estimate.

One fundamental limitation with this setup is how I/O is
buffered, that you can't ever send a trickle down to 
the web client, its all or none.

--Joshua



Re: Apache::ASP problems with Global, global.asa, 'use lib' and @INC

2000-10-24 Thread Joshua Chamas

[EMAIL PROTECTED] wrote:
 
 The problem is that I specify a dirname for the Global perl var on my httpd.conf and 
Apache::ASP fails to push it on @INC. This problem is circumvented if I create a 
global.asa file (even an empty one) in the directory I specify for the Global var. If 
I do this then the path is correctly pushed onto @INC.
 
 It took me a while to discover the global.asa trick. I think this is a bug because 
global.asa should always be optional on ASP apps.
 

Good point.  In my latest dev release 2.05, Global is added to @INC 
during every script compilation, just for that compilation.

 Other problem I found is that pushing another path onto @INC by way of "use lib 
$new_path;" doesn't work properly. The "use lib" is executed but it only modifies 
@INC the first time the script is executed,  and is then ignored on succesive 
invocations of the same script on the same httpd process.
 

Right, this is the way modperl works.  If you want @INC
to stay a certain way, you should modify it prefork in 
the parent.  Even then, I'm not sure it'll stay that way,
test it out! 

Let me know if you want my latest dev release for Apache::ASP.
Its very stable.  I'm glad to see a fellow Cardinal working
with modperl, class '97 myself.

--Joshua



Re: Apache::ASP cookieless sessions question

2000-10-15 Thread Joshua Chamas

Shimon Rura wrote:
 
 Hi, Throughout my web pages I provide a link for the user to login, which
 goes to a username/password check which then forwards the user back to the
 original page where he clicked "login".  The login link is implemented with:
 
 a href="/user/login?return_url=%=$Server-URLEncode($ENV{REQUEST_URI})%"
 login
 /a
 
 And of course /user/login (an ASP script) will eventually
 $Response-Redirect() the client to the original URL.  The only problem is
 that if a client's browser has cookies disabled, the ?session-id=blah
 doesn't get encoded into their URL (thanks to SessionQueryParse) when they
 first type it the URL.  So if they type "www.foo" and click login, it just
 takes them back to "www.foo" without preserving the session-id, and it looks
 like they haven't logged in at all (and indeed they are running under a
 different session-id).  If they load "www.foo" and click on a link which I
 typed in as "www.foo" they stay in the same session because the link becomes
 "www.foo?session=blah".  Then logging in works fine.
 

SessionQueryParse runtime session-id insertion into query strings
to handle cookieless clients should cover $Response-Redirect() URLs
too.  The problem is that you are redirecting to an absolute URL, 
where the matching algorithm normally covers only links relative
to the current server.  The solution is to configure SessionQueryParseMatch
with a regexp that matches URLs that you also want session-ids inserted 
into, so you can handle what the user typed in.

 The other related problem is that when a client that allows cookies visits a
 page for the first time, all their link URLs have session-ids parsed into
 them unnecessarily.
 

There is an optimization that if the client presents any cookies at
all, then the session-ids won't be inserted into URLs.  So in 
Script_OnStart, you can check for a permanent cookie, and if the client 
doesn't have it, then set one.  Then all subsequent visits, the client will 
not have session-id's parsed in.  Also, you can provide a "cookie shield"
for your site, by marking a value in $Session, like $Session-{CookiesOn} = 1
and if set do nothing, otherwise, set, and redirect to current URL; with
SessionQueryParse enabled, this should be simple logic, as they will
always have a session-id on the next request, and that value will be marked.

 This is the method that I have in mind that I think would resolve these
 issues.  A hit to a web page with session tracking does this:
 
 Hit to "www.foo/bar".  If client delivers session-id cookie, deliver plain
 page for cookied clients.  If query string contains session-id, deliver a
 page with session-ids parsed into links for cookieless clients.  If client
 delivers no cookie and session-id is not in URL, set cookie and redirect to
 self-URL with session-id parsed in.
 

I think it is better to do these things per site, as redirects
do not cover form based scenarios, as form POST input will be lost,
so its not a truly generic solution.  It may be that a site running
SessionQueryParse will want to handle form requests on the first
incoming request, I think the better hack is setting the permanent
cookie.

 The perfect solution would be to redirect the client to the self-URL without
 the session-id in their query string when *both* a cookie is sent and a
 session-id is in the query string.  Combined with the method above, this
 would result in a cookied browser doing:
 
 1. user types "www.foo", server receives no cookie
 2. server sends cookie and forwards to "www.foo?session-id=blah"
 3. server receives cookie and forwards to "www.foo"
 4. server delivers plain "www.foo"
 

That's a lot of requests to serve up a first page to a site.
Average content web sites have something like 2-3 page requests 
per user, and we are creating 3 request just for the first hit,
doubling the number of requests necessary to handle the user.
I think the logic here is simple if you want to implement it,
but I worry about it being a generic solution.

# assumes SessionQueryParse enabled
sub Script_OnStart {
  # use permanent cookie for a hint, if available
  unless(%{$Request-{Cookies}} || $Session-{CookiesOn}) {
$Session-{CookiesOn} = 1;
$Response-{Cookies}{Perm} = { Value = 1, Expires = 86400 * 365 };
$Response-Redirect(
$Server-URL(
File::Basename::basename($0), 
$Request-{QueryString)
)
);
  }
}

If SessionQueryParse weren't enabled, then for a cookieless
client, this solution would loop infinitely, and there needs
to be other logic enabled to make this happen.

 So... can I make these sorts of things happen?  Should I care?  Is there a
 way I can find out whether the user's browser is cookied for session-id from
 within the ASP script?
 

I think the SessionQueryParseMatch will be key for you, as well
as the permanent cookie trick. 

 p.s. Apache::ASP is great!  I love it!  What a timesaver and so easy to 

Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread Joshua Chamas

$Request-QueryString-('foo')-Item() isn't valid perl syntax, 
is it?  Are you going for $Request-QueryString('foo')-Item() 
support here?

There is already a Collection class that is used to emulate 
this kind of behavior, which can possibly be extended to 
meet this need.  One of the behaviors that this interface
supports is:

  $Request-QueryString-Item('foo')

Do you really need the above interface?  If so, I'll need
to create a config setting I imagine as there will be
a significant performance impact do doing something 
like you suggest.

--Joshua


"joel w. reed" wrote:
 
 I'm trying to write an ASP app that runs under PerlScript and Apache::ASP.
 
 i've found that with ActivePerl 618 -- $Request-QueryString-('foo')
 return a reference to a Win32::OLE hash.
 
 to get a string from the hash you must write --
 $Request-QueryString-('foo')-Item()
 or you must use one of the hacks in the OLE.pm docs that come with ActivePerl.
 
 $Request-QueryString-('foo')-Item() however doesn't work
 under Apache::ASP. so i'm wondering if something like the patch
 below would improve compatibility without hurting performance
 too much.
 
 comments? suggestions? i know the patch below would need work
 to support the "array of values" ASP thing...
 
 --- /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pmTue Aug  1 19:42:18 2000
 +++ /home/jreed/tmp/ASP.pm  Mon Oct  9 16:30:21 2000
 @@ -2640,6 +2640,25 @@ sub ScriptOnFlush {
 
  1;
 
 +package Apache::ASP::QsObj;
 +
 +sub new {
 +my $class = shift;
 +my $self = {};
 +$self-{str} = shift;
 +
 +bless $self, $class;
 +return $self;
 +  };
 +
 +sub Item()
 +  {
 +my $self = shift;
 +return $self-{str};
 +  }
 +
 +1;
 +
  # Request Object
  package Apache::ASP::Request;
 
 @@ -2794,7 +2813,11 @@ sub Form
  sub FileUpload
{ shift-{FileUpload}-Item(@_) }
  sub QueryString
 -  { shift-{QueryString}-Item(@_) }
 +  {
 +my $self = shift;
 +my $key = shift;
 +return new Apache::ASP::QsObj($self-{QueryString}-Item($key));
 +  }
  sub ServerVariables
{ shift-{ServerVariables}-Item(@_) }
 
 
 --
 
 Joel W. Reed412-257-3881
 --All the simple programs have been written.
 
   
--
Part 1.2Type: application/pgp-signature



Re: Apache::ASP - RH install tip

2000-10-09 Thread Joshua Chamas

I'll add this fix to the error messaging for Apache::ASP.  
Thanks for figuring out an alternative solution.

-- Joshua

Tyler Vallillee wrote:
 
 A tip that may fix somebody else's problems.  My system is RH 6.2 and I
 installed Apache and mod_perl from RPM's (please no flames :)
 
 Upon installing Apache::ASP I got the dreaded SCALAR error in my error log
 when testing the site/eg directory:
 -
 no valid request object (Apache=SCALAR(0x831a48c)) passed to ASP handler;
 if you are getting
 this error message, you likely have a broken DSO version of mod_perl
 which often occurs when using RedHat RPMs.  The fix here is to compile
 statically the apache + mod_perl build.  Please check FAQ or mod_perl
 archives for more information.
 
 
 Looking at the default httpd.conf entries, the /perl directory handler is
 missing a VERY important line: PerlSendHeader On
 
 When I added this line, the examples worked perfectly!
 
 Here is my mod_perl Location entry from httpd.conf:
 Alias /perl/ /home/httpd/perl/
 Location /perl
 SetHandler perl-script
 PerlHandler Apache::Registry
 PerlSendHeader On
 Options +ExecCGI
 /Location
 
 I am not sure how the FAQ gets updated, but this may be a worthwhile
 update.
 
 Tyler
 
 

--



Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread Greg Williams

At 14:23 -0700 2000/10/09, Joshua Chamas wrote:
$Request-QueryString-('foo')-Item() isn't valid perl syntax,
is it?


perl -c
$Request-QueryString-('foo')-Item()
__END__
- syntax OK

;-)

.g
-- 
Greg Williams, Cnation, (310) 228-6924
"Wow, no intel, no microsoft, sounds like a computer
  that might... dare I say it... work!"  -LHB



Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread Joshua Chamas

Greg Williams wrote:
 
 At 14:23 -0700 2000/10/09, Joshua Chamas wrote:
 $Request-QueryString-('foo')-Item() isn't valid perl syntax,
 is it?
 
 perl -c
 $Request-QueryString-('foo')-Item()
 __END__
 - syntax OK

When I execute $Request-Form-('test')-Item()
on a real life code sample, even after building in 
support for $Request-Form('test')-Item(), I get
this error:

  Not a CODE reference at (eval 14) line 10.

I have seen this error before with this syntax...
is this really supposed to work?  I thought it
was not supposed to be supported by perl.  I saw
that it passed compilation, but perl saves some things
for runtime checking.  It works in VBScript because
that language has the notion of a default method for
an object class to cover these instances.

Note, with my current patch to the system, 
$Request-Form('something') no longer works when 
the config PerlSetVar CollectionItem 1 is set.  The
syntax that gets supported is $Request-Form('something')-Item() 
instead.  I was able to hack it so that
$Request-Form-Item('something') works either way.

When CollectionItem is set, reading Form like above
returns a bless ref to a hash like { Item = 'value' }
so that $Request-Form('something')-Item() could also
be written as $Request-Form('something')-{Item}

The config is used to maintain backwards compatibility
with regular faster $Request-Form('something') usage.  
$Request-{Form}{something} will continue to work 
in either case as well for the fastest access albeit
without any error checking that Form is a valid 
Collection for Request.

--Joshua



Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread joel w. reed

On Oct 09, [EMAIL PROTECTED] contorted a few electrons to say...
Joshua $Request-QueryString-('foo')-Item() isn't valid perl syntax, 
Joshua is it?  Are you going for $Request-QueryString('foo')-Item() 
Joshua support here?

yes $Request-QueryString('foo')-Item() seems to be the way AP618
wants you to convert the WIN32::OLE object to a perl string as in:

my $uid = $Request-QueryString('foo')-Item();

without the item it fails horribly in PerlScript.

Joshua 
Joshua There is already a Collection class that is used to emulate 
Joshua this kind of behavior, which can possibly be extended to 
Joshua meet this need.  One of the behaviors that this interface
Joshua supports is:
Joshua 
Joshua   $Request-QueryString-Item('foo')

which wouldn't work unfortunately for winblows without

$Request-QueryString-Item('foo')-Item()

Joshua 
Joshua Do you really need the above interface?  If so, I'll need
Joshua to create a config setting I imagine as there will be
Joshua a significant performance impact do doing something 
Joshua like you suggest.

really? that's a bummer. the only other option is to 
throw 

use Win32::OLE qw(in valof with OVERLOAD);

in the ASP pages when they are running under ActivePerl.
which kind of sucks too. (the above is found in the ActivePerl
docs for WIN32::OLE).

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread Joshua Chamas


So what you are saying is that either this:

 my $uid = $Request-QueryString('foo')-Item();
 or this 
 $Request-QueryString-Item('foo')-Item()

works natively in PerlScript.  I see, so with the 
CollectionItem Apache::ASP config, I will enable the 
latter to work too.

The other way around from what you are telling me is
in IIS/PerlScript

 use Win32::OLE qw(in valof with OVERLOAD);

which makes things like $Request-QueryString('foo')
work compatible with Apache::ASP.  This is right because
when I implemented the Apache::ASP functionality I was
working to be compatible with above setting.  I believe
that you also need to use the above to get $Session-{item}
functionality which is also native to Apache::ASP.

So either way you are going to have a special config for 
this.  I don't mind putting it in, but it can't be both
ways at the same time unfortunately.

I'll send you a copy which does this separately.

-- Joshua



Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread Daniel Chetlin

On Mon, Oct 09, 2000 at 05:03:44PM -0700, Joshua Chamas wrote:
 When I execute $Request-Form-('test')-Item()
 on a real life code sample, even after building in 
 support for $Request-Form('test')-Item(), I get
 this error:
 
   Not a CODE reference at (eval 14) line 10.
 
 I have seen this error before with this syntax...
 is this really supposed to work?  I thought it
 was not supposed to be supported by perl.  I saw
 that it passed compilation, but perl saves some things
 for runtime checking.  It works in VBScript because
 that language has the notion of a default method for
 an object class to cover these instances.

Those syntaxes are saying two separate things.

$Request-Form('test')-Item() calls the method `Form' on the object
`$Request' with argument `test', and calls the method `Item' with no
arguments on the result.

$Request-Form-('test')-Item() calls the method `Form' on the object
`$Request' with no arguments, and calls the return value as a subroutine
with argument `test'. Thus, if `Form' doesn't return a coderef, it will
crash and burn.

-dlc



Re: Apache::ASP / memory leak?

2000-10-06 Thread Joshua Chamas

Jim Turner wrote:
 
 Greetings,
 
 I am using Apache 1.3.9 on Linux kernel 2.0.36 using
 ApacheASP wrapped around my CGI scripts.  I have the following
 test script which works fine unless I declare the array variable
 "v" as "my @v".  This causes massive memory consumption in that
 much more memory is allocated each time the script is run, even
 though only 2 instances are actually run.  If "v" is NOT declared
 as "my", it seems to work fine (1st 2 invocations load up and
 scarf up memory, but after that, things run fine).  Can anyone
 tell me why this is?
 

I'm not sure why in this case as your code below 
looks fine.  I would advise though that you move
your subroutine into a perl module or your 
global.asa, as subroutines in ASP scripts can
be tricky because an ASP script itself is compiled
as a subroutine, and variable scoping problems 
can result.  See my closure problems in the
modperl guide http://perl.apache.org/guide
which Apache::ASP shares with Apache::Registry.

 --
 Here is my ASP file:
 --
 %
 
 !--#include file=test--
 
 %

BTW, this use of the include mechanism was never
intended to work by me, and am well impressed that you 
came up with another use!  Beautiful.  More below.

 --
 Here is my test script (runs as CGI, FAST-CGI, and ASP):
 --
 #!/usr/bin/perl
 
 if ($0 =~ /\.asp/i)
 {
 $runtype = 2;  #RUNNING AS ASP!
 }
 elsif ($0 =~ /\.fpl/i)
 {
 $runtype = 1;  #RUNNING AS FAST-CGI!
 }
 else
 {
 $runtype = 0;  #RUNNING AS REGULAR CGI!
 }
 
 require 'global.asa';
 

You only need to require global.asa if you are
not running as an ASP script, as Apache::ASP 
effectively does this for you.

BTW, it looks like you are setting up a benchmarking
testbed on your server.  I would be interested 
in how you find FastCGI to perform against 
Apache::ASP.  If you are up for running the hello world
tests, you can add some data to what we have at
  http://www.chamas.com/bench/

Note one of the advantages of Apache::ASP is its
rich object API, which incurs some overhead setting
up, so there is an ease of development vs. performance 
trade-off here.  You will find for example that 
Apache::Registry scripts run CGIs faster than
Apache::ASP will because of this overhead.  If you 
just want CGI emulation, I would stick with Registry.

--Joshua

 srand($$);
 my ($randpid) = $$;
 
 $mainloop = 0;
 mainloop:  while ($runtype != 1 || new CGI::Fast)
 {
 last  if ($mainloop  $runtype != 1);
 ++$mainloop;
 ++$runcnt;
 $randpid = int(rand());
 Home();
 }
 
 sub Home
 {
 print CGI::header()  unless (shift);
 
 print "BRPID=$$= rc=$runcnt=\n";
 my @v = ();
 for (my $i=0;$i=15;$i++)
 {
 push (@v, $i);
 }
 print "BR1st=$v[0]= last=$v[15]=\n";
 }
 
 --
 Here is my global.asa
 --
 use CGI::Fast qw(:standard);
 use CGI qw(:standard);
 
 sub Application_OnStart
 {
 }
 
 1;
 --




  1   2   3   4   >