You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2005/05/04 08:26:27 UTC

[ANNOUNCE] mod_perl 2.0.0-RC6

#* If everything goes well with this release it'll probably be the last RC 
and a week or so from now, we will get the 2.0.0 out. So this is your last 
chance to affect the new API, since after 2.0.0 release backwards 
incompatible API changes will not happen. Thank you for your testing and 
support. *#

...and now back to the scheduled programming

The uploaded file

     mod_perl-2.0.0-RC6.tar.gz

has entered CPAN as

   file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz
   size: 1435432 bytes
    md5: 3e7f7aefb19c772a998802990ced15c0

Please notice that something is wrong with the PAUSE/CPAN indexer, so you 
will not see the new package in the CPAN shell and friends, until Andreas 
fixes the problem.

The package is also available from:

     http://apache.org/dist/perl/mod_perl-2.0.0-RC6.tar.gz
     http://apache.org/dist/perl/mod_perl-2.0.0-RC6.tar.gz.asc (pgp sig)

Changes since RC5:

fix Apache2::Build::dynamic_link_MSWin32 to generate a new line after
dynamic_link code in Makefile [Nick *** <do...@abv.bg>]

fix a warning in Apache2::Build::build_config() when building
with MP_STATIC_EXTS=1 [Nick *** <do...@abv.bg>]

improving DSO support on cygwin. The problem with cygwin is that it
behaves like windows (it's a posix layer over windows after
all). That's why we need to supply all symbols during linking time
just like on win32, by adding -lapr-0 -laprutil-0 and -lhttpd. On
windows, Apache supplies all the three libraries and it's easy to
link, but on cygwin apache doesn't play nice and doesn't supply
libhttpd. This change adds libapr and libaprutil. [Nick ***
<do...@abv.bg>]

improve the diagnostics when detecting mp2 < 1.999022, tell the user
which files and/or dirs need to be removed [Stas]

restore the DESTDIR support partially nuked by the apache2 rename
branch [Torsten Förtsch <torsten.foertsch gmx.net>]

add APR::Status to provide functions corresponding to the
APR_STATUS_IS_* macros of apr_errno.h, especially those composites
like APR_STATUS_IS_EAGAIN(s) which are satisfied by more than one
specific error condition. Presently only APR_STATUS_IS_EAGAIN is
provided [Randy Kobes]

fix the generation of the manpages for .pm files from sub-projects
like ModPerl-Registry (previously was creating manpage files like
.::ModPerl::PerlRun.3) [Stas]

fix the pod2man'ification part of 'make install' (using POD2MAN_EXE
instead of POD2MAN Makefile macro) [Stas]

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Octavian Rasnita wrote:
> 
>> Hi,
>>
>> I have tried to install it, using:
>>
>> # perl Makefile.pl
>> # make
>>
>> After this step, it gave the following error:
>>
>> modperl_filter.c: In function `modperl_brigade_dump':
>> modperl_filter.c:1253: internal error: Illegal instruction
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
>> make[1]: *** [modperl_filter.lo] Error 1
>> make: *** [modperl_lib] Error 2
> 
> 
> Hmm, Octavian, mind to send a proper report (t/REPORT)? what 
> platform/build doesn't like fprintf?
> 
> In any case, this is a debug code, so the following should fix the problem.

Octavian, could you please build the current svn [1], I've applied a 
different solution which should work w/o removing that function. Thanks.

[1] 
http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Octavian Rasnita wrote:
> Hi,
> 
> I have tried to install it, using:
> 
> # perl Makefile.pl
> # make
> 
> After this step, it gave the following error:
> 
> modperl_filter.c: In function `modperl_brigade_dump':
> modperl_filter.c:1253: internal error: Illegal instruction
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
> make[1]: *** [modperl_filter.lo] Error 1
> make: *** [modperl_lib] Error 2

Hmm, Octavian, mind to send a proper report (t/REPORT)? what 
platform/build doesn't like fprintf?

In any case, this is a debug code, so the following should fix the problem.

Index: src/modules/perl/modperl_filter.c
===================================================================
--- src/modules/perl/modperl_filter.c   (revision 168093)
+++ src/modules/perl/modperl_filter.c   (working copy)
@@ -1241,6 +1241,7 @@
                 (unsigned long)callback);
  }

+#if 0
  void modperl_brigade_dump(apr_bucket_brigade *bb, FILE *fp)
  {
      apr_bucket *bucket;
@@ -1268,3 +1269,5 @@
      }
  #endif
  }
+
+#endif

Index: src/modules/perl/modperl_filter.h
===================================================================
--- src/modules/perl/modperl_filter.h   (revision 168093)
+++ src/modules/perl/modperl_filter.h   (working copy)
@@ -83,7 +83,9 @@
                                                     const char *buf,
                                                     apr_size_t *len);

+#if 0
  void modperl_brigade_dump(apr_bucket_brigade *bb, FILE *fp);
