You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by ju...@ndm.gov.on.ca on 2001/12/31 18:18:26 UTC

Apache::ASP vs IIS ASP

Hi:

I still consider myself a relative newbie to website development.  For
testing purposes, I have Apache 1.3.20 installed on my Win98 machine.  It
works fine.  I have installed ActiveState Perl and plan to install PHP4 too.
I have a client who is running IIS but because of my previous lack of
knowledge of ASP, I haven't used it.  I would like to know how similar
Apache::ASP is to ASP 3.  I would like to continue to use my current setup
for ASP development too but if there are too many differences between ASP 3
and Apache::ASP, I will have to install NT.

Jules

-------------------------------------------------------------------
Julian Rickards
Systems Officer
Information and Marketing Services
Ministry of Northern Development and Mines
Ph: (705) 670-5970   Fax: (705) 670-5754


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Apache::ASP vs IIS ASP

Posted by Sven Köhler <sk...@upb.de>.
> Hi:
>
> I still consider myself a relative newbie to website development.  For
> testing purposes, I have Apache 1.3.20 installed on my Win98 machine.  It
> works fine.  I have installed ActiveState Perl and plan to install PHP4
too.
> I have a client who is running IIS but because of my previous lack of
> knowledge of ASP, I haven't used it.  I would like to know how similar
> Apache::ASP is to ASP 3.  I would like to continue to use my current setup
> for ASP development too but if there are too many differences between ASP
3
> and Apache::ASP, I will have to install NT.
>
> Jules

There is PWS for Win98 (it's nearly the same as IIS for NT).
But i can warn u using PWS or IIS for NT4 in a production environment. I had
serious troubles with IIS4. IIS5 still seems to have improved stability.

I don't know, who manages your IIS WebServer but the one must know what he
does. The current heavily Spreading of virusses are a result of
misconfiguration.

Apache::ASP is only comparable to IIS-ASP with installed
ActivePerl-PerlScript-Feature. It is not the same, cause the Apache::ASP-API
has been enhanced with certain useful things. So don't expect anything from
Aache::ASP to work with IIS-ASP or the other way round.

PerlScript for IIS-ASP also wasn't very stable in older Versions and be
still have some bugs. VBScript and JScript are still the first choice for
doing IIS-ASP.



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Intermittent error in Included script

Posted by Joshua Chamas <jo...@chamas.com>.
"John D. Leonard II" wrote:
> ...
> WeekOfYear()is exported in ISG::CourseTools.  The ISG::CourseTools
> module was created using "h2xs" from the command line.  My module test
> script "t/weekofyear.t" works properly.  Here is the top of my module:
> ...

Sorry to take so long to get back to you on this.  I am still getting
caught up from the holidays!

The only thing I can think of is that maybe StatScripts was set to 0, but
I didn't see the config info in your Debug error_log output to confirm.
So make sure that PerlSetVar StatScripts 1 is set ( which is the default )...
If there was a global.asa compiled that did not import WeekOfYear, and 
StatScripts was set to 0 & then you added the WeekOfYear import to global.asa,
I could see how you might get this error if only intermittently.

If you continue to have problems with this, try to emails a bit of 
error_log with Debug set to -3 from a fresh server restart to this
problem occuring, that could help diagnose this better.

> > FYI, Global acts an an IncludesDir... IncludesDir is nice when
> > you want to share includes accross applications.
> 
> Does "IncludeDir" also apply to any and all "use" commands?
> 

No, just for including ASP includes.

> > If you are using StatINC or StatINCMatch settings, try
> > turning them off & see if that makes a difference.
> 
> StatINC is set to the default (0).  I explicitly set it and still get
> the same intermittent problem.
> 
> I'll keep plugging.
> 

Let me know if I can help any more.

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


RE: Intermittent error in Included script

Posted by "John D. Leonard II" <jo...@ce.gatech.edu>.
Joshua:

> > 
> > use HTML::TreeBuilder;
> > use ISG::CourseTools;
> > 
> 
> In what package is WeekOfYear() defined and how it is 
> supposed to be exported into the global.asa package?  Is it 
> using Exporter? Make sure that the package that defines 
> WeekOfYear() and exports it is used in global.asa so the 
> import of WeekOfYear() can occur. Also make sure that 
> WeekOfYear is being explicitly exported.

WeekOfYear()is exported in ISG::CourseTools.  The ISG::CourseTools
module was created using "h2xs" from the command line.  My module test
script "t/weekofyear.t" works properly.  Here is the top of my module:

===================================
package ISG::CourseTools;

require 5.005_62;
use strict;
use warnings;

require Exporter;
use AutoLoader qw(AUTOLOAD);

use Time::Local;
use Time::localtime;

our @ISA = qw(Exporter);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

# This allows declaration       use ISG::CourseTools ':all';
# If you do not need this, moving things directly into @EXPORT or
@EXPORT_OK
# will save memory.
our %EXPORT_TAGS = ( 'all' => [ qw(
        WeekOfYear
) ] );

our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );

our @EXPORT = qw(
        WeekOfYear
);

================================

> FYI, Global acts an an IncludesDir... IncludesDir is nice when 
> you want to share includes accross applications.

Does "IncludeDir" also apply to any and all "use" commands?

> If you are using StatINC or StatINCMatch settings, try 
> turning them off & see if that makes a difference.

StatINC is set to the default (0).  I explicitly set it and still get
the same intermittent problem.

I'll keep plugging.

JL


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Intermittent error in Included script

