I downloaded and installed Mediawiki 1.5.5 a few days ago, and have been having a look. I have pretty good experience in PHP, but it's my first look at Mediawiki.
One of the biggest things I have noticed is:
a) echo, doesn't
b) if I try and create my own "test_wiki.php" file calling wiki functions/methods, I get I think errors but all that is displayed on the screen is a complete blank
I suppose these things are basically the same thing. Is "echo" disabled? Is there some other global setting I haven't seen which is stopping output to the screen? Is there some magic constant that I have to set to get debug output (I have found $wgDebugLogFile, $wgDebugRedirects, $wgDebugRawPage, $wgDebugComments, $wgReadOnly, $wgLogQueries, $wgDebugDumpSql but they don't seem to help much).
Thanks for any help.
Hugh Prior
Hugh Prior wrote:
I downloaded and installed Mediawiki 1.5.5 a few days ago, and have been having a look. I have pretty good experience in PHP, but it's my first look at Mediawiki.
One of the biggest things I have noticed is:
a) echo, doesn't
The wiki's template and primary output is handled by the OutputPage class which outsources to a Skin class. You shouldn't use 'echo' directly during some processing stage, since you would interrupt this process and appear before the beginning of the HTML output.
If you're doing something separate from the standard HTML (such as an RSS feed, custom protocol, etc), then you want to do $wgOut->disable() and you must handle all remaining output yourself.
b) if I try and create my own "test_wiki.php" file calling wiki functions/methods, I get I think errors but all that is displayed on the screen is a complete blank
Fix your PHP settings for error display/logging.
See the existing example scripts. MediaWiki works primarily through a single entry point into the system (index.php), with special functions performed through 'special page' interfaces. A few rare functions use separate entry points (img_auth.php etc) and need to duplicate various initialization steps.
-- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org