pp | 1 Jul 10:42

Re: Announcement: Midgard 1.5.0 "Biergarten" released

Hi , 

  pageresolve.h

     25 #if HAVE_MIDGARD_PAGE_OWNER
     26   int owner;
     27 #endif /* HAVE_MIDGARD_PAGE_OWNER */

  pageresolve.c

    339 #if HAVE_MIDGARD_MULTILANG
    340       result->owner = atol(mgd_colvalue(res, 4));
    341 #endif /* HAVE_MIDGARD_MULTILANG */

Shouldn't it be 

    339 #if HAVE_MIDGARD_PAGE_OWNER
    340       result->owner = atol(mgd_colvalue(res, 4));
    341 #endif /* HAVE_MIDGARD_PAGE_OWNER  */

?????
Someone compiled that from latest release?
Does that feature require page table altering?

Piotras
Torben Nehmer | 2 Jul 16:36
Gravatar

Strange Problem with serving attachments & output buffering


Hi Guys,

I have a very strange, intermittent problem while createing MidCOM Sites,
reproducible over two similar installations. I'm at the end of my wisdom,
perhaps someone of you can help me:

Software: Apache/1.3.26 (Unix) Debian GNU/Linux Midgard/1.4.4/SG
PHP/4.1.2 mod_ssl/2.8.9 OpenSSL/0.9.6g (Debian Woody)

What I do get are PHP Errors roughly looking like this:

[Wed Jul  2 15:12:26 2003] [error] PHP Warning:  Cannot add header
  information - headers already sent by (output started at ŒìÔú^Q:807) in
  code-global(4) : eval()'d code(19) : eval()'d code on line 170
[Wed Jul  2 15:12:27 2003] [error] PHP Warning:  Cannot add header
  information - headers already sent by (output started at dba_open:807)
  in code-global(4) : eval()'d code(19) : eval()'d code on line 170
[Wed Jul  2 15:12:27 2003] [error] PHP Warning:  Cannot add header
  information - headers already sent by (output started at ^A:810)
  in code-global(4) : eval()'d code(19) : eval()'d code on line 170
[Wed Jul  2 15:12:27 2003] [error] PHP Warning:  Cannot add header
  information - headers already sent by (output started at ¹ÔÄ:807) in
  code-global(4) : eval()'d code(19) : eval()'d code on line 170
[Wed Jul  2 15:12:15 2003] [error] PHP Warning:  Cannot add header
  information - headers already sent by (output started at
  midcom-cache-nocache:807) in code-global(4) : eval()'d code(19) :
  eval()'d code on line 170
