Apache :: ASP

INTRO
INSTALL
CONFIG
SYNTAX
EVENTS
OBJECTS
SSI
CGI
PERLSCRIPT
FAQ
TUNING
CREDITS
SUPPORT
SITES USING

EXAMPLES

Powered by ModPerl & Apache
FAQ

The following are some frequently asked questions about Apache::ASP.


What is the best way to debug an ASP application ?
Apache errors on the PerlHandler directive ?
How are file uploads handled?
How is database connectivity handled?
Do I have access to ActiveX objects?
Can I script in VBScript or JScript ?
How do I get things I want done?!
What is the state of Apache::ASP? Can I publish a web site on it?
I am getting a tie or MLDBM / state error message, what do I do?
How do I access the ASP Objects in general?
Can I print() in ASP?

What is the best way to debug an ASP application ?

There are lots of perl-ish tricks to make your life developing and debugging an ASP application easier. For starters, you will find some helpful hints by reading the $Response->Debug() API extension, and the Debug configuration directive.

Apache errors on the PerlHandler directive ?

You do not have mod_perl correctly installed for Apache. The PerlHandler directive in Apache *.conf files is an extension enabled by mod_perl and will not work if mod_perl is not correctly installed.

Common user errors are not doing a 'make install' for mod_perl, which 
installs the perl side of mod_perl, and not starting the right httpd
after building it.  The latter often occurs when you have an old apache
server without mod_perl, and you have built a new one without copying
over to its proper location.
To get mod_perl, go to http://perl.apache.org

How are file uploads handled?

Please see the CGI section. File uploads are implemented through CGI.pm which is loaded at runtime only for this purpose. This is the only time that CGI.pm will be loaded by Apache::ASP, which implements all other cgi-ish functionality natively. The rationale for not implementing file uploads natively is that the extra 100K in mem for CGI.pm shouldn't be a big deal if you are working with bulky file uploads.

How is database connectivity handled?

Database connectivity is handled through perl's DBI & DBD interfaces. Please see http://www.symbolstone.org/technology/perl/DBI/ for more information. In the UNIX world, it seems most databases have cross platform support in perl.

DBD::ODBC is often your ticket on Win32.  On UNIX, commercial vendors
like OpenLink Software (http://www.openlinksw.com/) provide the nuts and 
bolts for ODBC.
	
	

Do I have access to ActiveX objects?

Only under Win32 will developers have access to ActiveX objects through the perl Win32::OLE interface. This will remain true until there are free COM ports to the UNIX world. At this time, there is no ActiveX for the UNIX world.

Can I script in VBScript or JScript ?

Yes, but not with this perl module. For ASP with other scripting languages besides perl, you will need to go with a commercial vendor in the UNIX world. ChiliSoft (http://www.chilisoft.com/) has one such solution. Of course on NT, you get this for free with IIS.

How do I get things I want done?!

If you find a problem with the module, or would like a feature added, please mail support, as listed in the SUPPORT section, and your needs will be promptly and seriously considered, then implemented.

What is the state of Apache::ASP? Can I publish a web site on it?

Apache::ASP has been production ready since v.02. Work being done on the module is on a per-need basis, with the goal being to eventually have the ASP API completed, with full portability to ActiveState PerlScript and MKS PScript. If you can suggest any changes to facilitate these goals, your comments are welcome.

I am getting a tie or MLDBM / state error message, what do I do?

Make sure the web server or you have write access to the eg directory, or to the directory specified as Global in the config you are using. Default for Global is the directory the script is in (e.g. '.'), but should be set to some directory not under the www server document root, for security reasons, on a production site.

Usually a 
 chmod -R -0777 eg
will take care of the write access issue for initial testing purposes.
Failing write access being the problem, try upgrading your version of Data::Dumper and MLDBM, which are the modules used to write the state files.

How do I access the ASP Objects in general?

All the ASP objects can be referenced through the main package with the following notation:

 $main::Response->Write("html output");
This notation can be used from anywhere in perl, including routines registered with $Server->RegisterCleanup().
You use the normal notation in your scripts, includes, and global.asa:
 $Response->Write("html output");

Can I print() in ASP?

Yes. You can print() from anywhere in an ASP script as it aliases to the $Response->Write() method. Using print() is portable with PerlScript when using Win32::ASP in that environment.

Copyright (c) 1998-1999, Joshua Chamas, Chamas Enterprises Inc.