Posted by Joshua Chamas <jo...@chamas.com>.
"John D. Leonard II" wrote:
> 
> 2) Intermittently, the script works, or fails with a "Undefined
> subroutine" error associated with "WeekOfYear"
> 
> 3) The subroutine "WeekOfYear" is contained in a handrolled PM file.  On
> this server I don't have admin access, so I'm PUSHing the location of
> the PM file onto the INC using the following code in my global.asa:
> 
> ==========
> 
> BEGIN{
>   push @INC,"/export/admin/jleonard/globals/ISG/CourseTools/blib/lib";
> }
> 
> use HTML::TreeBuilder;
> use ISG::CourseTools;
> 
> ==========
> 
> My Script_OnStart, etc. are empty.
> 

In what package is WeekOfYear() defined and how it is supposed to be
exported into the global.asa package?  Is it using Exporter?
Make sure that the package that defines WeekOfYear() and exports
it is used in global.asa so the import of WeekOfYear() can occur.
Also make sure that WeekOfYear is being explicitly exported.

Instead of BEGIN {}, try using "use lib qw(/path/)" for the 
same effect.  This is not related to your problem, just cleaner.

> 4) I'm running mostly defaults in the .htaccess file:
> 
> PerlSetVar Global  /export/admin/jleonard/globals/200202
> PerlSetVar IncludesDir /export/admin/jleonard/globals/common
> PerlSetVar StateDir /tmp/200202
> 

FYI, Global acts an an IncludesDir... IncludesDir is nice when 
you want to share includes accross applications.

If you get to the end of the line, and you need to make this work
try something like this in global.asa:

use Package;
*WeekOfYear = *Package::WeekOfYear;

This is by no means ideal, but if this works, and nothing else 
does, this may give us some clues.

If you are using StatINC or StatINCMatch settings, try turning
them off & see if that makes a difference.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Intermittent error in Included script

Posted by "John D. Leonard II" <jo...@ce.gatech.edu>.
All:

1) I'm getting an intermittent error while executing a script.  Here is
the code:

#==================================
<h1>Test</h1>
<%
print <<EOF;
The following is a test of ASP and the
use of a handrolled PM file NOT on the perl/site path.<P>
EOF

print "Current week of year: " . WeekOfYear();
print "Week of year for May 1, 2002: " . WeekOfYear(2002,5,1);
print "<p>";

%>
# =====================================

2) Intermittently, the script works, or fails with a "Undefined
subroutine" error associated with "WeekOfYear"


3) The subroutine "WeekOfYear" is contained in a handrolled PM file.  On
this server I don't have admin access, so I'm PUSHing the location of
the PM file onto the INC using the following code in my global.asa:

==========

BEGIN{ 
  push @INC,"/export/admin/jleonard/globals/ISG/CourseTools/blib/lib";
}

use HTML::TreeBuilder;
use ISG::CourseTools;

==========

My Script_OnStart, etc. are empty.

4) I'm running mostly defaults in the .htaccess file:

PerlSetVar Global  /export/admin/jleonard/globals/200202
PerlSetVar IncludesDir /export/admin/jleonard/globals/common
PerlSetVar StateDir /tmp/200202

PerlSetVar Debug -3
PerlSetVar TimeHiRes 1
PerlSetVar UseStrict 1

5) Here is a log dump when the script works:

[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4429;0.0000] RUN ASP (v2.29) for
/export/services/apache/sites/classes/200202/coe1361/home.htm
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4450;0.0021] GlobalASA package
Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asax
88403fa5e7f51debcc2e57acb88be3c0
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4481;0.0031] parse file home.htm
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4491;0.0010] parsing home.htm
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4528;0.0037] undefing sub
Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asax
88403fa5e7f51debcc2e57acb88be3c0::__ASP_NoCache code CODE(0x10be31c)
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4539;0.0011] compiling into package
Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asax
88403fa5e7f51debcc2e57acb88be3c0 subid
[Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asa
x88403fa5e7f51debcc2e57acb88be3c0::__ASP_NoCache]
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4602;0.0063] Script_OnStart
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4612;0.0010] executing Script_OnStart
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4641;0.0029] executing __ASP_NoCache
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4684;0.0043] Script_OnEnd
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4694;0.0010] Script_OnFlush
[Thu Jan  3 12:48:42 2002] [error] [asp] [15940] [debug]
[1010080122.4705;0.0011] page served in   29.15 milliseconds

6) Here is a log dump when the script fails:

[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1709;0.0000] RUN ASP (v2.29) for
/export/services/apache/sites/classes/200202/coe1361/home.htm
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1731;0.0022] GlobalASA package
Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asax
88403fa5e7f51debcc2e57acb88be3c0
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1765;0.0034] parse file home.htm
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1775;0.0010] parsing home.htm
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1813;0.0038] undefing sub
Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asax
88403fa5e7f51debcc2e57acb88be3c0::__ASP_NoCache code CODE(0xa89e48)
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1824;0.0011] compiling into package
Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asax
88403fa5e7f51debcc2e57acb88be3c0 subid
[Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asa
x88403fa5e7f51debcc2e57acb88be3c0::__ASP_NoCache]
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1886;0.0062] Script_OnStart
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1896;0.0010] executing Script_OnStart
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1923;0.0027] executing __ASP_NoCache
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [error] Undefined
subroutine
&Apache::ASP::Compiles::_export_admin_jleonard_globals_200202_global_asa
x88403fa5e7f51debcc2e57acb88be3c0::WeekOfYear called at home.htm line
18. <--> , /usr/local/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1560
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1951;0.0028] Script_OnEnd
[Thu Jan  3 12:48:50 2002] [error] [asp] [16009] [debug]
[1010080130.1962;0.0011] ASP Done Processing - asp:
Apache::ASP=HASH(0xd9b124); 

Any clues?

JL


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org