--- On Sun, 8/23/09, Andrew Garrett <[email protected]> wrote:
> $ MW_INSTALL_PATH=/var/wiki/mediawiki php/maintenance/update.php
I don't understand the point you are making. If an MW administrator can set
environmental variables, then, of course, what you suggests works. However,
Brion mentions in his Tues, Aug 11, 10:09 email that not every MW installation
admin can set environmental variables and Aryeh states in his Tues, Aug. 11,
10:09am message that some MW administrators only have FTP access to the
installations they manage. So, as I understand it some administrators cannot
use the tactic you describe.
An important issue is whether these admins have access to command line
utilities at all. If not, then the use of file position dependent code in
command line utilities can be eliminated by substituting:
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) die();
for (taken from dumpHTML.php):
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = dirname(__FILE__).'/../..';
This works if only admins who can set environmental variables can execute MW
command line utilities.
If there are administrators who can execute command lines, but cannot set
environmental variables (e.g., they are confined to use a special shell), then
what I suggested in the previous email eliminates file position dependency.
That is, the command line would be:
php -d include_path=<include_path in php.ini>:<directory to MWInit.php>
<utility>.php
If an admin can execute php <utility>.php, he should be able to execute the
prior command.
Dan
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l