Make sure shell commands are properly escaped. Store some parameters in a single array, for later use, rather than hard code in multiple places.
Pass some parameters to WikimediaHarvester constructor. This allows the same code to be used for trial runs without having any database running (e.g on a home machine). For instance, I'm now using the following 71_freestanding.php file to test the code, wthout a full EoL installation:

namespace php_active_record;
ini_set("memory_limit","4096M");
set_time_limit(0);
class id71 {
    public $id=71;
    public $accesspoint_url="http://dumps.wikimedia.org/commonswiki/latest/commonswiki-latest-pages-meta-current.xml.bz2";
};
$GLOBALS['ENV_DEBUG'] = true;
$GLOBALS['ENV_NAME'] = '';
$GLOBALS['ENV_DEBUG_TO_FILE'] = false;
if($GLOBALS['ENV_DEBUG']) error_reporting(E_ALL);
define("DOC_ROOT", "/Users/yan/Documents/Research/EoL/");
define("CONTENT_RESOURCE_LOCAL_PATH", "/Users/yan/Documents/Research/EoL/");
define('DOWNLOAD_TIMEOUT_SECONDS', '10');
define('DOWNLOAD_ATTEMPTS', '2');
define('DOWNLOAD_WAIT_TIME', '1000000');  // 2 second wait after every web request
define("WIKI_USER_PREFIX", "http://commons.wikimedia.org/wiki/User:");
define("WIKI_PREFIX", "http://commons.wikimedia.org/wiki/");

include('eol_php_code/lib/Functions.php');
include('eol_php_code/lib/FileIterator.php');
include('eol_php_code/vendor/php_active_record/classes/active_record_functions.php');
include('eol_php_code/vendor/wikipedia/WikiParser.php');
include('eol_php_code/vendor/wikipedia/WikimediaPage.php');
include('eol_php_code/vendor/wikipedia/WikimediaHarvester.php');
include('eol_php_code/vendor/eol_content_schema/SchemaAgent.php');
include('eol_php_code/vendor/eol_content_schema/SchemaDataObject.php');
include('eol_php_code/vendor/eol_content_schema/SchemaDocument.php');
include('eol_php_code/vendor/eol_content_schema/SchemaTaxon.php');
include('eol_php_code/vendor/eol_content_schema/SchemaPoint.php');
$w = new WikimediaHarvester(new id71(), "");
$w->begin_wikipedia_harvest();