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??)
-- 
View this message in context: 
http://www.nabble.com/seg-fault-from-foreach-loop-tf3827298.html#a10834288
Sent from the Embperl mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to