Did I introduce funny characters by mistake?
It's always a possibility. The reason I asked though was because this
happens a lot to users of MS Notepad and Wordpad.
Check to make sure that there is no whitespace in the document before the
leading "<?php", or after the ending "?>". These are common
places where
this kind of thing pops up.
Whenever you see "Warning: Cannot modify header information", accidental
whitespace is a good thing to check (and is quite often - though not always
- the culprit).
On 2/23/07, Ken McDonald <ken(a)pixologic.com> wrote:
>
> Copied from a display of the script in the terminal window, edited in
> jEdit, pasted back into vi. The script is on a remote system which
> doesn't have a decent editor installed (I don't know vi), so this is the
> quickest way for me to edit and to use a highlighting editor.
>
Did I introduce funny characters by mistake?
>
> Editing is on OS X. Remote system is Linux.
>
>
> Thanks!
> Ken
>
>
>
> Jim Wilson wrote:
> > What text editor did you use to write this extension?
> >
> > -- Jim
> >
> > On 2/23/07, Ken McDonald <ken(a)pixologic.com> wrote:
> >
> >> Copying from the nice gflash extension, I came up with the following
> for
> >> (hopefully) embedding quicktime movies;
> >>
> >> ------
> >> <?php
> >> # Example WikiMedia extension
> >> # with WikiMedia's extension mechanism it is possible to define
> >> # new tags of the form
> >> # <TAGNAME> some text </TAGNAME>
> >> # the function registered by the extension gets the text between the
> >> # tags as input and can transform it into arbitrary HTML code.
> >> # Note: The output is not interpreted as WikiText but directly
> >> # included in the HTML output. So Wiki markup is not supported.
> >> # To activate the extension, include it from your LocalSettings.php
> >> # with: include("extensions/qtmov.php");
> >>
> >> $wgExtensionFunctions[] = "wfQTMovExtension";
> >>
> >> function wfQTMovExtension() {
> >> global $wgParser;
> >> # register the extension with the WikiText parser
> >> # the first parameter is the name of the new tag.
> >> # the second parameter is the callback function for processing the text
> >> between the tags
> >> $wgParser->setHook( "qtmov", "renderQTMov" );
> >> }
> >>
> >> # The callback function for converting the input text to HTML output
> >> function renderQTMov( $input ) {
> >>
> >> $exploin = explode(" ",$input);
> >>
> >> $output = "<embed width='" . $exploin[0] . "'
height='" . $exploin[1] .
> >> "' align='middle' src='" . $exploin[2] .
"' quality='high'>";
> >>
> >> return $output;
> >> }
> >> ?>
> >> -------------
> >>
> >> Unfortunately, I seem to have introduced an error somewhere; I get the
> >> following errors showing up on the web page when I attempt to
'include'
> >> the extension;
> >>
> >>
> >> Warning: Cannot modify header information - headers already sent by
> >> (output started at
> /home/www/data/beta_wiki/extensions/qtmov.php:34)
> >> in /home/www/data/beta_wiki/includes/OutputPage.php on line 575
> >>
> >> Warning: Cannot modify header information - headers already sent by
> >> (output started at /home/www/data/beta_wiki/extensions/qtmov.php:34) in
> >> /home/www/data/beta_wiki/includes/OutputPage.php on line 576
> >>
> >>
> >> gflash, however, is installed and working fine. The only place I made a
> >> significant change to the script is in the construction of the output
> >> string, and from what I can infer from the original gflash script, what
> >> I did should at the least be valid PHP, even if it doesn't produce the
> >> output I'm trying for.
> >>
> >> Anyone see a quick fix?
> >>
> >>
> >> Thanks,
> >> Ken
> >>
> >> _______________________________________________
> >> MediaWiki-l mailing list
> >> MediaWiki-l(a)lists.wikimedia.org
> >>
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>
> >>
> > _______________________________________________
> > MediaWiki-l mailing list
> > MediaWiki-l(a)lists.wikimedia.org
> >
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> >
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l(a)lists.wikimedia.org
>
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>