Re: Bug Report mod_perl

2003-10-25 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
-8<-- Start Bug Report 8<--
1. Problem Description:
I can't start my Apache2 (Debian Testing) with mod_perl

Apache without mod_perl works fine.

Error Message:
Syntax error on line 1 of /etc/apache2/mods-enabled/perl.load:
Cannot load /usr/lib/apache2/modules/mod_perl.so into server: 
/usr/lib/apache2/modules/mod_perl.so: undefined symbol: PerlIOBase_binmode
What do you get when you run:

ldd /usr/lib/apache2/modules/mod_perl.so | grep libperl

Assuming that your libperl.so resides in /usr/local/lib/libperl.so.5.8.0 
(please correct it if I'm wrong, it should be in the output of the ldd command 
above), what do you get when you run:

nm /usr/local/lib/libperl.so.5.8.0 | wc -l
nm /usr/local/lib/libperl.so.5.8.0 | grep Perl_PerlIO_write
nm /usr/local/lib/libperl.so.5.8.0 | grep PerlIOBase_read
If the first call gives you 0, your library is stripped and we can't tell 
whether the symbol is there or not. And you will need to rebuild perl with 
-DDEBUGGING.

__
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
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: early perl startup in vhost on win32

2003-10-25 Thread Stas Bekman
Steve Hay wrote:
[...]
It then stopped complaining that it couldn't find things, and 
"Apache.exe -t ..." now says syntax OK, but trying to start the server 
still fails as before.
OK. Thanks for testing that, Steve.

modperl_mgv.c:264: package Apache::PerlSections not defined, 
attempting to load

Free to wrong pool 262770 not 925938.


The problems is this: perl uses dTHX; calls in some functions which 
disregards the passed context and retrieves the globally stored 
context. Which means that *every* time we select an interpreter, we 
must call PERL_SET_CONTEXT() and pass to it the parent interpreter of 
the currently used pool :(

In particular for your and mine segfaults the Perl_safesysfree() call 
is the one that uses dTHX and gets the wrong context at times, and 
then it crashes. 


:(

I just saw your post on p5p, so I'll watch that to see what people say.
Doesn't seem to be an area we have many experts in. It's pretty quiet.

This short conf file is OK if I remove the "+Parent" line.

I can also "fix" it by removing the ... section, but 
trying the same trick with the full vhost test setup (commenting out 
the appropriate add_config() call from t/htdocs/vhost/startup.pl) 
doesn't fix that :(

I notice that the ... section in that startup.pl file 
is commented "this used to have problems on win32".  Looks like it 
still does?


Probably it just moved to a different place. Most likely it's the same 
problem, I have explained above.

I also notice that the short conf file gives this syntax error if I 
change the  to :

   Syntax error on line 10 of C:/Temp/modperl-2.0/t/conf/httpd.conf:
directive missing closing '>'


You need the current httpd cvs for  to work. Unfortunately it 
seems that  Phillipe's fix won't make it to 2.0.48 (which should be 
released shortly), but only 2.0.49 :( 


Oh, right.  I'll have to start using CVS Apache2 as well, I think.
It actually did make it to 2.0.48. Thanks to Sander!

--

__
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
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: early perl startup in vhost on win32

2003-10-25 Thread Stas Bekman
Steve Hay wrote:
Stas Bekman wrote:

Stas Bekman wrote:

Steve Hay wrote:

modperl_mgv.c:264: package Apache::PerlSections not defined, 
attempting to load

Free to wrong pool 262770 not 925938.




The problems is this: perl uses dTHX; calls in some functions which 
disregards the passed context and retrieves the globally stored 
context. Which means that *every* time we select an interpreter, we 
must call PERL_SET_CONTEXT() and pass to it the parent interpreter of 
the currently used pool :(

In particular for your and mine segfaults the Perl_safesysfree() call 
is the one that uses dTHX and gets the wrong context at times, and 
then it crashes.


I think if you build perl without using perl's malloc this particular 
segfault will go away. Certainly it's not a good solution. 


No, that's not true - my Perl is built without Perl's malloc anyway :(
OK, than I probably was mislead by the source, as malloc is defined and 
redefined in several places, I thought that Perl_safesysfree() has to do with 
Perl's malloc. I guess I was wrong.

It isn't possible to build mp2 using a Perl that doesn't have ithreads, 
and on Win32 at least (I don't know if this limitation exists on other 
OS's too or not?) you can't use Perl's malloc with ithreads!  Perl's 
win32/Makefile says of the PERL_MALLOC option (equivalent to 
-Dusemymalloc): "Currently, this cannot be enabled if you ask for 
USE_IMP_SYS".  Hence I have:

   C:\Temp\modperl-2.0>perl -V:usemymalloc
   usemymalloc='n';
I've never liked that, nor understood why it is.  I would rather use 
Perl's malloc if possible; I do with my current mp1 setup which doesn't 
require ithreads.
I have heard different stories about using perl's malloc vs. the native one. I 
think the "concensus" was that it depends on the os and its version...

__
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
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]