[Wed Jul  2 15:12:16 2003] [error] PHP Warning:  Cannot add header
  information - headers already sent by (output started at Could not
(Continue reading)

Torben Nehmer | 2 Jul 17:03
Gravatar

Re: Strange Problem with serving attachments & output buffering


Hi again,

--on 2003-07-02 16:36 +0200 Torben Nehmer wrote:

> header ($etag_header);

This is the line 170 which finally triggers this error.

Live long and prosper!
Torben Nehmer

--
Torben Nehmer, Munich, Germany
http://www.nathan-syntronics.de, mailto:torben@...
PGP Public Key: https://www.link-m.de/pgp/t.nehmer.asc
pp | 2 Jul 19:07

Re: Strange Problem with serving attachments & output buffering

Torben Nehmer <torben@...> wrote:

> > header ($etag_header);
> 
> This is the line 170 which finally triggers this error.

Yeah , debugging midgard eval'ed code line is not funny...

I copied Your code to an Empty styled page , replaced stat[] with time() function to get any output.
Nothing happens till I call mgd_serve_attachment....
After that all console with php.log file is worst than japanese for European man.

Piotras
Torben Nehmer | 2 Jul 19:02
Gravatar

Re: Strange Problem with serving attachments & output buffering


Hi,

--on 2003-07-02 16:36 +0200 Torben Nehmer wrote:

I think I further cornered the bug:

> mgd_serve_attachment ($attachment->id);

After this line, PHP refuses to add further headers, with the error
messages outlined above.

If you replace this call with the following code, everything works like
you would expect it:

header("Content-Type: $attachment->mimetype");
$f = mgd_open_attachment($attachment->id, "r");
fpassthru ($f);

Has anybody an idea if this is a Midgard Bug or <sarcasm> one more damned
PHP "Feature" </sarcasm>?

Live long and prosper!
Torben Nehmer

--
Torben Nehmer, Munich, Germany
http://www.nathan-syntronics.de, mailto:torben@...
PGP Public Key: https://www.link-m.de/pgp/t.nehmer.asc
(Continue reading)

pp | 2 Jul 19:24

Re: Strange Problem with serving attachments & output buffering

Torben Nehmer <torben@...> wrote:

> Has anybody an idea if this is a Midgard Bug or <sarcasm> one more damned
> PHP "Feature" </sarcasm>?

I could bet for SAPI , but I am not master.
Piotras
Alexander Bokovoy | 2 Jul 19:37

Re: Strange Problem with serving attachments & output buffering

On Wed, Jul 02, 2003 at 07:02:41PM +0200, Torben Nehmer wrote:
> I think I further cornered the bug:
> 
> > mgd_serve_attachment ($attachment->id);
> 
> After this line, PHP refuses to add further headers, with the error
> messages outlined above.
That's correct. mgd_serve_attachement() issues header with corresponding
MIME type, then sends content of the attachement. This is how it was
designed to work.

--

-- 
/ Alexander Bokovoy
---
In Nature there are neither rewards nor punishments, there are consequences.
		-- R.G. Ingersoll
Torben Nehmer | 4 Jul 13:57
Gravatar

Re: Strange Problem with serving attachments & output buffering


Hi Alexander,

--on 2003-07-02 20:37 +0300 Alexander Bokovoy wrote:

> > > mgd_serve_attachment ($attachment->id);
> >
> > After this line, PHP refuses to add further headers, with the error
> > messages outlined above.
>
> That's correct. mgd_serve_attachement() issues header with corresponding
> MIME type, then sends content of the attachement. This is how it was
> designed to work.

I know that. That is why I have enclosed the call in an PHP output buffer.
You know, the attachment data does in fact land in the buffer, so I never
suspected a problem there. It seems to confuse PHP, as PHP does not send
any output to the client but produces the error above. In other words: the
macro PHPWRITE seems to break PHPs output buffering...

Solution for MidCOM: I reimplemented mgd_serve_attachment on application
level ($midcom->serve_attachment).

Live long and prosper!
Torben Nehmer

--
Torben Nehmer, Munich, Germany
http://www.nathan-syntronics.de, mailto:torben@...
PGP Public Key: https://www.link-m.de/pgp/t.nehmer.asc
(Continue reading)

Martin Langhoff | 5 Jul 02:50
Picon

Midgard howto's and techniques on website

Long time ago we discussed that beyond the Midgard Manual, which is 
focused on reference and install procedures, something that was really 
needed was a "techniques" or "how-to" section on the website.

It was part of the next redesign, I was told. Wait.

So I waited. This morning in the shower I was thinking of finally 
writing all this stuff for the Midgard website, now that it's been 
redesigned. But the redesign did not address the website sections or 
navigation. So here's my question again: can we open a 'techniques' or 
howto area?

Notes:
 - News doesn't quite cope with it as its index acts as a "sliding window".
 - Updates was cool, a blog (with comments and links) seems a good fit 
for this except for the "sliding window" indexing thing... it's offline 
now, anyway.
 - FAQ is good for short answers. I am thinking long answers...
 - I don't want to post them in my website, as my website is quite 
volatile/unstable.
 - I am more than happy to write some entries 1st and put them to the 
list for QA and discussion

kind regards,

martin
John Habermann | 5 Jul 17:19
Picon

Re: Midgard howto's and techniques on website

I think that is a great idea. There are a lot of usability issues and tips and tricks particularly for how the
different CMS's built on Midgard work that aren't really documented on the website at all. It would be good
to pull all the stuff that is scattered in the mailing lists and on various peoples sites onto the main
midgard site, even if it is in some cases just providing links. Would definitely help to make midgard a more
user friendly CMS. As someone with little programming skills this is probably the only area where I can
make a useful contribution so I would be glad to help out.

Cheers
John

On Sat, 05 Jul 2003 12:50:58 +1200
Martin Langhoff <ml@...> wrote:

> Long time ago we discussed that beyond the Midgard Manual, which is 
> focused on reference and install procedures, something that was really 
> needed was a "techniques" or "how-to" section on the website.
> 
> It was part of the next redesign, I was told. Wait.
> 
> So I waited. This morning in the shower I was thinking of finally 
> writing all this stuff for the Midgard website, now that it's been 
> redesigned. But the redesign did not address the website sections or 
> navigation. So here's my question again: can we open a 'techniques' or 
> howto area?
> 
> Notes:
>  - News doesn't quite cope with it as its index acts as a "sliding window".
>  - Updates was cool, a blog (with comments and links) seems a good fit 
> for this except for the "sliding window" indexing thing... it's offline 
> now, anyway.
(Continue reading)


Gmane