Fw: Apache::GD::Thumbnail Question

2003-03-27 Thread Issac Goldstand
Forgive my use of the list if this is a tad OT - but I seem to not be able
to contact Steven directly all of the sudden (my ISP got but on a RBL, I
think, and it will take them another bit to get off - that's why it took so
long, Steven)

 Issac

  On Tue, 2003-03-25 at 00:12, Issac Goldstand wrote:
   - Original Message -
  ...snip...
   From the man page:
   * ThumbnailBaseDir
   Sets the directory that contains the images to be thumbnailed.
Defaults
 to
   .. if not specified
  
   Since the virtual directory /home/me/pics/thumbs/../ is where the
 pictures
   are (eg, /home/me/pics), I can use the default.
  
  ...snip...
   Why don't you show me your exact configuration, and I'll see if I can
 help
   you out...
  
 Issac
  
 
  ...another snip...
 
  Hey Issac,
 
  Ok, I've dumbed this down to the lowest common denominator ( in this
  case, I qualify as this ). In my httpd.conf I have the following lines:
 
  Alias /pics/ /data/httpd/htdocs/image1/pics/
  Directory /data/httpd/htdocs/image1/pics
  Order allow,deny
  AllowOverride None
  Order allow,deny
  Allow from all
  /Directory

  Location /*/pics/thumbs
  SetHandler perl-handler
  PerlHandler Apache::GD::Thumbnail
  PerlSetVar ThumbnailMaxSize 75
  /Location

 Why are you using /image1/pics/ for the thumbnails and /pics/ for the
 pictures?
 I would use: Location /pics/thumbs for the location block and then IMG
 SRC=/pics/tumbs/roses.jpg/ in the HTML.  See if that helps matters...

  In my script source I have the following line:
 
  $r-print ('PA href=/pics/roses1.jpgIMG
  src=/image1/pics/thumbs/roses.jpg/A
 
  I have tried this with the PerlSetVar ThumbnailBaseDir set to the
  Location,

 No  - ThumbnailBaseDir, would you want to set it, should be set to
 /data/httpd/htdocs/image1/pics/

  with PerlModule Apache::GD::Thumbnail

 you still need this (or use Apache::GD::Thumbnail; in mod_perl_start.pl)

 , with the OBJECT tag
  instead of the IMG tag

 no - you want IMG

 and they all yield the same 404 Not Found error.
 
  At this point I think that I'm probably missing something really stupid,
  considering I am following the man page to the letter. The only thing
  missing from the man page is any example of HTML/script usage but that
  looks to me as really basic - access the URL and the handler takes over.
 
  Any suggestions would be appreciated.
 
  Steve
  --
  Steven A. Adams [EMAIL PROTECTED]
 




Problems compiling modperl

2003-03-27 Thread Johnson, Fred








I havent been successful building mod_perl with apache, and
apacheSSL on a Solaris 2.8 with the latest recommended patches.

I am working on a Solaris 2.8 machine, with gcc 2.95.3, perl v5.6.1, mod_perl-1.26,
apache_1.3.22, and finally,

apache_1.3.22+ssl_1.45. 

I have been able to build this on a Solaris 2.6 machine.

Here are the errors I grabbed from the error log:



[notice] Destruction-DESTROY
called for $global_object

/tmp: Permission denied

apache_ssl.c:1617: failed assertion `0'

[notice] Destruction-DESTROY
called for $global_object

/tmp: Permission denied

apache_ssl.c:1617: failed assertion `0'

[Thu Mar 27 15:33:06 2003] [warn] [notice] child_init for
process 13816, report

any problems to
[no address given]

[Thu Mar 27 15:33:12 2003] [warn] [client 127.0.0.1] log
__ANON__ OK

Use of uninitialized value in subroutine entry at
/opt/software/mod_perl-1.26/t/

net/perl/api.pl line 222, fh1b line 1.



Any suggestions or help would be appreciated.



Fred Johnson

Systems Engineer

Storagenetworks

225 Wyman Street

Waltham, MA

(781)622-6425(o)

(781)983-1170(m)

[EMAIL PROTECTED]












Re: Problems compiling modperl

2003-03-27 Thread Ged Haywood
On Thu, 27 Mar 2003, Johnson, Fred wrote:

 I haven't been successful building mod_perl with apache, and apacheSSL
 on a Solaris 2.8 with the latest recommended patches.
 I am working on a Solaris 2.8 machine, with gcc 2.95.3, perl  v5.6.1,
 mod_perl-1.26,  apache_1.3.22, and finally,
 apache_1.3.22+ssl_1.45. 

Is there a reason for using those old versions?  I think you should be
using Apache 1.3.27 and mod_perl 1.27, and probably Perl 5.8.0.

 [notice] Destruction-DESTROY called for $global_object
 /tmp: Permission denied

It's not just a permissions problem?

Building on Solaris hasn't always been the most straightforward of
exercises.  SSL might add a little excitement.  If you trawl around in
the archives you should find people who've done it on 2.8.  I'm afraid
I don't know anything about that particular ssl version.  If that's
the problem you might try a different way of getting ssl in the mix.

73,
Ged.




Re: Mod_perl 1.99_09dev on AIX4.3.3

2003-03-27 Thread Stas Bekman
Stas Bekman wrote:
ODELL, TODD E (SWBT) wrote:
[...]
ulimit -c unlimited; t/TEST -clean

Error in option spec: verbose:1

make: 1254-004 The error code from the last command is 255.


hmm, I've added yesterday a support for
make test TEST_VERBOSE=1 TEST_FILES=...,
this is a problem with Getopt::Long, looks like you have an older 
version, which doesn't support this feature (it was added in 2.27). 
Though don't upgrade. Let's see if this can be workarounded, since many 
others have older version of this module. Try this patch:
sorry, that patch wasn't complete, as I haven't removed the rule itself. I've 
now committed the right fix to cvs. Please test it.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


make test fails - Solaris8, Perl5.8.0, mod_perl 1.99_08

2003-03-27 Thread Adrian Klingel
Hello List,

I am having a mysteriously difficult time getting mod_perl installed on
Solaris 8.

Perl 5.8.0 is installed and was compiled from source.  No threads.

Apache 2.0.44 is installed and was compiled from source.

Here is the output from make test.  Of course there is a core dump as
well.

myserver_root make test
cd src/modules/perl  make -f Makefile.modperl
mksh: Warning: newline is not last character in file Makefile.modperl
Current working directory
/d01/download/perl/modules/mod_perl-1.99_08/src/modules/perl
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE= APXS= \
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST
/usr/local/apache2/bin/httpd  -d
/d01/download/perl/modules/mod_perl-1.99_08/t -f
/d01/download/perl/modules/mod_perl-1.99_08/t/conf/httpd.c
onf -DAPACHE2
using Apache/2.0.44 (prefork MPM)

waiting for server to start: .[Thu Mar 27 16:50:41 2003] [crit] [Thu Mar 27
16:50:41 2003] file vhost.c, line 232, assertion rv == APR_SUCCESS failed
.
waiting for server to start: giving up after 61 secs
!!! server failed to start! (t/logs/error_log wasn't created, start the
server in the debug mode)
!!! oh rats, server dumped core
!!! for stacktrace, run: gdb /usr/local/apache2/bin/httpd -core
/d01/download/perl/modules/mod_perl-1.99_08/t/core
*** Error code 1
make: Fatal error: Command failed for target `run_tests'

I ran the gdb command, but the results do not make any sense to me.

Basically, the make test can not run httpd with the test configuration file
in the t/conf directory.  But I have checked and apachectl brings up httpd
just fine, and the pages are accessible.

If anyone can help, please do.  Any help is deeply appreciated!

Thank you,
Adrian Klingel



Re: make test fails - Solaris8, Perl5.8.0, mod_perl 1.99_08

2003-03-27 Thread Stas Bekman
Adrian Klingel wrote:
[...]
waiting for server to start: .[Thu Mar 27 16:50:41 2003] [crit] [Thu Mar 27
16:50:41 2003] file vhost.c, line 232, assertion rv == APR_SUCCESS failed
[...]
If anyone can help, please do.  Any help is deeply appreciated!
This is the relevant code in vhost.c (httpd-side):

else if (strcasecmp(host, _default_) == 0
|| strcmp(host, 255.255.255.255) == 0) {
rv = apr_sockaddr_info_get(my_addr, 255.255.255.255, APR_INET, 
port, 0, p);
ap_assert(rv == APR_SUCCESS); /* must be bug or out of storage */
}

