SafeCWD Status

2002-10-15 Thread Josh Bernstein

Whats the staus of the cwd and SafeThread? Will it work with a threaded 
MPM in Apache 2 yet and safely change to the working directory of the 
perl script (safecwd).

-Joshua Bernstein
Systems Administrator
University of Arizona







Re: Working Directory

2002-07-16 Thread Josh Bernstein

Sounds great? Does he have anything that I could play with? I'm really 
dying for that chdir(), my programmer says he depends on that 
functionality. I'd even volunteer to do some benchmarks and what not 
associated with the extra overhead of making the function thread safe.

If its not really yet, what do you feel is currently the best work 
around? I've read through the archives and I'm just try to figure which 
one to use...

-Josh


Stas Bekman wrote:

 Elizabeth Mattijsen wrote:

 At 06:10 PM 7/16/02 +, Stas Bekman wrote:

 Arthur told me he either had, or was going to fix this (on IRC).


 Yup, Arthur is working on an external package 
 (ex::threads::safecwd?) which should solve this problem. Viva 
 Arthur! I'll keep you updated once it gets released.



 Check out Arthur's article on Perl.com:

   http://www.perl.com/pub/a/2002/06/11/threads.html


 I read the article ;) The article doesn't say that there is going to 
 be a module that will do all this work for you. I just wanted to share 
 the happy news that such a module is about to emerge.

 Most of the people don't care how things are implemented, they just 
 want to know that the API they use is thread-safe, which is how it 
 should be with chdir() and friends.

 Though you realize that that this wrapper will incur a certain 
 overhead, which needs to be benchmarked. And if that overhead is of 
 any significant value, we should provide a switch to turn if off for 
 those who don't rely on chdir() and therefore can get a better 
 performance. I'm talking mainly about the Registry family in this 
 case, but I can see that this functionality could be provided on the 
 mod_perl core level (PerlSafeCwd flag?).

 __
 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: solaris9+apache2+mod_perl2

2002-07-11 Thread Josh Bernstein

Well I commented the little switch statement what was giving me the 
problems and all seems to be resolved.

In src/modules/mod_perl.c I've commend the following out:

/*switch (rcfg-status) {
  case HTTP_MOVED_TEMPORARILY:
retval = HTTP_MOVED_TEMPORARILY;
break;
}
*/

To my count thats lines 712-717... Just FYI

The only other thing that I've noticed while compiling is that I get 
warings about duplicate definitions... Here is a sample of the Warning

In file included from modperl_perl_includes.h:42,
 from mod_perl.h:5,
 from modperl_interp.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/perl.h:23:1: warning: 
VOIDUSED redefined
In file included from modperl_perl_includes.h:12,
 from mod_perl.h:5,
 from modperl_interp.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/config.h:3118:1: warning: 
this is the location of the previous definition




Stas Bekman wrote:

 Josh Bernstein wrote:

 Hey All,

I'm getting this error when I try to make mod_perl2, under solaris 9

 ...

 Any one have any ideas? Oh and I'm running Solaris 9, with Apache 
 2.0.40cvs, it should also be noted that the mod_perl was pulled from 
 CVS on July 8th. Is this just a broken build?


 Try again with the current cvs.



 __
 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








Working Directory

2002-07-11 Thread Josh Bernstein

After just upgrading to mod_perl2 with Apache2. My current INC path 
includes a . on the end, which should  reference the current working 
directory, and therefore correctly locate include locate in the script's 
working directory. The problem is that the Working Directory is set to 
/. My question is how can I set the working directory to be the 
location of where the script is running. (This would make mod_perl 
correctly locate file that I have included in the running script ie: 
require ./file.pl)  Can this be done from within Apache?

I've tried variations of PerlSetEnv but I can't seem to get it to 
work. I've even read the mod_perl2 user's guide. Thanks for your help..

-Joshua Bernstein
Systems Administrator
College of Engineering
University of Arizona
Tucson, Arizona, USA




solaris9+apache2+mod_perl2

