Gerald Richter wrote:
This should work out of the box under mod_perl 2, for mod_perl 1 please add
a
Embperl::Init () ;
before the first call to Execute in your startup script.
The init call is done by Embperl automaticly, but under mod_perl 1 it's done
a little later, so you have to do it manually, in case you want to execute
something during startup.
Let me know if this works for you
Gerald
Hi Gerald,
I tried adding the Embperl::Init() to the startup script, after the 'use' and before the preload
routine is called. Now it gives a segmentation fault:
Embperl::Execute /www/lib/perl/Apache/Utils.epl
/www/bin/apachectl_perl: line 65: 30789 Segmentation fault $HTTPD
So, I compiled Embperl with debug:
perl Makefile.PL debug
make
make install
And I ran apache under gdb, using the instructions from one of your previous emails a while back.
Below is the output. Incidentally, is the "New Thread" line normal, or could that be some indication
of why I'm getting the "Threads still running" messages when child processes terminate? Or is this
talking about the main thread? Also, I do set EMBPERL_SESSION_HANDLER_CLASS to 'no' in
httpd_perl.conf, so I don't quite know why I'm getting this message still.
[EMAIL PROTECTED]:/usr/src/Embperl-2.0rc4# gdb
/usr/local/httpd_perl/bin/httpd_perl
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) set args -f /www/conf/dev/httpd_perl.conf -X
(gdb) r
Starting program: /usr/local/httpd_perl/bin/httpd_perl -f
/www/conf/dev/httpd_perl.conf -X
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 31303)]
[31303]ERR: 66: Embperl Session handling DISABLED because of the following error: Can't locate
Apache/SessionX.pm in @INC(@INC contains: /www/lib/perl /usr/lib/perl5/5.8.6/i486-linux
/usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i486-linux /usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl . /usr/local/httpd_perl/ /usr/local/httpd_perl/lib/perl) at (eval 136) line 3.
Set EMBPERL_SESSION_HANDLER_CLASS to 'no' to avoid this message.
Embperl::Execute /www/lib/perl/Apache/Utils.epl
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 31303)]
0x4048b074 in embperl_PathSearch (r=0x999dccc, pPool=0x999dca4, sFilename=0x99a1cb4 "Utils.epl",
nPathNdx=-1)
at eputil.c:1577
1577 if (isAbsPath(sFilename) || !pPathAV || AvFILL (pPathAV) < r ->
Component.nPathNdx)
(gdb) BT
#0 0x4048b074 in embperl_PathSearch (r=0x999dccc, pPool=0x999dca4, sFilename=0x99a1cb4 "Utils.epl",
nPathNdx=-1)
at eputil.c:1577
#1 0x404b1c9e in ProviderFile_AppendKey (r=0x999dccc, pProviderClass=0x404fd9a0,
pProviderParam=0x9822518,
pParam=0x9820fec, nParamIndex=-4, pKey=0x982256c) at epprovider.c:391
#2 0x404b037c in Cache_AppendKey (r=0x999dccc, pProviderParam=0x9822518, sSubProvider=0x404ee3ef
"source",
pParam=0x9820fec, nParamIndex=-3, pKey=0x982256c) at epcache.c:489
#3 0x404b246d in ProviderEpParse_AppendKey (r=0x999dccc, pProviderClass=0x404fda20,
pProviderParam=0x9822500,
pParam=0x9820fec, nParamIndex=-3, pKey=0x982256c) at epprovider.c:964
#4 0x404b037c in Cache_AppendKey (r=0x999dccc, pProviderParam=0x9822500, sSubProvider=0x404ee3ef
"source",
pParam=0x9820fec, nParamIndex=-2, pKey=0x982256c) at epcache.c:489
#5 0x404b2786 in ProviderEpCompile_AppendKey (r=0x999dccc, pProviderClass=0x404fda60,
pProviderParam=0x98225c0,
pParam=0x9820fec, nParamIndex=-2, pKey=0x982256c) at epprovider.c:1231
#6 0x404afd77 in Cache_New (r=0x999dccc, pParam=0x9820fec, nParamNdx=-1, bTopLevel=1 '\001',
pItem=0x999de44)
at epcache.c:318
#7 0x4048603d in ProcessFile (r=0x999dccc, nFileSize=0) at epmain.c:1268
#8 0x40486303 in embperl_RunRequest (r=0x999dccc) at epmain.c:1358
#9 0x4048660d in embperl_ExecuteRequest (pApacheReqSV=0x81d5418,
pPerlParam=0x8f23c5c) at epmain.c:1461
#10 0x4047be86 in XS_Embperl__Req_ExecuteRequest (cv=0x8f65784) at
Embperl.xs:125
#11 0x081378b1 in Perl_pp_entersub ()
#12 0x08130eb8 in Perl_runops_standard ()
#13 0x080e456e in S_call_body ()
#14 0x080e4784 in Perl_eval_sv ()
#15 0x08093e92 in perl_do_file ()
---Type <return> to continue, or q <return> to quit---
#16 0x08093ed7 in perl_load_startup_script ()
#17 0x0808f5e6 in perl_cmd_require ()
#18 0x080b71e4 in invoke_cmd ()
#19 0x080b75ea in ap_handle_command ()
#20 0x080b7671 in ap_srm_command_loop ()
#21 0x080b7dff in ap_process_resource_config ()
#22 0x080b86e5 in ap_read_config ()
#23 0x080c389a in main ()
(gdb)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]