+#endif

  /* input filters */
  apr_status_t modperl_input_filter_handler(ap_filter_t *f,


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Octavian Rasnita <or...@fcc.ro>.
Hi,

I have tried to install it, using:

# perl Makefile.pl
# make

After this step, it gave the following error:

modperl_filter.c: In function `modperl_brigade_dump':
modperl_filter.c:1253: internal error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[1]: *** [modperl_filter.lo] Error 1
make: *** [modperl_lib] Error 2


I have also tried yesterday to install libapreq2-2.05, but after "make test"
it gave some errors I have reported to libapreq dev list.

What could be the problem?

Thank you.

Teddy

----- Original Message ----- 
From: "Stas Bekman" <st...@stason.org>
To: "mod_perl Mailing List" <mo...@perl.apache.org>; "announce"
<an...@perl.apache.org>
Sent: Wednesday, May 04, 2005 9:26 AM
Subject: [ANNOUNCE] mod_perl 2.0.0-RC6


>
> #* If everything goes well with this release it'll probably be the last RC
> and a week or so from now, we will get the 2.0.0 out. So this is your last
> chance to affect the new API, since after 2.0.0 release backwards
> incompatible API changes will not happen. Thank you for your testing and
> support. *#
>
> ...and now back to the scheduled programming
>
> The uploaded file
>
>      mod_perl-2.0.0-RC6.tar.gz
>
> has entered CPAN as
>
>    file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz
>    size: 1435432 bytes
>     md5: 3e7f7aefb19c772a998802990ced15c0
>
> Please notice that something is wrong with the PAUSE/CPAN indexer, so you
> will not see the new package in the CPAN shell and friends, until Andreas
> fixes the problem.
>
> The package is also available from:
>
>      http://apache.org/dist/perl/mod_perl-2.0.0-RC6.tar.gz
>      http://apache.org/dist/perl/mod_perl-2.0.0-RC6.tar.gz.asc (pgp sig)
>
> Changes since RC5:
>
> fix Apache2::Build::dynamic_link_MSWin32 to generate a new line after
> dynamic_link code in Makefile [Nick *** <do...@abv.bg>]
>
> fix a warning in Apache2::Build::build_config() when building
> with MP_STATIC_EXTS=1 [Nick *** <do...@abv.bg>]
>
> improving DSO support on cygwin. The problem with cygwin is that it
> behaves like windows (it's a posix layer over windows after
> all). That's why we need to supply all symbols during linking time
> just like on win32, by adding -lapr-0 -laprutil-0 and -lhttpd. On
> windows, Apache supplies all the three libraries and it's easy to
> link, but on cygwin apache doesn't play nice and doesn't supply
> libhttpd. This change adds libapr and libaprutil. [Nick ***
> <do...@abv.bg>]
>
> improve the diagnostics when detecting mp2 < 1.999022, tell the user
> which files and/or dirs need to be removed [Stas]
>
> restore the DESTDIR support partially nuked by the apache2 rename
> branch [Torsten Förtsch <torsten.foertsch gmx.net>]
>
> add APR::Status to provide functions corresponding to the
> APR_STATUS_IS_* macros of apr_errno.h, especially those composites
> like APR_STATUS_IS_EAGAIN(s) which are satisfied by more than one
> specific error condition. Presently only APR_STATUS_IS_EAGAIN is
> provided [Randy Kobes]
>
> fix the generation of the manpages for .pm files from sub-projects
> like ModPerl-Registry (previously was creating manpage files like
> .::ModPerl::PerlRun.3) [Stas]
>
> fix the pod2man'ification part of 'make install' (using POD2MAN_EXE
> instead of POD2MAN Makefile macro) [Stas]
>
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Tom Williams wrote:
> [...]
> 
>> Ok, with this patch applied, I now get this:
>>
>> [tom@linux mod_perl-2.0.0-RC6]$ perl Makefile.PL 
>> MP_APXS=/usr/local/apache-2.0.54/bin/apxs
>> Reading Makefile.PL args from @ARGV
>>    MP_APXS = /usr/local/apache-2.0.54/bin/apxs
>> mod_perl/1.999_021 installation detected... not ok
>>
>> Cannot install mod_perl/1.999.23 on top of mod_perl/1.999_021
>> due to a major API change between mod_perl 1.999_21 and 1.999_22.
>>
>> Problematic
>> files: /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/Apache2.pm
>> dirs: /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/mod_perl.pm
> 
> 
> Hmm, it doesn't look right though, as it prints mod_perl.pm as a dir, it 
> should be 
> /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/Apache2, so more 
> work is needed.

It has been now fixed in svn.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Tom Williams wrote:
[...]
> Ok, with this patch applied, I now get this:
> 
> [tom@linux mod_perl-2.0.0-RC6]$ perl Makefile.PL 
> MP_APXS=/usr/local/apache-2.0.54/bin/apxs
> Reading Makefile.PL args from @ARGV
>    MP_APXS = /usr/local/apache-2.0.54/bin/apxs
> mod_perl/1.999_021 installation detected... not ok
> 
> Cannot install mod_perl/1.999.23 on top of mod_perl/1.999_021
> due to a major API change between mod_perl 1.999_21 and 1.999_22.
> 
> Problematic
> files: /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/Apache2.pm
> dirs: /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/mod_perl.pm

Hmm, it doesn't look right though, as it prints mod_perl.pm as a dir, it 
should be /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/Apache2, 
so more work is needed.

> Please nuke the prior mod_perl installation from your site_lib,
> use a different perl to run the installation process, or use the
> PREFIX option when creating your Makefile.  see
> 
>   http://perl.apache.org/docs/2.0/rename.html
> 
> for more details.
> 
> aborting...
> [tom@linux mod_perl-2.0.0-RC6]$
> 
> Looks like that worked!  Thanks!



-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Tom Williams <to...@comcast.net>.
Stas Bekman wrote:
>
> Tom, please try with this patch:
> 
> Index: Makefile.PL
> ===================================================================
> --- Makefile.PL (revision 168093)
> +++ Makefile.PL (working copy)
> @@ -126,8 +126,9 @@
>      set_modperl_version();
> 
>      if ($old_modperl_version) {
> -        $old_modperl_version =~ s/(\d\d\d?)(\d\d)/$1_$2/;
> -        my $vstring = "mod_perl/$old_modperl_version";
> +        (my $old_modperl_version_str = $old_modperl_version)
> +            =~ s/(\d\d\d?)(\d\d)/$1_$2/;
> +        my $vstring = "mod_perl/$old_modperl_version_str";
>          print "$vstring installation detected...";
> 
>          my $prefix;
> 
> 

Ok, with this patch applied, I now get this:

[tom@linux mod_perl-2.0.0-RC6]$ perl Makefile.PL 
MP_APXS=/usr/local/apache-2.0.54/bin/apxs
Reading Makefile.PL args from @ARGV
    MP_APXS = /usr/local/apache-2.0.54/bin/apxs
mod_perl/1.999_021 installation detected... not ok

Cannot install mod_perl/1.999.23 on top of mod_perl/1.999_021
due to a major API change between mod_perl 1.999_21 and 1.999_22.

Problematic
files: /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/Apache2.pm
dirs: /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi/mod_perl.pm

Please nuke the prior mod_perl installation from your site_lib,
use a different perl to run the installation process, or use the
PREFIX option when creating your Makefile.  see

   http://perl.apache.org/docs/2.0/rename.html

for more details.

aborting...
[tom@linux mod_perl-2.0.0-RC6]$

Looks like that worked!  Thanks!

Peace...

Tom


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Tom Williams wrote:
> Stas Bekman wrote:
> 
>> Changes since RC5:
> 
> 
> (snip)
> 
> 
>> improve the diagnostics when detecting mp2 < 1.999022, tell the user
>> which files and/or dirs need to be removed [Stas]
> 
> 
> I'm trying to install mod_perl 2.0.0-RC6 on a RedHat 9 based Linux 
> system that is currently running Apache 2.0.52/mod_perl 2.0.0-RC4 and 
> I'm getting this error:
> 
> [tom@linux mod_perl-2.0.0-RC6]$ perl Makefile.PL 
> MP_APXS=/usr/local/apache-2.0.54/bin/apxs
> Reading Makefile.PL args from @ARGV
>    MP_APXS = /usr/local/apache-2.0.54/bin/apxs
> Argument "1.999_021" isn't numeric in numeric gt (>) at Makefile.PL line 
> 149.
> mod_perl/1.999_021 installation detected...[tom@linux mod_perl-2.0.0-RC6]$
> 
> I've built Apache 2.0.54 using "config.nice" from my Apache 2.0.52 build 
> and that built without problem (as far as I know).
> 
> Any ideas on what could be wrong?

Tom, please try with this patch:

Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 168093)
+++ Makefile.PL (working copy)
@@ -126,8 +126,9 @@
      set_modperl_version();

      if ($old_modperl_version) {
-        $old_modperl_version =~ s/(\d\d\d?)(\d\d)/$1_$2/;
-        my $vstring = "mod_perl/$old_modperl_version";
+        (my $old_modperl_version_str = $old_modperl_version)
+            =~ s/(\d\d\d?)(\d\d)/$1_$2/;
+        my $vstring = "mod_perl/$old_modperl_version_str";
          print "$vstring installation detected...";

          my $prefix;


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Tom Williams <to...@comcast.net>.
Stas Bekman wrote:

> Changes since RC5:

(snip)


> improve the diagnostics when detecting mp2 < 1.999022, tell the user
> which files and/or dirs need to be removed [Stas]

I'm trying to install mod_perl 2.0.0-RC6 on a RedHat 9 based Linux system that 
is currently running Apache 2.0.52/mod_perl 2.0.0-RC4 and I'm getting this error:

[tom@linux mod_perl-2.0.0-RC6]$ perl Makefile.PL 
MP_APXS=/usr/local/apache-2.0.54/bin/apxs
Reading Makefile.PL args from @ARGV
    MP_APXS = /usr/local/apache-2.0.54/bin/apxs
Argument "1.999_021" isn't numeric in numeric gt (>) at Makefile.PL line 149.
mod_perl/1.999_021 installation detected...[tom@linux mod_perl-2.0.0-RC6]$

I've built Apache 2.0.54 using "config.nice" from my Apache 2.0.52 build and 
that built without problem (as far as I know).

Any ideas on what could be wrong?

Peace...

Tom

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Stas Bekman wrote:
> 
> 
>>Markus Wichitill wrote:
>> 
>>
>>
>>>Steve Hay wrote:
>>>
>>>   
>>>
>>>
>>>>Almost all OK on Win32 (Apache 2.0.54 and a recent bleadperl).  Main 
>>>>tests are all successful, but ModPerl-Registry tests failed 404.t test 
>>>>1 and redirect.t test 2.
>>>>     
>>>>
>>>
>>>Same here (WinXP, 2.0.54, 5.8.6). modperl_slurp_filename doesn't raise a 
>>>ENOENT exception when it should. The
>>>
>>>   if (!size) {
>>>       sv_setpvn(sv, "", 0);
>>>       return newRV_noinc(sv);
>>>   }
>>>
>>>part looks fishy to me. size is 0 and therefore we never get to 
>>>SLURP_SUCCESS("opening"), which should throw the exception.
>>>   
>>>
>>
>>Hmm, please see the comment:
>>
>>    /* XXX: could have checked whether r->finfo.filehand is valid and
>>     * save the apr_file_open call, but apache gives us no API to
>>     * check whether filehand is valid. we can't test whether it's
>>     * NULL or not, as it may contain garbagea
>>     */
>>
>>how can we test if the filehandle is valid then? may be we should skip 
>>that bit altogether? Steve, does it work if you comment out the whole
>>
>>  if (!size) { ... }
>>
>>block?
>>
> 
> No, it doesn't :(
> 
> I even did a complete rebuild in case something didn't get relinked 
> properly after the change, but it still doesn't fix the two test failures.

So what has changed? You didn't have these problems with RC6? Could you 
trace what change has affected that? Unless Randy or someone who can 
reproduce that can look at the issue.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: Graphics / Pie Charts

Posted by Jeff Ambrosino <jb...@gmail.com>.
If, by chance, you also have use for a general purpose templating
system, I've had great luck with Template-Toolkit
(www.template-toolkit.org.)  Among [many] other things, it embeds GD
so you can write little templates that slurp in the data and produce
graphics with graphs, charts, etc.  The learning curve is heavier than
just getting a quick-and-dirty graphing module to work (ala something
you'd do in CGI), but worthwhile if you're looking to add other
functions over time.

cheers
Jeff


On 5/6/05, David Hofmann <mo...@hotmail.com> wrote:
> Someone recommend that I use GDGraph-1.43. Looking at it there hasn't been
> an update since 2003. So before I go play with it I figure I ask here if
> anyone has done and graph stuff, and if there a better module to use under
> mod perl.

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Fri, 6 May 2005, Steve Hay wrote:
> 
> 
>>Markus Wichitill wrote:
> 
> [ .. ]
> 
>>>I guess you two didn't remove the "if (!size)" check like I did?
>>>
>>
>>Shit.  How dumb am I?
>>
>>You're absolutely right -- you have to remove the size
>>check as well in order for Randy's fix to even be reached!
>>With this change in place too I now have all tests
>>successful :-)
>>
>>Thanks, Markus!
>>- Steve
> 
> 
> I forgot too to do that ... Would the following be OK?
> 
> Index: src/modules/perl/modperl_util.c
> ===================================================================
> --- src/modules/perl/modperl_util.c	(revision 168597)
> +++ src/modules/perl/modperl_util.c	(working copy)
> @@ -616,10 +616,12 @@
>      size = r->finfo.size;
>      sv = newSV(size);
> 
> +    /* allow SLURP_SUCCESS() below an opportunity to set error
>      if (!size) {
>          sv_setpvn(sv, "", 0);
>          return newRV_noinc(sv);
>      }
> +    */
> 
>      /* XXX: could have checked whether r->finfo.filehand is valid and
>       * save the apr_file_open call, but apache gives us no API to
> ==========================================================
> 
> Or would it be better to wrap the if(!size) { } within
> an #ifndef WIN32?

Why commenting out? Just remove it completely. I believe I've added it as 
an optimization, to save the open call when we know that the file size is 
zero, but it is probably not not a normal case.

I've tested the removal on linux, all tests pass.

Thanks Randy.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 6 May 2005, Steve Hay wrote:

> Markus Wichitill wrote:
[ .. ]
> >
> >I guess you two didn't remove the "if (!size)" check like I did?
> >
> Shit.  How dumb am I?
>
> You're absolutely right -- you have to remove the size
> check as well in order for Randy's fix to even be reached!
> With this change in place too I now have all tests
> successful :-)
>
> Thanks, Markus!
> - Steve

I forgot too to do that ... Would the following be OK?

Index: src/modules/perl/modperl_util.c
===================================================================
--- src/modules/perl/modperl_util.c	(revision 168597)
+++ src/modules/perl/modperl_util.c	(working copy)
@@ -616,10 +616,12 @@
     size = r->finfo.size;
     sv = newSV(size);

+    /* allow SLURP_SUCCESS() below an opportunity to set error
     if (!size) {
         sv_setpvn(sv, "", 0);
         return newRV_noinc(sv);
     }
+    */

     /* XXX: could have checked whether r->finfo.filehand is valid and
      * save the apr_file_open call, but apache gives us no API to
==========================================================

Or would it be better to wrap the if(!size) { } within
an #ifndef WIN32?

-- 
best regards,
randy

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Markus Wichitill wrote:

>Randy Kobes wrote:
>  
>
>>>Randy, if you spot locations in docs and tests that do a comparison with
>>>these two constants, which we will now have right, please adjust those.
>>>Thank you!
>>>      
>>>
>>Thanks, Stas. I've done that, but unfortunately, like Steve,
>>I'm also finding these 2 tests still have problems :( I'll
>>keep looking ...
>>    
>>
>
>I guess you two didn't remove the "if (!size)" check like I did?
>
Shit.  How dumb am I?

You're absolutely right -- you have to remove the size check as well in 
order for Randy's fix to even be reached!  With this change in place too 
I now have all tests successful :-)

Thanks, Markus!
- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Markus Wichitill <ma...@gmx.de>.
Randy Kobes wrote:
>>Randy, if you spot locations in docs and tests that do a comparison with
>>these two constants, which we will now have right, please adjust those.
>>Thank you!
> 
> Thanks, Stas. I've done that, but unfortunately, like Steve,
> I'm also finding these 2 tests still have problems :( I'll
> keep looking ...

I guess you two didn't remove the "if (!size)" check like I did?

Re: Graphics / Pie Charts

Posted by Hans Poo <ha...@opensource.cl>.
I don't know if it's too much for a posting but, i 've just build a module
under mod_perl to do just that, i call whenever i need a pie chart. You call
it like this:

First you put a handler in httpd.conf:
--------------------------------------
<Files grafico>
     SetHandler  perl-script
     PerlHandler UB::Grafico
</Files>

The calling url is:
-------------------
http://www.ubpf.cl:8080/grafico?labels=e,c,b;values=1,3,3;title=

the module is:
--------------
package UB::Grafico;
                                                                             
                                                                               
use Apache::Constants qw/OK/;
                                                                             
                                                                               
use CGI ':standard';
use GD::Graph::pie;
use strict;
                                                                             
                                                                               
sub handler {
                                                                             
                                                                               
my $r = shift;
                                                                             
                                                                               
$r->no_cache(1);
                                                                             
                                                                               
my @labels = split /,/, param("labels");
my @values = split /,/, param("values");
                                                                             
                                                                               
# Both the arrays should same number of entries.
my @data = (\@labels, \@values);
                                                                             
                                                                               
my $mygraph = GD::Graph::pie->new(80, 80);
$mygraph->set(
    title       => param("title"),
    '3d'          => 1,
) or warn $mygraph->error;
                                                                             
                                                                               
$mygraph->set_title_font(GD::gdTinyFont);
$mygraph->set_value_font(GD::gdTinyFont);
$mygraph->set(dclrs => [ qw(yellow red cyan) ] );
my $myimage = $mygraph->plot(\@data) or die $mygraph->error;
                                                                             
                                                                               
$r->send_http_header("image/png");
print $myimage->png;
                                                                             
                                                                               
return OK;
                                                                             
                                                                               
                                                                             
                                                                               
}
                                                                             
                                                                               
1;


Good Luck
Hans

On Fri, 6 May 2005 15:40:40 -0400 (EDT), Sam Tregar wrote
> On Fri, 6 May 2005, David Hofmann wrote:
> 
> > Someone recommend that I use GDGraph-1.43. Looking at it there
> > hasn't been an update since 2003. So before I go play with it I
> > figure I ask here if anyone has done and graph stuff, and if there a
> > better module to use under mod perl.
> 
> I asked a similar question on PerlMonks recently:
> 
>   http://perlmonks.org/?node_id=452166
> 
> I ended up settling on GD::Graph3D but I'll be interested to see if
> someone here has a better idea.
> 
> -ssam


------------------------------------------------------------------------
El problema de fondo es diseñar soluciones elegantes e inteligentes, las 
herramientas sólo son las herramientas.

Hans Poo, http://hans.opensource.cl, hans@opensource.cl, F: 09-319.93.05
Consultor Linux, Desarrollo Web OpenSource.
Santiago, Chile


Re: Graphics / Pie Charts

Posted by Sam Tregar <sa...@tregar.com>.
On Fri, 6 May 2005, David Hofmann wrote:

> Someone recommend that I use GDGraph-1.43. Looking at it there
> hasn't been an update since 2003. So before I go play with it I
> figure I ask here if anyone has done and graph stuff, and if there a
> better module to use under mod perl.

I asked a similar question on PerlMonks recently:

  http://perlmonks.org/?node_id=452166

I ended up settling on GD::Graph3D but I'll be interested to see if
someone here has a better idea.

-ssam

Re: Graphics / Pie Charts

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

1. Perl-based: Use SVG and then convert them using Image::LibRSVG to
generate PNGs
2. Use PHP and the great module Image_Graph module from
http://pear.veggerby.dk/samples/

Tom

David Hofmann schrieb:
| In order to provided stat data on my companies website my boss has asked
| me to write a program that pulls stat data from our database and display
| it on a page in graphs and pie charts. He'd like the program to hand the
| abilty to up the minute request, so I have to generate them on the fly.
|
| The database side I can do eaily. However I haven't ever played with
| graphs and charts.
|
| Someone recommend that I use GDGraph-1.43. Looking at it there hasn't
| been an update since 2003. So before I go play with it I figure I ask
| here if anyone has done and graph stuff, and if there a better module to
| use under mod perl.
|
| Thanks,
|
| David
|
| _________________________________________________________________
| Don?t just search. Find. Check out the new MSN Search!
| http://search.msn.click-url.com/go/onm00200636ave/direct/01/
|
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCfL2UkVPeOFLgZFIRAvQhAKCZKxwSal9y8Psq1i3r7p6WUY6KvgCbB0P0
cD1dBsshvUxI2PaxczQGlkA=
=Ug6O
-----END PGP SIGNATURE-----

Re: Graphics / Pie Charts

Posted by Jay Scherrer <ja...@scherrer.com>.
Both GTK+ and Perl::TK work really well. Using Perl GTK+ can actually
manipulate graphics through the Gimp.

Jay Scherrer

On Fri, 2005-05-06 at 15:34 -0400, David Hofmann wrote:
> In order to provided stat data on my companies website my boss has asked me 
> to write a program that pulls stat data from our database and display it on 
> a page in graphs and pie charts. He'd like the program to hand the abilty to 
> up the minute request, so I have to generate them on the fly.
> 
> The database side I can do eaily. However I haven't ever played with graphs 
> and charts.
> 
> Someone recommend that I use GDGraph-1.43. Looking at it there hasn't been 
> an update since 2003. So before I go play with it I figure I ask here if 
> anyone has done and graph stuff, and if there a better module to use under 
> mod perl.
> 
> Thanks,
> 
> David
> 
> _________________________________________________________________
> Dont just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> 


Re: Graphics / Pie Charts

Posted by Foo Ji-Haw <jh...@nexlabs.com>.
You can try ImageMagick. Very nicely done.

David Hofmann wrote:

> In order to provided stat data on my companies website my boss has 
> asked me to write a program that pulls stat data from our database and 
> display it on a page in graphs and pie charts. He'd like the program 
> to hand the abilty to up the minute request, so I have to generate 
> them on the fly.
>
> The database side I can do eaily. However I haven't ever played with 
> graphs and charts.
>
> Someone recommend that I use GDGraph-1.43. Looking at it there hasn't 
> been an update since 2003. So before I go play with it I figure I ask 
> here if anyone has done and graph stuff, and if there a better module 
> to use under mod perl.
>
> Thanks,
>
> David
>
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>

Graphics / Pie Charts

Posted by David Hofmann <mo...@hotmail.com>.
In order to provided stat data on my companies website my boss has asked me 
to write a program that pulls stat data from our database and display it on 
a page in graphs and pie charts. He'd like the program to hand the abilty to 
up the minute request, so I have to generate them on the fly.

The database side I can do eaily. However I haven't ever played with graphs 
and charts.

Someone recommend that I use GDGraph-1.43. Looking at it there hasn't been 
an update since 2003. So before I go play with it I figure I ask here if 
anyone has done and graph stuff, and if there a better module to use under 
mod perl.

Thanks,

David

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 5 May 2005, Stas Bekman wrote:

> Randy Kobes wrote:
> [...]
> > Does the following fix this?
> >
> > ===================================================================
> > Index: xs/APR/Status/APR__Status.h
> > ===================================================================
> > --- xs/APR/Status/APR__Status.h	(revision 168337)
> > +++ xs/APR/Status/APR__Status.h	(working copy)
> > @@ -16,3 +16,5 @@
> >  #include "apr_errno.h"
> >
> >  #define mpxs_APR__Status_is_EAGAIN APR_STATUS_IS_EAGAIN
> > +#define mpxs_APR__Status_is_EACCES APR_STATUS_IS_EACCES
> > +#define mpxs_APR__Status_is_ENOENT APR_STATUS_IS_ENOENT
>
> +1
>
> Randy, if you spot locations in docs and tests that do a comparison with
> these two constants, which we will now have right, please adjust those.
> Thank you!

Thanks, Stas. I've done that, but unfortunately, like Steve,
I'm also finding these 2 tests still have problems :( I'll
keep looking ...

-- 
best regards,
randy

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
[...]
> Does the following fix this?
> 
> ===================================================================
> Index: xs/APR/Status/APR__Status.h
> ===================================================================
> --- xs/APR/Status/APR__Status.h	(revision 168337)
> +++ xs/APR/Status/APR__Status.h	(working copy)
> @@ -16,3 +16,5 @@
>  #include "apr_errno.h"
> 
>  #define mpxs_APR__Status_is_EAGAIN APR_STATUS_IS_EAGAIN
> +#define mpxs_APR__Status_is_EACCES APR_STATUS_IS_EACCES
> +#define mpxs_APR__Status_is_ENOENT APR_STATUS_IS_ENOENT

+1

Randy, if you spot locations in docs and tests that do a comparison with 
these two constants, which we will now have right, please adjust those. 
Thank you!

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Markus Wichitill <ma...@gmx.de>.
Steve Hay wrote:
>>>I've removed the size code, too, and the problem is that after the exception
>>>is thrown, neither of the tests in RegistryCooker::read_script apply:
>>>
>>>        if (ref $@ eq 'APR::Error') {
>>>            return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
>>>            return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
>>>            # oops
>>>        }
>>>
>>>The actual error code returned by apr_file_open is 720002.
>>
>>Does the following fix this?
> 
> No.  I was just in the process of trying the same thing myself, but it 
> doesn't fix it for me :(

Works for me, though.

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Randy Kobes wrote:

>On Thu, 5 May 2005, Steve Hay wrote:
>
>  
>
>>Randy Kobes wrote:
>>
>>    
>>
>>>On Thu, 5 May 2005, Markus Wichitill wrote:
>>>      
>>>
>[ ... ]
>  
>
>>>>The actual error code returned by apr_file_open is 720002.
>>>>        
>>>>
>>>Does the following fix this?
>>>
>>>      
>>>
>>No.  I was just in the process of trying the same thing
>>myself, but it doesn't fix it for me :(
>>    
>>
>
>You probably have to 'nmake clean', then rebuild, for these
>changes to propagate - does that work?
>
No :-s

Just did a complete rebuild:  Extracted RC6 afresh, applied your patch 
again.  Double-checked it applied correctly.  Retested.  Still get the 
same two test failures.

Now I'm really confused.

If I have a chance tomorrow, I'll have a closer look at what the 
offending $@ is on my system, but I'm off now...



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 5 May 2005, Steve Hay wrote:

> Randy Kobes wrote:
>
> >On Thu, 5 May 2005, Markus Wichitill wrote:
[ ... ]
> >>The actual error code returned by apr_file_open is 720002.
> >
> >Does the following fix this?
> >
> No.  I was just in the process of trying the same thing
> myself, but it doesn't fix it for me :(

You probably have to 'nmake clean', then rebuild, for these
changes to propagate - does that work?

-- 
best regards,
randy

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Randy Kobes wrote:

>On Thu, 5 May 2005, Markus Wichitill wrote:
>
>  
>
>>Steve Hay wrote:
>>    
>>
>>>>how can we test if the filehandle is valid then? may be we should skip
>>>>that bit altogether? Steve, does it work if you comment out the whole
>>>>
>>>> if (!size) { ... }
>>>>
>>>>block?
>>>>        
>>>>
>>>No, it doesn't :(
>>>      
>>>
>>I've removed the size code, too, and the problem is that after the exception
>>is thrown, neither of the tests in RegistryCooker::read_script apply:
>>
>>         if (ref $@ eq 'APR::Error') {
>>             return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
>>             return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
>>             # oops
>>         }
>>
>>The actual error code returned by apr_file_open is 720002.
>>
>>    
>>
>
>Does the following fix this?
>  
>
No.  I was just in the process of trying the same thing myself, but it 
doesn't fix it for me :(


>===================================================================
>Index: xs/APR/Status/APR__Status.h
>===================================================================
>--- xs/APR/Status/APR__Status.h	(revision 168337)
>+++ xs/APR/Status/APR__Status.h	(working copy)
>@@ -16,3 +16,5 @@
> #include "apr_errno.h"
>
> #define mpxs_APR__Status_is_EAGAIN APR_STATUS_IS_EAGAIN
>+#define mpxs_APR__Status_is_EACCES APR_STATUS_IS_EACCES
>+#define mpxs_APR__Status_is_ENOENT APR_STATUS_IS_ENOENT
>Index: xs/maps/apr_functions.map
>===================================================================
>--- xs/maps/apr_functions.map	(revision 168337)
>+++ xs/maps/apr_functions.map	(working copy)
>@@ -649,3 +649,5 @@
>
> MODULE=APR::Status      PREFIX=mpxs_APR__STATUS_
>  int:DEFINE_is_EAGAIN | | apr_status_t:rc
>+ int:DEFINE_is_EACCES | | apr_status_t:rc
>+ int:DEFINE_is_ENOENT | | apr_status_t:rc
>Index: ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
>===================================================================
>--- ModPerl-Registry/lib/ModPerl/RegistryCooker.pm	(revision 168337)
>+++ ModPerl-Registry/lib/ModPerl/RegistryCooker.pm	(working copy)
>@@ -34,6 +34,7 @@
> use Apache2::Access ();
>
> use APR::Table ();
>+use APR::Status ();
>
> use ModPerl::Util ();
> use ModPerl::Global ();
>@@ -41,7 +42,6 @@
> use File::Spec::Functions ();
> use File::Basename;
>
>-use APR::Const     -compile => qw(EACCES ENOENT);
> use Apache2::Const  -compile => qw(:common &OPT_EXECCGI);
> use ModPerl::Const -compile => 'EXIT';
>
>@@ -542,8 +542,8 @@
>         $self->log_error("$@");
>
>         if (ref $@ eq 'APR::Error') {
>-            return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
>-            return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
>+            return Apache2::Const::FORBIDDEN if APR::Status::is_EACCES($@);
>+            return Apache2::Const::NOT_FOUND if APR::Status::is_ENOENT($@);
>         }
>         else {
>             return Apache2::Const::SERVER_ERROR;
>
>========================================================================
>
>  
>



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 5 May 2005, Markus Wichitill wrote:

> Steve Hay wrote:
> >>how can we test if the filehandle is valid then? may be we should skip
> >>that bit altogether? Steve, does it work if you comment out the whole
> >>
> >>  if (!size) { ... }
> >>
> >>block?
> >
> > No, it doesn't :(
>
> I've removed the size code, too, and the problem is that after the exception
> is thrown, neither of the tests in RegistryCooker::read_script apply:
>
>          if (ref $@ eq 'APR::Error') {
>              return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
>              return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
>              # oops
>          }
>
> The actual error code returned by apr_file_open is 720002.
>

Does the following fix this?

===================================================================
Index: xs/APR/Status/APR__Status.h
===================================================================
--- xs/APR/Status/APR__Status.h	(revision 168337)
+++ xs/APR/Status/APR__Status.h	(working copy)
@@ -16,3 +16,5 @@
 #include "apr_errno.h"

 #define mpxs_APR__Status_is_EAGAIN APR_STATUS_IS_EAGAIN
+#define mpxs_APR__Status_is_EACCES APR_STATUS_IS_EACCES
+#define mpxs_APR__Status_is_ENOENT APR_STATUS_IS_ENOENT
Index: xs/maps/apr_functions.map
===================================================================
--- xs/maps/apr_functions.map	(revision 168337)
+++ xs/maps/apr_functions.map	(working copy)
@@ -649,3 +649,5 @@

 MODULE=APR::Status      PREFIX=mpxs_APR__STATUS_
  int:DEFINE_is_EAGAIN | | apr_status_t:rc
+ int:DEFINE_is_EACCES | | apr_status_t:rc
+ int:DEFINE_is_ENOENT | | apr_status_t:rc
Index: ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
===================================================================
--- ModPerl-Registry/lib/ModPerl/RegistryCooker.pm	(revision 168337)
+++ ModPerl-Registry/lib/ModPerl/RegistryCooker.pm	(working copy)
@@ -34,6 +34,7 @@
 use Apache2::Access ();

 use APR::Table ();
+use APR::Status ();

 use ModPerl::Util ();
 use ModPerl::Global ();
@@ -41,7 +42,6 @@
 use File::Spec::Functions ();
 use File::Basename;

-use APR::Const     -compile => qw(EACCES ENOENT);
 use Apache2::Const  -compile => qw(:common &OPT_EXECCGI);
 use ModPerl::Const -compile => 'EXIT';

@@ -542,8 +542,8 @@
         $self->log_error("$@");

         if (ref $@ eq 'APR::Error') {
-            return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
-            return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
+            return Apache2::Const::FORBIDDEN if APR::Status::is_EACCES($@);
+            return Apache2::Const::NOT_FOUND if APR::Status::is_ENOENT($@);
         }
         else {
             return Apache2::Const::SERVER_ERROR;

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

-- 
best regards,
randy

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Markus Wichitill <ma...@gmx.de>.
Steve Hay wrote:
>>how can we test if the filehandle is valid then? may be we should skip 
>>that bit altogether? Steve, does it work if you comment out the whole
>>
>>  if (!size) { ... }
>>
>>block?
> 
> No, it doesn't :(

I've removed the size code, too, and the problem is that after the exception 
is thrown, neither of the tests in RegistryCooker::read_script apply:

         if (ref $@ eq 'APR::Error') {
             return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
             return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
             # oops
         }

The actual error code returned by apr_file_open is 720002.

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Stas Bekman wrote:

>Markus Wichitill wrote:
>  
>
>>Steve Hay wrote:
>>
>>    
>>
>>>Almost all OK on Win32 (Apache 2.0.54 and a recent bleadperl).  Main 
>>>tests are all successful, but ModPerl-Registry tests failed 404.t test 
>>>1 and redirect.t test 2.
>>>      
>>>
>>Same here (WinXP, 2.0.54, 5.8.6). modperl_slurp_filename doesn't raise a 
>>ENOENT exception when it should. The
>>
>>    if (!size) {
>>        sv_setpvn(sv, "", 0);
>>        return newRV_noinc(sv);
>>    }
>>
>>part looks fishy to me. size is 0 and therefore we never get to 
>>SLURP_SUCCESS("opening"), which should throw the exception.
>>    
>>
>
>Hmm, please see the comment:
>
>     /* XXX: could have checked whether r->finfo.filehand is valid and
>      * save the apr_file_open call, but apache gives us no API to
>      * check whether filehand is valid. we can't test whether it's
>      * NULL or not, as it may contain garbagea
>      */
>
>how can we test if the filehandle is valid then? may be we should skip 
>that bit altogether? Steve, does it work if you comment out the whole
>
>   if (!size) { ... }
>
>block?
>
No, it doesn't :(

I even did a complete rebuild in case something didn't get relinked 
properly after the change, but it still doesn't fix the two test failures.



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Stas Bekman <st...@stason.org>.
Markus Wichitill wrote:
> Steve Hay wrote:
> 
>> Almost all OK on Win32 (Apache 2.0.54 and a recent bleadperl).  Main 
>> tests are all successful, but ModPerl-Registry tests failed 404.t test 
>> 1 and redirect.t test 2.
> 
> 
> Same here (WinXP, 2.0.54, 5.8.6). modperl_slurp_filename doesn't raise a 
> ENOENT exception when it should. The
> 
>     if (!size) {
>         sv_setpvn(sv, "", 0);
>         return newRV_noinc(sv);
>     }
> 
> part looks fishy to me. size is 0 and therefore we never get to 
> SLURP_SUCCESS("opening"), which should throw the exception.

Hmm, please see the comment:

     /* XXX: could have checked whether r->finfo.filehand is valid and
      * save the apr_file_open call, but apache gives us no API to
      * check whether filehand is valid. we can't test whether it's
      * NULL or not, as it may contain garbagea
      */

how can we test if the filehandle is valid then? may be we should skip 
that bit altogether? Steve, does it work if you comment out the whole

   if (!size) { ... }

block?

Here is the complete func:

MP_INLINE SV *modperl_slurp_filename(pTHX_ request_rec *r, int tainted)
{
     SV *sv;
     apr_status_t rc;
     apr_size_t size;
     apr_file_t *file;

     size = r->finfo.size;
     sv = newSV(size);

     if (!size) {
         sv_setpvn(sv, "", 0);
         return newRV_noinc(sv);
     }

     /* XXX: could have checked whether r->finfo.filehand is valid and
      * save the apr_file_open call, but apache gives us no API to
      * check whether filehand is valid. we can't test whether it's
      * NULL or not, as it may contain garbagea
      */
     rc = apr_file_open(&file, r->filename, APR_READ|APR_BINARY,
                        APR_OS_DEFAULT, r->pool);
     SLURP_SUCCESS("opening");

     rc = apr_file_read(file, SvPVX(sv), &size);
     SLURP_SUCCESS("reading");

     MP_TRACE_o(MP_FUNC, "read %d bytes from '%s'\n", size, r->filename);

     if (r->finfo.size != size) {
         SvREFCNT_dec(sv);
         Perl_croak(aTHX_ "Error: read %d bytes, expected %d ('%s')",
                    size, r->finfo.size, r->filename);
     }

     rc = apr_file_close(file);
     SLURP_SUCCESS("closing");

     SvPVX(sv)[size] = '\0';
     SvCUR_set(sv, size);
     SvPOK_on(sv);

     if (tainted) {
         SvTAINTED_on(sv);
     }
     else {
         SvTAINTED_off(sv);
     }

     return newRV_noinc(sv);
}



-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Markus Wichitill <ma...@gmx.de>.
Steve Hay wrote:
> Almost all OK on Win32 (Apache 2.0.54 and a recent bleadperl).  Main 
> tests are all successful, but ModPerl-Registry tests failed 404.t test 1 
> and redirect.t test 2.

Same here (WinXP, 2.0.54, 5.8.6). modperl_slurp_filename doesn't raise a 
ENOENT exception when it should. The

     if (!size) {
         sv_setpvn(sv, "", 0);
         return newRV_noinc(sv);
     }

part looks fishy to me. size is 0 and therefore we never get to 
SLURP_SUCCESS("opening"), which should throw the exception.

Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Stas Bekman wrote:

>The uploaded file
>
>     mod_perl-2.0.0-RC6.tar.gz
>
>has entered CPAN
>
Almost all OK on Win32 (Apache 2.0.54 and a recent bleadperl).  Main 
tests are all successful, but ModPerl-Registry tests failed 404.t test 1 
and redirect.t test 2.

The 404.t test gives the following verbose output:

t\404....1..2
# Running under perl version 5.009003 for MSWin32
# Current time local: Wed May  4 11:19:42 2005
# Current time GMT:   Wed May  4 10:19:42 2005
# Using Test.pm version 1.25
# Using Apache/Test.pm version 1.23
# Failed test 1 in t\404.t at line 14
# testing : test ErrorDocument
# expected: Oops, can't find the requested doc
# received:
not ok 1
# testing : the script has changed the status to 404
# expected: 404
# received: 404
ok 2

and writes this (only to the error_log: "*** The following error entry 
is expected and harmless ***".  The access_log seems to show a 200/OK 
rather than a 404:

127.0.0.1 - - [04/May/2005:11:28:35 +0100] "GET /index.html HTTP/1.0" 
200 956
127.0.0.1 - - [04/May/2005:11:28:37 +0100] "GET 
/error_document/cannot_be_found HTTP/1.0" 200 -
127.0.0.1 - - [04/May/2005:11:28:37 +0100] "GET 
/registry/status_change.pl HTTP/1.0" 404 223

Is that what's expected?

The redirect.t test outputs:

t\redirect....1..4
# Running under perl version 5.009003 for MSWin32
# Current time local: Wed May  4 11:21:31 2005
# Current time GMT:   Wed May  4 10:21:31 2005
# Using Test.pm version 1.25
# Using Apache/Test.pm version 1.23
# testing : test redirect: existing target
# expected: ok 
C:/apache2/source/mod_perl-2.0.0-RC6/ModPerl-Registry/t/cgi-bin/basic.pl
# received: ok 
C:/apache2/source/mod_perl-2.0.0-RC6/ModPerl-Registry/t/cgi-bin/basic.pl
ok 1
# Failed test 2 in t\redirect.t at line 32
# testing : test redirect: non-existing target
# expected: 404
# received: 200
not ok 2
# testing : test Registry style redirect: status
# expected: 302
# received: 302
ok 3
# testing : test Registry style redirect: cookie
# expected: mod_perl=ubercool; path=/
# received: mod_perl=ubercool; path=/
ok 4

and writes the same message as before (only) into the error_log.  The 
access_log again shows a 200/OK rather than a 404 as expected following 
the 302:

127.0.0.1 - - [04/May/2005:11:32:55 +0100] "GET /index.html HTTP/1.0" 
200 956
127.0.0.1 - - [04/May/2005:11:32:57 +0100] "GET 
/registry/redirect.pl?/registry/basic.pl HTTP/1.0" 302 223
127.0.0.1 - - [04/May/2005:11:32:58 +0100] "GET /registry/basic.pl 
HTTP/1.0" 200 75
127.0.0.1 - - [04/May/2005:11:32:58 +0100] "HEAD 
/registry/redirect.pl?/registry/does_not_exists.pl HTTP/1.0" 302 -
127.0.0.1 - - [04/May/2005:11:32:58 +0100] "HEAD 
/registry/does_not_exists.pl HTTP/1.0" 200 -
127.0.0.1 - - [04/May/2005:11:32:58 +0100] "HEAD 
/registry/redirect-cookie.pl?/registry/basic.pl HTTP/1.0" 302 -

Any ideas?

- Steve


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

> On Wed, 4 May 2005, Steve Hay wrote:
>
>> Randy Kobes wrote:
>>
>> >On Wed, 4 May 2005, Geoffrey Young wrote:
>> >
>> >>>  file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz
>> >>>
>> >>looks good, +1
>> >
>> >+1
>> >
>> Really?  Don't you get the test failures that myself and
>> Markus have got?
>
> Yes, but as Geoff said, this was a (belated) +1 for the
> release candidate. Just as, for RC5, there was an error on
> Win32 that you (Steve) raised with t/error/runtime.t (that
> has been fixed with RC6), I think the general consensus here
> is that isolated errors on particular platforms generally
> shouldn't hold up a release candidate. Certainly though we
> should try to fix this before the official 2.0 release.

+1. For the record, I have already offered my +1 for 
putting all pre-2.0 candidates on CPAN.

-- 
Joe Schaefer


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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 4 May 2005, Steve Hay wrote:

> Randy Kobes wrote:
>
> >On Wed, 4 May 2005, Geoffrey Young wrote:
> >
> >>>  file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz
> >>>
> >>looks good, +1
> >
> >+1
> >
> Really?  Don't you get the test failures that myself and
> Markus have got?

Yes, but as Geoff said, this was a (belated) +1 for the
release candidate. Just as, for RC5, there was an error on
Win32 that you (Steve) raised with t/error/runtime.t (that
has been fixed with RC6), I think the general consensus here
is that isolated errors on particular platforms generally
shouldn't hold up a release candidate. Certainly though we
should try to fix this before the official 2.0 release.

-- 
best regards,
randy

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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Geoffrey Young wrote:

>>>>looks good, +1
>>>>  
>>>>
>>>>        
>>>>
>>>+1
>>>
>>>      
>>>
>>Really?  Don't you get the test failures that myself and Markus have got?
>>    
>>
>
>for the record, though, I don't see those failures, but I'm not running on
>win32 :)
>
I meant Randy, actually, but thanks anyway.


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Markus Wichitill <ma...@gmx.de>.
Geoffrey Young wrote:
> for the record, though, I don't see those failures, but I'm not running on
> win32 :)

That's because on Linux, non-existing files apparently have a size of 4096 
bytes, according to APR. No wonder we need new harddrives all the time. :)

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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>>looks good, +1
>>>   
>>>
>>
>>+1
>>
> 
> Really?  Don't you get the test failures that myself and Markus have got?

for my part, that was a +1 to the release of RC6 (though a bit after the
fact).  not every failure is a showstopper for a release candidate to make
its way into the wild.

that's not saying I was or am +1 to making RC6 the official mp 2.0 - there
are obviously issues that remain that would be nice to clear up before we
bless 2.0.  in particular, there's no reason to rush into 2.0 until everyone
is reasonably satisfied with how mp2 works on their specific platform.

for the record, though, I don't see those failures, but I'm not running on
win32 :)

--Geoff

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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Steve Hay <st...@uk.radan.com>.
Randy Kobes wrote:

>On Wed, 4 May 2005, Geoffrey Young wrote:
>
>  
>
>>>  file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz
>>>      
>>>
>>looks good, +1
>>    
>>
>
>+1
>
Really?  Don't you get the test failures that myself and Markus have got?



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 4 May 2005, Geoffrey Young wrote:

> >   file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz
>
> looks good, +1

+1

-- 
best regards,
randy

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


Re: [ANNOUNCE] mod_perl 2.0.0-RC6

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

>   file: $CPAN/authors/id/S/ST/STAS/mod_perl-2.0.0-RC6.tar.gz

looks good, +1

:)

--Geoff

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