Apache-ASP

 view release on metacpan or  search on metacpan

site/faq.html  view on Meta::CPAN

			<a href=#What%20is%20the%20bd2800a9>What is the state of Apache::ASP?  Can I publish a web site on it?</a>
			</font>
			</td>
							
		</tr>
		
		<tr>
		
			<td valign=top >
			<font face="lucida console" size=-1>
			
			</font>
			</td>
		<td>&nbsp;</td>					
		</tr>
			
	</table>
	<hr size=1>
	<p>

	<p>
	<a name=Installation></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Installation</b></font>
</font>
	
	<p>
	<a name=Examples%20donf48a0968></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Examples don't work, I see the ASP script in the browser?</b></font>
<font face="courier new" size=3><pre>
</pre></font>This is most likely that Apache is not configured to execute
the Apache::ASP scripts properly.  Check the <a href=install.html><font size=-1 face=verdana><b>INSTALL</b></font></a> QuickStart
section for more info on how to quickly set up Apache to 
execute your ASP scripts.</font>
	
	<p>
	<a name=Apache%20Expat3f8589db></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Apache Expat vs. XML perl parsing causing segfaults, what do I do?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Make sure to compile apache with expat disabled.  The
./make_httpd/build_httpds.sh in the distribution will do 
this for you, with the --disable-rule=EXPAT in particular:
<font face="courier new" size=3><pre>
 cd ../$APACHE
 echo &quot;Building apache ==============================&quot;
 ./configure \
    --prefix=/usr/local/apache \
    --activate-module=src/modules/perl/libperl.a \
    --enable-module=ssl \
    --enable-module=proxy \
    --enable-module=so \
    --disable-rule=EXPAT

                   ^^^^^
</pre></font>keywords: segmentation fault, segfault seg fault</font>
	
	<p>
	<a name=Why%20do%20varia68e97184></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Why do variables retain their values between requests?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Unless scoped by my() or local(), perl variables in <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>
are treated as globals, and values set may persist from one 
request to another. This can be seen in as simple a script
as this:
<font face="courier new" size=3><pre>
  &lt;HTML&gt;&lt;BODY&gt;
    $counter++;
    $Response-&gt;Write(&quot;&lt;BR&gt;Counter: $counter&quot;);
  &lt;/BODY&gt;&lt;/HTML&gt;
</pre></font>The value for $counter++ will remain between requests.
Generally use of globals in this way is a BAD IDEA,
and you can spare yourself many headaches if do 
&quot;use strict&quot; perl programming which forces you to 
explicity declare globals like:
<font face="courier new" size=3><pre>
  use vars qw($counter);
</pre></font>You can make all your Apache::ASP scripts strict by
default by setting:
<font face="courier new" size=3><pre>
  PerlSetVar UseStrict 1
</pre></font>
	
	<p>
	<a name=Apache%20errorf0bcd572></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Apache errors on the PerlHandler or PerlModule directives ?</b></font>
<font face="courier new" size=3><pre>
</pre></font>You get an error message like this:
<font face="courier new" size=3><pre>
 Invalid command &#39;PerlModule&#39;, perhaps mis-spelled or defined by a 
 module not included in the server configuration.
</pre></font>You do not have <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> correctly installed for Apache.  The PerlHandler
and PerlModule directives in Apache *.conf files are extensions enabled by mod_perl
and will not work if mod_perl is not correctly installed.
<font face="courier new" size=3><pre>
</pre></font>Common user errors are not doing a &#39;make install&#39; 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.
<font face="courier new" size=3><pre>
</pre></font>To get mod_perl, go to <a href=http://perl.apache.org>http://perl.apache.org</a></font>
	
	<p>
	<a name=Error%3A%20no%20reb1d13fcf></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Error: no request object (Apache=SCALAR(0x???????):)</b></font>
<font face="courier new" size=3><pre>
</pre></font>Your Apache + <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> build is not working properly, 
and is likely a RedHat Linux RPM DSO build.  Make sure
you statically build your Apache + mod_perl httpd,
recompiled fresh from the sources.</font>
	
	<p>
	<a name=I%20am%20getting272ca0df></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>I am getting a tie or MLDBM / state error message, what do I do?</b></font>
<font face="courier new" size=3><pre>
</pre></font>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. &#39;.&#39;), but should
be set to some directory not under the www server document root,
for security reasons, on a production site.
<font face="courier new" size=3><pre>
</pre></font>Usually a 
<font face="courier new" size=3><pre>
 chmod -R -0777 eg
