Hi,
I found the problem. Midgard makes apache seg fault if there is an article
for the topic in the selection that does not have a calendar set.
If all articles have calendar dates then there is no problem. Looks like a
bug and makes the usage of the calendar functions tricky.
Dick
----- Original Message -----
From: "Jacques de Wit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 10:43 AM
Subject: Re: [midgard-user] problem with mgd_list_topic_calendar_all
> Hi all,
>
> I'm having the same problems. This should be a high priority fix
> because it makes Midgard 1.4 unsuitable for distribution and
> production.
>
> Regards,
> Jacques
>
> Op 23 May 2001, om 0:04 schreef Dick van der Kaaden:
>
> Hi,
>
> I found acause 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=''||l
> astname='','',' '),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
> 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 phpmyadminI get 3 records and no
> errors.
>
> Any suggestions?
>
> Dick
>
> _________________________________________________
> Netrex Internet Solutions
> Hosting, Webdesign, E-commerce, Content Management
> Postbus 53055
> 2505 AB Den Haag
> The Netherlands
> Telefoon +31 (0)70 - 368 62 46
> Fax +31 (0)70 - 368 62 68
> E-mail [EMAIL PROTECTED]
> Website http://www.netrex.nl
> Webcam http://www.netrex.nl/webcam/jacques
> _________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]