Edward Peschko wrote:
a couple of questions - what are the prerequisites for
running
'index.php' at the command line, eg:
php index.php
doesn't seem to do anything.
Ultimately, I'd like to be able to run index.php sans browser and be
able to debug based on the output that comes to standard out...
MediaWiki's index.php is the web entry point and is not designed to be
run from the command line. You'll see no output because it's trying to
use an HTTP header to redirect you to the main page; the header is not
output by PHP's command-line mode.
If you want to run the web output from a command line, you should use a
PHP CGI executable and set up the CGI environment variables.
There are numerous command-line entry points in the maintenance
subdirectory, mostly special-purpose. eval.php provides a somewhat
primitive interactive PHP interpreter within the active MediaWiki code
environment. (You really, really want PHP compiled with readline support
or this will be painful. :)
is there a good class pretty printer for php? I
noticed that - unlike
perl - var_export, print_r, etc, don't seem to handle classes very well.
I'd like to be able to say:
var_export($class_reference);
and have php print out all the associated class variables and
object variables.
So far as I know, PHP doesn't have metaclasses or class variables.
-- brion vibber (brion @
pobox.com)