call application_top
properly
Hmm... the "properly" bit is escaping me. Just including it crashes the application thats using it. The usual php error log is empty.
The structure of the file is like this
PHP Code:
include("xmlrpcutils/xmlrpc.inc");
include("xmlrpcutils/xmlrpcs.inc");
include("../../includes/configure.php");
//include("../../includes/application_top.php");//crashes application
define('RESPONSE_ENCODING', 'UTF-8'); //It must be your DDBB encoding
define('DEBUG_FILE', 'debug.xmlrpc.txt'); //Absolute path to debug and warning file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$con = mysql_pconnect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
mysql_select_db(DB_DATABASE);
followed by a list of the various functions, for example
PHP Code:
function get_taxes() {
debug('fn '.__FUNCTION__ . ' ('. __LINE__.', '.date('d/m/Y,H:i:s').')');//steve
$taxes = array();
$result = mysql_query("select tax_class_id, tax_class_title from tax_class;");
if ($result) while ($row = mysql_fetch_row($result)) {
$taxes[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval($row[1], "string")), "array");
}
return new xmlrpcresp( new xmlrpcval($taxes, "array"));
}
(Since this file is in a known location, I assume its vulnerable to cross-site scripting with the query as is?)
and at the end the creation of the new server object
PHP Code:
$server = new xmlrpc_server( array( "get_taxes" => array( "function" => "get_taxes",
"signature" => array( array($xmlrpcArray)
)
),
etc...
This issue is now more than a desire than just wanting access to be logged...the function that gets the payment methods chokes on paypalwpp as that payment method class references the base class and calls zen_functions which this file can't find, so I assume getting application_top called properly would solve that issue...
Bookmarks