so apr_sockaddr_info_get() fails, is your system ipv6 by chance?

it probably fails on the first VirtualHost _default_ entry.

could you interactively start with gdb and see where it fails in 
apr_sockaddr_info_get? The following script may get it easier for you:

/tmp/debug:
file ~/httpd/prefork/bin/httpd
tbreak main
run -d `pwd`/t -f `pwd`/t/conf/httpd.conf -DONE_PROCESS -DNO_DETATCH -DAPACHE2
# run through all the way to after mod_perl is loaded
b load_module
continue
b apr_sockaddr_info_get
now:

% cd modperl-2.0
% gdb -command=/tmp/debug
p.s. I prefer using ddd which runs gdb underneath, if you use ddd, the syntax 
is the same:
% ddd -command=/tmp/debug

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: Mod_perl 1.99_09dev on AIX4.3.3

2003-03-27 Thread ODELL, TODD E (SWBT)
Stas,
MUCH Better!
I got and tested the CVS an hour ago and it will get through the make test
with only one fail:
Failed Test   Status Wstat Total Fail  Failed  List of
Failed


modperl/request_rec_tie_api.t  31  33.33%  1
4 tests skipped.
*** server loopback:8529 shutdown
!!! error running tests (please examine t/logs/error_log)
make: 1254-004 The error code from the last command is 1.

