You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gurusamy Sarathy <gs...@ActiveState.com> on 2000/08/25 23:39:36 UTC
Re: mod_perl for Apache to work with ActivePerl (APR#816)
On Tue, 18 Jul 2000 11:21:15 PDT, craig.davidson@nuasis.com wrote:
>Full_Name:
>Version: ActivePerl 616
>OS: Windows NT 4.0 SP 4 or lower
>Submission from: (NULL) (155.229.70.9)
>
>
>is there a way to get mod_perl for Apache to work with ActivePerl?
mod_perl apparently doesn't know anything about ithreads. This
patch makes it build and "work" for me, but I haven't tested it
for more than 20 seconds. It is possible that similar treatment
is needed for other callbacks that my 20-seconds worth of testing
did not trigger. :-)
Note that the patch should NOT be applied as is. A #ifdef USE_ITHREADS
guard is needed around the new code. Sorry I don't have time to
make a more complete patch.
HTH,
Sarathy
gsar@ActiveState.com
-----------------------------------8<-----------------------------------
--- Leak/Leak.xs.dist Wed Aug 02 18:33:34 2000
+++ Leak/Leak.xs Wed Aug 02 18:57:38 2000
@@ -121,7 +121,7 @@
{
char *state = lookup((struct hash_s **)p, sv, t_new);
if (state != t_old) {
- fprintf(stderr, "%s %p : ", state ? state : t_new, sv);
+ PerlIO_printf(PerlIO_stderr(), "%s %p : ", state ? state : t_new, sv);
sv_dump(sv);
}
return hwm+1;
--- src/modules/perl/mod_perl.c.dist Wed Aug 02 18:33:34 2000
+++ src/modules/perl/mod_perl.c Thu Aug 03 13:02:47 2000
@@ -735,9 +735,10 @@
perl_tainting_set(s, cls->PerlTaintCheck);
(void)GvSV_init("Apache::__SendHeader");
(void)GvSV_init("Apache::__CurrentCallback");
+#if 0
if (ap_configtestonly)
GvSV_setiv(GvSV_init("Apache::Server::ConfigTestOnly"), TRUE);
-
+#endif
Apache__ServerReStarting(FALSE); /* just for -w */
Apache__ServerStarting_on();
@@ -861,10 +862,19 @@
dPPDIR;
dPPREQ;
dTHR;
- GV *gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
+ GV *gv;
+
+ dTHX;
+
+ if (!aTHX) {
+ PERL_SET_CONTEXT(perl);
+ }
(void)acquire_mutex(mod_perl_mutex);
-
+
+ gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
+
+
#if 0
/* force 'PerlSendHeader On' for sub-requests
* e.g. Apache::Sandwich
@@ -1310,6 +1320,10 @@
I32 i, do_clear=FALSE;
SV *sub, **svp;
int hook_len = strlen(hook);
+ dTHX;
+
+ if (!aTHX)
+ PERL_SET_CONTEXT(perl);
if(handlers == Nullav) {
if(hv_exists(stacked_handlers, hook, hook_len)) {
End of Patch.
Re: mod_perl for Apache to work with ActivePerl (APR#816)
Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 25 Aug 2000, Gurusamy Sarathy wrote:
> mod_perl apparently doesn't know anything about ithreads. This
> patch makes it build and "work" for me, but I haven't tested it
> for more than 20 seconds. It is possible that similar treatment
> is needed for other callbacks that my 20-seconds worth of testing
> did not trigger. :-)
strange, my Perl is an ithreads Perl, has been for several months. i had
to make several changes initially, but it's been running for me with
linux+ithreads since. anyhow, still runs fine with your patch
(committed to cvs for 1.25) and Randy Kobes has confirmed the win32 side.
thanks Sarathy!!