perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kato M Yoshiro <>
Subject seg fault from foreach loop
Date Mon, 28 May 2007 10:48:48 GMT

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
(this is a external hosted environment I can try to get more data if it is

New Environment which does not function
Debian 4.0
Apache/2.2.4 (Unix) 
(I have full control of this environment)

Here is the offending code

[$foreach $single_target(@{$get_targets})$]
[-	(
	) = @{$single_target};



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:
Sent from the Embperl mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message