In the t/logs/error_log I was seeing:
exec(): 0509-036 Cannot load program /apache3/bin/httpd because of the
following errors:
0509-150   Dependent module /apache3/lib/libaprutil-0.so could not
be loaded.
0509-022 Cannot load module /apache3/lib/libaprutil-0.so.
0509-026 System error: The file access permissions do not allow the
specified action.

But after I changed owner from root to nobody it seemed ok. Then I did the
same thing for libapr-0.so.

Now the only odd looking thing in t/logs/error_log is:
[Thu Mar 27 20:02:48 2003] [error] failed to resolve handler
`TestError::syntax'
[Thu Mar 27 20:02:48 2003] [error] [client 127.0.0.1] syntax error at
/store/modperl-2.0/t/response/TestError/syntax.pm line 17, near \;

Compilation failed in require at (eval 98) line 3.


thanks!
Todd

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 4:19 PM
Cc: ODELL, TODD E (SWBT); '[EMAIL PROTECTED]'
Subject: Re: Mod_perl 1.99_09dev on AIX4.3.3


Stas Bekman wrote:
 ODELL, TODD E (SWBT) wrote:
[...]
 ulimit -c unlimited; t/TEST -clean

 Error in option spec: verbose:1

 make: 1254-004 The error code from the last command is 255.
 
 
 hmm, I've added yesterday a support for
 make test TEST_VERBOSE=1 TEST_FILES=...,
 
 this is a problem with Getopt::Long, looks like you have an older 
 version, which doesn't support this feature (it was added in 2.27). 
 Though don't upgrade. Let's see if this can be workarounded, since many 
 others have older version of this module. Try this patch:

sorry, that patch wasn't complete, as I haven't removed the rule itself.
I've 
now committed the right fix to cvs. Please test it.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Mod_perl 1.99_09dev on AIX4.3.3

2003-03-27 Thread Stas Bekman
ODELL, TODD E (SWBT) wrote:
Stas,
MUCH Better!
;)

I got and tested the CVS an hour ago and it will get through the make test
with only one fail:
Failed Test   Status Wstat Total Fail  Failed  List of
Failed


modperl/request_rec_tie_api.t  31  33.33%  1
Great. Can you do:

rm t/logs/error_log
t/TEST -v modperl/request_rec_tie_api
and post the output of the test run and the contents of t/logs/error_log if 
there is something interesting in it.

In the t/logs/error_log I was seeing:
exec(): 0509-036 Cannot load program /apache3/bin/httpd because of the
following errors:
0509-150   Dependent module /apache3/lib/libaprutil-0.so could not
be loaded.
0509-022 Cannot load module /apache3/lib/libaprutil-0.so.
0509-026 System error: The file access permissions do not allow the
specified action.
But after I changed owner from root to nobody it seemed ok. Then I did the
same thing for libapr-0.so.
why do you have these problems? what file perms did you have? should be 0755 
(-rwxr-xr-x) I think and than he user.group bits won't matter. Unless you have 
umask settings that forced httpd install to kill the last r-x. What's the 
output of:

% umask

normally it's '22'

Now the only odd looking thing in t/logs/error_log is:
[Thu Mar 27 20:02:48 2003] [error] failed to resolve handler
`TestError::syntax'
[Thu Mar 27 20:02:48 2003] [error] [client 127.0.0.1] syntax error at
/store/modperl-2.0/t/response/TestError/syntax.pm line 17, near \;
Compilation failed in require at (eval 98) line 3.
These are expected, the test suite tests how well the errors are handled. I'm 
not sure how can add a banner, saying the following errors are harmless.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: the deprecation of Apache-request in mp2

