|
Hi,
I found a cause of the seg faults I mentioned last week.
Apparently midgard causes apache to seg fault when I try to retrieve a list of
articles using the mgd_list_topic_calendar_all with time constraint. This is on
midgard 1.4.1-7 with apache 1.3.19 and php 4.0.5 on a redhat 7.0
machine.
Basically showing records using the default value and just
specifying a topic works. When I try to list all articles that are not in de
current selection midgard makes apache seg fault and a 404 page is
shown.
first I tried this:
$artlist =
mgd_list_topic_calendar_all($topic,1,time())
This seg faults. I read in the mailing list archive that the
third parameter should be the number of days since the start date. I then tried
this:
$start = strtotime("1 January 2000");
$end = ((time()-$start)/86400);
$artlist =
mgd_list_topic_calendar_all($topic,$start,$end);
Again a seg fault.
In my mysql log I found the sql statement that this
triggers:
SELECT article.id AS id,article.name AS
name,title,abstract,content,author,Concat(firstname,If(firstname=''||lastname='','','
'),lastname) AS authorname,article.topic AS
topic,Date_format(article.created,'%d.%m.%Y') AS
date,Date_format(article.created,'%D %b. %Y') AS
adate,Date_format(article.created,'%D %M %Y') AS
aldate,url,icon,extra1,extra2,extra3,article.score AS
score,type,Unix_Timestamp(article.created) AS created,article.creator AS
creator,Unix_Timestamp(revised) AS
revised,revisor,revision,Unix_Timestamp(locked) AS
locked,locker,Unix_Timestamp(approved) AS
approved,approver,article.sitegroup,If(IsNull(calstart),'',If(caldays=0,Date_Format(calstart,'%d.%m.%Y'),Concat(Date_Format(calstart,If(Year(calstart)!=Year(From_Days(To_Days(calstart)+caldays)),'%d.%m.%Y',If(Month(calstart)!=Month(From_Days(To_Days(calstart)+caldays)),'%d.%m.','%d.'))),Date_Format(From_Days(To_Days(calstart)+caldays),'-%d.%m.%Y'))))
AS calendar,If(IsNull(calstart),'',If(caldays=0,Date_Format(calstart,'%D %b.
%Y'),Concat(Date_Format(calstart,If(Year(calstart)!=Year(From_Days(To_Days(calstart)+caldays)),'%D
%b. %Y',If(Month(calstart)!=Month(From_Days(To_Days(calstart)+caldays)),'%D
%b.','%D'))),Date_Format(From_Days(To_Days(calstart)+caldays),'-%D %b. %Y'))))
AS acalendar,If(IsNull(calstart),'',If(caldays=0,Date_Format(calstart,'%D %M
%Y'),Concat(Date_Format(calstart,If(Year(calstart)!=Year(From_Days(To_Days(calstart)+caldays)),'%D
%M %Y',If(Month(calstart)!=Month(From_Days(To_Days(calstart)+caldays)),'%D
%M','%D'))),Date_Format(From_Days(To_Days(calstart)+caldays),'-%D %M %Y')))) AS
alcalendar,Unix_Timestamp(calstart) AS
startdate,Unix_Timestamp(Date_Add(calstart, INTERVAL caldays DAY)) AS
enddate,caldays,Date_Format(calstart,'%d.%m.%Y') AS
calstart,Date_Format(From_Days(To_Days(calstart)+caldays),'%d.%m.%Y') As calstop
FROM article,person WHERE (article.topic IN (15,56) AND author=person.id AND
article.up=0 AND Unix_Timestamp(calstart)<507 AND
24*60*60-1+Unix_timestamp( Date_Add(calstart, INTERVAL
caldays DAY))>1) AND (article.sitegroup in (0,0) AND person.sitegroup in (0,
0)) ORDER BY article.calstart
When I run this statement in phpmyadmin I get 3 records
and no errors.
Any suggestions?
Dick
|
- Re: [midgard-user] problem with mgd_list_topic_calenda... Dick van der Kaaden
- Re: [midgard-user] problem with mgd_list_topic_ca... Emiliano
- Re: [midgard-user] problem with mgd_list_topic_ca... Jacques de Wit
- Re: [midgard-user] problem with mgd_list_topic_ca... Dick van der Kaaden
- Re: [midgard-user] problem with mgd_list_topic_ca... Emiliano
- Re: [midgard-user] problem with mgd_list_topic_ca... Emiliano
- Re: [midgard-user] problem with mgd_list_topi... Dick van der Kaaden
- Re: [midgard-user] problem with mgd_list_topic_ca... Jacques de Wit
- Re: [midgard-user] problem with mgd_list_topic_ca... Emiliano
- Re: [midgard-user] problem with mgd_list_topic_ca... Jacques de Wit