</pre></font>will take care of the write access issue for initial testing purposes.
<font face="courier new" size=3><pre>
</pre></font>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.</font>
	
	<p>
	<a name=Sessions></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Sessions</b></font>
</font>

site/faq.html  view on Meta::CPAN

work for most cases.</font>
	
	<p>
	<a name=Development></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Development</b></font>
</font>
	
	<p>
	<a name=VBScript%20or%20d51ff480></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>VBScript or JScript supported?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Only Perl scripting is supported with this module.</font>
	
	<p>
	<a name=How%20is%20datab66fe735a></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>How is database connectivity handled?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Database connectivity is handled through perl&#39;s DBI &amp; DBD interfaces.
In the UNIX world, it seems most databases have cross platform support in perl.
You can find the book on DBI programming at <a href=http://www.oreilly.com/catalog/perldbi/>http://www.oreilly.com/catalog/perldbi/</a>
<font face="courier new" size=3><pre>
</pre></font>DBD::ODBC is often your ticket on Win32.  On UNIX, commercial vendors
like OpenLink Software (<a href=http://www.openlinksw.com/>http://www.openlinksw.com/</a>) provide the nuts and 
bolts for ODBC.
<font face="courier new" size=3><pre>
</pre></font>Database connections can be cached per process with Apache::DBI.</font>
	
	<p>
	<a name=What%20is%20the%20ffd599fa></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>What is the best way to debug an ASP application ?</b></font>
<font face="courier new" size=3><pre>
</pre></font>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-&gt;Debug() API extension, and the Debug
configuration directive.</font>
	
	<p>
	<a name=How%20are%20file3e89fb5c></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>How are file uploads handled?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Please see the <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> section.  File uploads are implemented
through <a href=http://stein.cshl.org/WWW/software/CGI/cgi_docs.html><font size=-1 face=verdana><b>CGI.pm</b></font></a> 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 memory for CGI.pm shouldn&#39;t be a big deal if you 
are working with bulky file uploads.</font>
	
	<p>
	<a name=How%20do%20I%20acc6523fd95></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>How do I access the ASP Objects in general?</b></font>
<font face="courier new" size=3><pre>
</pre></font>All the ASP objects can be referenced through the main package with
the following notation:
<font face="courier new" size=3><pre>
 $main::Response-&gt;Write(&quot;html output&quot;);
</pre></font>This notation can be used from anywhere in perl, including routines
registered with $Server-&gt;RegisterCleanup().  
<font face="courier new" size=3><pre>
</pre></font>You use the normal notation in your scripts, includes, and global.asa:
<font face="courier new" size=3><pre>
 $Response-&gt;Write(&quot;html output&quot;);
</pre></font>
	
	<p>
	<a name=Can%20I%20print%2874ba394b></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Can I print() in ASP?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Yes.  You can print() from anywhere in an ASP script as it aliases
to the $Response-&gt;Write() method.  Using print() is portable with
<a href=http://www.activestate.com/ActivePerl/><font size=-1 face=verdana><b>PerlScript</b></font></a> when using Win32::ASP in that environment.</font>
	
	<p>
	<a name=Do%20I%20have%20aca178cfb4></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>Do I have access to ActiveX objects?</b></font>
<font face="courier new" size=3><pre>
</pre></font>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.</font>
	
	<p>
	<a name=Support%20and%20b4365dac></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Support and Production</b></font>
</font>
	
	<p>
	<a name=How%20do%20I%20get45b324ef></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>How do I get things I want done?!</b></font>
<font face="courier new" size=3><pre>
</pre></font>If you find a problem with the module, or would like a feature added,
please mail support, as listed in the <a href=support.html><font size=-1 face=verdana><b>SUPPORT</b></font></a> section, and your 
needs will be promptly and seriously considered, then implemented.</font>
	
	<p>
	<a name=What%20is%20the%20bd2800a9></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>What is the state of Apache::ASP?  Can I publish a web site on it?</b></font>
<font face="courier new" size=3><pre>
</pre></font>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 <a href=http://www.activestate.com/ActivePerl/><font size=-1 face=verdana><b>PerlScript</b></font></a>
and MKS PScript.  If you can suggest any changes to facilitate these
goals, your comments are welcome.</font>
	

</font>
</td>

<td bgcolor=white valign=top>
&nbsp;
</td>

</tr>
</table>

</td></tr>
</table>
</center>

</body>



( run in 1.622 second using v1.01-cache-2.11-cpan-39bf76dae61 )