2003-03-27 Thread Nick Tonkin
On Tue, 25 Mar 2003, Stas Bekman wrote:

 Lincoln Stein wrote:
 How about making CGI.pm a subclass of $r? (optionally of course, by
 dynamically changing @ISA), so instead of returning $q it'll return $r,
 after re-blessing it.
 
 
  Sounds interesting.  What would be the advantage of that?

 The advantage is that
 - you don't have to keep around two instances: $r and $q.
 - assuming that CGI.pm-specific code is not used one can transparently switch
 between Apache::Request and CGI.pm, by just changing:

 $r = Apache::Request-new($r);
 $r = CGI-new($r);

 And of course Apache::Request is a subclass of Apache ($r) and it works pretty
 well.

 In the future I can see someone extending Apache::Request to handle CGI.pm's
 HTML generation in C, so the two could be replace each other.

I sure hope not! I second John Siracusa's post on this. Keep the HTML generation well 
away from request parsing, please!

- nick

-- 


Nick Tonkin   {|8^)



[ANNOUNCE] Apache::PAR 0.12

2003-03-27 Thread Nathan Byrd
Hi all,

I am happy to announce the release of Apache::PAR version 0.12.  This
module is available for download from either a CPAN mirror or
sourceforge:
http://www.cpan.org/modules/by-authors/id/N/NB/NBYRD/Apache-PAR-0.12.tar.gz
http://sourceforge.net/projects/apache-par/.

Highlights from this release:

0.12  Thu Mar 27 2003
* Some testing performed on Win32 platforms Win 98 and Win 2k (thanks to
Raymond Field.  Documentation changed to reflect necessary changes to
get Apache::PAR up and running on Win32.
* Improved mod_perl 2.x detection.  No longer requires
Apache::ServerUtil
* Support for Apache::Static pulling from root directory of PAR file
* New configuration mechanism, through PARInclude directive and
use/include lines in startup.pl or PERL sections

Also, highlights from 0.11 (no announcement previously sent):

0.11  Mon Mar 10 2003
* Changes to stay compatible with latest mod_perl CVS.  This change is
not backwards compatible, however.  For mod_perl 2.x the CVS version is
currently required
* Some code cleanup
* Added more tests (not yet complete)
* Made errors from Archive::Zip silent (less noise to logs)
* Added additional tests
* Apache::PAR::Registry was using PARPerlRunPath instead of
PARRegistryPath, identified by Raymond Field
* PARPerlRunPath and PARRegistryPath failed to find contents if set to
/, identified by Raymond Field
* WIN32 fix for setting ##PARFILE## to reasonable value on that platform
for Apache, identified by Raymond Field

Summary of Apache::PAR:

Apache::PAR is a framework for including Perl ARchive files in a
mod_perl (1.x or 2.x) environment.  It allows an author to package up a
web application, including configuration, static files, Perl modules,
and Registry and PerlRun scripts to include in a single file.  This
archive can then be moved to other locations on the same system or
distributed, and loaded with a single set of configuration options in
the Apache configuration.

These modules are based on PAR.pm by Autrijus Tang and Archive::Zip by
Ned Konz, as well as the mod_perl modules.  They extend the concept of
PAR files to mod_perl, similar to how WAR archives work for Java. An
archive (which is really a zip file), contains one or more elements
which can be served to clients making requests to an Apache web server. 
Scripts, modules, and static content should then be able to be served
from within the .par archive without modifications.

Contact:

If you have questions or problems regarding this module, or suggestions
for further enhancements, please let me know at one of the following
locations:
E-mail: [EMAIL PROTECTED]
Mailing list: [EMAIL PROTECTED] (to subscribe, send an empty email to
[EMAIL PROTECTED])
Sourceforge forums: http://sourceforge.net/projects/apache-par/

Thanks,

-- 
Nathan Byrd [EMAIL PROTECTED]