You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by PhoenixWR PhoenixWR <ph...@hotmail.com> on 2002/04/14 05:43:49 UTC

finally I managed to get Apache::ASP running on mod_perl 1.99 & apache 2.

This is pretty difficult, I hope an updated Apache::ASp version for the new 
apache/mod_perl will come out soon. But actually it already works now, at 
least partly. First compile mod_perl-1.99_01.tar.gz into the apache 2.35 
server, then correct some mistakes in compact.pm (this is the compatibility 
module to ensure compatibility with old apache/mod_perl):

it should be  while (CORE::read($fh, $buff, $len)) {

not  while (read($fh, $buff, $len)) {

and the dollar sign ( $ ) is missing somewhere at the end of the file in 
$size:

should be :

elsif ($size < 1048576) {
        $size = sprintf "%4dk", ($size + 512) / 1024;
    }
    elsif ($size < 103809024) {
        $size = sprintf "%4.1fM", $size / 1048576.0;
    }
    else {
        $size = sprintf "%4dM", ($size + 524288) / 1048576;
    }

etc...

then edit all htaccess files (the examples supplied with apache::asp) and 
add

PerlHandler Apache::compat , so e.g.:

<Files ~ (\.xml)>
	SetHandler perl-script
	PerlHandler Apache::compat
	PerlHandler Apache::ASP
	PerlSetVar NoState 1
	PerlSetVar XSLT template.xsl
	PerlSetVar XSLTCache 1
</Files>

actually this is stupid, it would be better to use
use Apache::compat (); in a startup.pl loaded from httpd.conf by using 
perlrequire or using
PerlModule Apache2
PerlModule Apache::compat in httpd.conf
but this doesn't work, the server crashes without giving an error in the 
error_log if Apache::compat is loaded in such a way. Hell knows why, at the 
mod_perl forum they told that the above fixes in the compat.pm should fix 
all this, but apparently it does not.
Now some of the example scripts work, but not all. Here are a couple of 
errors returned by some of the scripts:
------------------------------------
Can't call method "args" on an undefined value at 
/usr/lib/perl5/5.6.1/CGI.pm line 443.
, /usr/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1555 (cgi.htm example 
and file_upload example)

--------------
bookmarks example:

--------------

errors compiling global.asa: Can't locate object method "dir_config" via 
package "Apache" (perhaps you forgot to load "Apache"?) at /usr/local/ 
apache2/public/site/apps/bookmarks//./global.asa line 15.
	eval 'E) || die("can\'t create table $DBI::errstr");
  ;
}

$Db->do("select * from bookmarks")
  || die("can\'t do select against bookma... see compile error for rest

--------------------

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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


Re: finally I managed to get Apache::ASP running on mod_perl 1.99 & apache 2.

Posted by Joshua Chamas <jo...@chamas.com>.
PhoenixWR PhoenixWR wrote:
> 
> This is pretty difficult, I hope an updated Apache::ASp version for the new
> apache/mod_perl will come out soon. But actually it already works now, at
> least partly. First compile mod_perl-1.99_01.tar.gz into the apache 2.35
> server, then correct some mistakes in compact.pm (this is the compatibility
> module to ensure compatibility with old apache/mod_perl):
> 
> it should be  while (CORE::read($fh, $buff, $len)) {
> 
> not  while (read($fh, $buff, $len)) {
> 
> and the dollar sign ( $ ) is missing somewhere at the end of the file in
> $size:
> 

Thanks for documenting this all for the list.  Hopefully 
you can get your patch merged into the mod_perl source.

I will start looking at mod_perl 2 after I get the next
version 2.33 of Apache::ASP out.

--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