2002-07-10 Thread Josh Bernstein

Hey All,

I'm getting this error when I try to make mod_perl2, under solaris 9

 make
cd src/modules/perl  make -f Makefile.modperl
make[1]: Entering directory `/usr/share/src/modperl-2.0/src/modules/perl'
gcc -I/usr/share/src/modperl-2.0/src/modules/perl 
-I/usr/share/src/modperl-2.0/xs -I/usr/local/apache2/include 
-fno-strict-aliasing -I/usr/local/include   
-I/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE -DMOD_PERL -O -fPIC \
-c mod_perl.c  mv mod_perl.o mod_perl.lo
cc1: warning: changing search order for system directory 
/usr/local/include
cc1: warning:   as it has already been specified as a non-system directory
In file included from modperl_perl_includes.h:42,
 from mod_perl.h:5,
 from mod_perl.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/perl.h:23:1: warning: 
VOIDUSED redefined
In file included from modperl_perl_includes.h:12,
 from mod_perl.h:5,
 from mod_perl.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/config.h:3118:1: warning: 
this is the location of the previous definition
mod_perl.c: In function `modperl_response_handler_cgi':
mod_perl.c:712: `rcfg' undeclared (first use in this function)
mod_perl.c:712: (Each undeclared identifier is reported only once
mod_perl.c:712: for each function it appears in.)
make[1]: *** [mod_perl.lo] Error 1
make[1]: Leaving directory `/usr/share/src/modperl-2.0/src/modules/perl'
make: *** [modperl_lib] Error 2
bash-2.05# cd src/modules/perl  make -f Makefile.modperl
 from mod_perl.h:5,
 from mod_perl.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/config.h:3118:1: warning: 
this is the location of the previous definition
mod_perl.c: In function `modperl_response_handler_cgi':
mod_perl.c:712: `rcfg' undeclared (first use in this function)
mod_perl.c:712: (Each undeclared identifier is reported only once
mod_perl.c:712: for each function it appears in.)
make[1]: *** [mod_perl.lo] Error 1
make[1]: Leaving directory `/usr/share/src/modperl-gcc 
-I/usr/share/src/modperl-2.0/src/modules/perl 
-I/usr/share/src/modperl-2.0/xs -I/usr/local/apache2/include 
-fno-strict-aliasing -I/usr/local/include   
-I/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE -DMOD_PERL -O -fPIC \
-c mod_perl.c  mv mod_perl.o mod_perl.lo
cc1: warning: changing search order for system directory 
/usr/local/include
cc1: warning:   as it has already been specified as a non-system directory
In file included from modperl_perl_includes.h:42,
 from mod_perl.h:5,
 from mod_perl.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/perl.h:23:1: warning: 
VOIDUSED redefined
In file included from modperl_perl_includes.h:12,
 from mod_perl.h:5,from mod_perl.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/config.h:3118:1: warning: 
this is the location of the previous definition
mod_perl.c: In function `modperl_response_handler_cgi':
mod_perl.c:712: `rcfg' undeclared (first use in this function)
mod_perl.c:712: (Each undeclared identifier is reported only once
mod_perl.c:712: for each function it appears in.)
make[1]: *** [mod_perl.lo] Error 1
make[1]: Leaving directory `/usr/share/src/modperl-2.0/src/modules/perl'
make: *** [modperl_lib] Error 2

Perl has been compilied with gcc 2.95, and I'm using system mallocs, 
I've also added the bincompat5005 option.
 sh Configure -Ubincompat5005 -Dcc=gcc -de -Uusemymalloc

It then makes, tests and installs nicely to /usr/local/bin/perl5.6.1

I've configure mod_perl with:

  perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2 MP_INST_APACHE2=1 


Any one have any ideas? Oh and I'm running Solaris 9, with Apache 
2.0.40cvs, it should also be noted that the mod_perl was pulled from CVS 
on July 8th. Is this just a broken build?

-Joshua Bernstein
Systems Administrator
College of Engineering and Mines
University of Arizona
Tucson, Arizona, USA