Hi,
>
> I found the error one of my input tags had a typo
>
> <input type="text" name="date_sub" size="10" maxlength="10"
> value="[+$date+]" class="formfield"'>
>
> note the extra ' at the end of the input tag. That combined
> with the foreach syntax described below caused the
> segmentation fault. If anyone wants to further debug this I
> will be happy to help out.
>
Great you found it.
In case you have a small test page that I can run here and shows the
segfault, I would like to try to fix it.
Gerald
>
>
>
>
>
> Kato M Yoshiro wrote:
> >
> > I have been tasked with moving pages to a new embperl environment.
> > Within a very complicated page, when any of several foreach
> loops have
> > more than a single row of data, the page segfaults (I
> believe). I have
> > been chasing a solution for a couple of days so I thought I
> would throw this out there.
> >
> > Original Environment which functions
> > Embperl/1.3.6
> > (this is a external hosted environment I can try to get
> more data if
> > it is
> > needed)
> >
> > New Environment which does not function Debian 4.0
> > Apache/2.2.4 (Unix)
> > Embperl/2.2.0
> > PHP/4.4.7 mod_perl/2.0.3
> > Perl/v5.8.8
> > (I have full control of this environment)
> >
> >
> > Here is the offending code
> >
> >
> > [$foreach $single_target(@{$get_targets})$]
> > [- (
> > $tar_id,
> > $tar_display,
> > $tar_company
> > ) = @{$single_target};
> > -]
> >
> >
> > [$endforeach$]
> >
> > Notes
> >
> > 1) Php was compiled using the Mysql libraries not the DBI libraries
> > (not doing that led to its own seg faults but that error is fixed)
> >
> > 2) The query functions as I can pull each of the array elements
> > manually ($get_targets->[0][0], $get_targets->[1][0], ect.
> >
> > 3) make test for embperl completed with no errors once I
> changed the
> > versions in epoincdiv.htm and epodiv.htm
> >
> > 4) When debugging using the following
> > EMBPERL_DEBUG 2147475453
> > EMBPERL_LOG "/tmp/etest.log"
> >
> > when 2 rows are returned
> > etest.log is 374K and the webbrowser returns a blank page
> >
> > when 1 row is returned
> > etest.log is 1.4M and the webbrowser returns what I expected
> >
> > 5) When reduced to a minimalist page the foreach functions
> normally.
> >
> > 6) I have removed the parsing of the array
> > ($tar_id,$tar_display,$tar_company) = @{$single_target};
> leaving just
> > the foreach with nothing in it and that still fails.
> >
> > I have no idea what to look for within the error log so I was
> > wondering if anyone had any Ideas (Gerald??)
> >
> >
> >
> >
> > Addition
> >
> > /usr/bin/perl /usr/local/bin/embpexec.pl
> > /web/sub/dev/click/htdocs/get_efficient/center_create_new_test.epl
> > produces only
> >
> > "Segmentation fault"
> >
> >
> > Below are some gdb results for a web hit
> >
> > (gdb) file /web/bin/httpd
> > Reading symbols from /web/bin/httpd...done.
> > Using host libthread_db library
> "/lib/tls/i686/cmov/libthread_db.so.1".
> > (gdb) set args -f ./conf/httpd.conf -X
> > (gdb) r
> > Starting program: /web/bin/httpd -f ./conf/httpd.conf -X Failed to
> > read a valid object file image from memory.
> > \[Thread debugging using libthread_db enabled] [New Thread
> -1211119936
> > (LWP 22866)]
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1211119936 (LWP 22866)]
> > 0xb7b59e38 in EMBPERL2_Node_selfCondCloneNode ()
> > from /usr/src/Embperl-2.2.0/blib/arch/auto/Embperl/Embperl.so
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/seg-fault-from-foreach-loop-tf3827298.ht
> ml#a10860455
> Sent from the Embperl mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ** Virus checked by BB-5000 Mailfilter **
> !DSPAM:416,465c7ac881834325296997!
>
>
** Virus checked by BB-5000 Mailfilter **
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]