Quote from: Krillin on June 30, 2011, 11:12:13 PM
[UPDATE: 5/1/2022] Replaced attachments due to complaints of file corruption. /pub/configs/sfg-default.php Seems to happen frequently with different files. Fixing issues like these regularlly with different file names.
$V0f14082c['parser-options']=array();
Quote from: VSP.PHP CLIPHP Warning: Illegal string offset 'savestate' in vsp.php on line 979here is line 979.
$V0f14082c['parser-options'][$V51d3ee44['argv'][$V363b122c]]=$V51d3ee44['argv'][$V363b122c+1];
function F92261ca6()
{
global $V51d3ee44;
if (cIS_SHELL) {
if (!isset($_SERVER['argc'])) {
echo "Error: args not registered.\n";
echo " register_argc_argv may need to be set to On in shell mode\n";
echo " Please edit your php.ini and set variable register_argc_argv to On\n";
F56fd05e9();
}
$V51d3ee44['argv']=$_SERVER['argv'];
$V51d3ee44['argc']=$_SERVER['argc'];
} else {
$V4f96c5a0=$_POST['V70e78261'];
if (get_magic_quotes_gpc()) {
$V4f96c5a0=stripslashes($V4f96c5a0);
}
$V51d3ee44=F126ba7b1("vsp.php ".$V4f96c5a0);
}
global $V0f14082c;
$V0f14082c['parser-options']="";
$V0f14082c['prompt']=1;
if ($V51d3ee44['argc']>1) {
for ($V865c0c0b=1;$V865c0c0b<$V51d3ee44['argc']-1;$V865c0c0b++) {
if (strcmp($V51d3ee44['argv'][$V865c0c0b], "-a")==0) {
$V865c0c0b++;
$V0f14082c['action']=$V51d3ee44['argv'][$V865c0c0b];
if ($V0f14082c['action']!='clear_db') {
Facf3bf61("error: invalid action");
}
break;
}
if (strcmp($V51d3ee44['argv'][$V865c0c0b], "-n")==0) {
$V0f14082c['prompt']=0;
continue;
}
if ($V865c0c0b+1 > $V51d3ee44['argc']-2) {
Facf3bf61("error: no value specified for option ".$V51d3ee44['argv'][$V865c0c0b]);
}
if (strcmp($V51d3ee44['argv'][$V865c0c0b], "-p")==0) {
$V865c0c0b++;
for ($V363b122c=$V865c0c0b;$V363b122c<$V51d3ee44['argc']-1;$V363b122c=$V363b122c+2) {
$V0f14082c['parser-options'][$V51d3ee44['argv'][$V363b122c]]=$V51d3ee44['argv'][$V363b122c+1]; //This is link 979
}
break;
} elseif (strcmp($V51d3ee44['argv'][$V865c0c0b], "-c")==0) {
$V865c0c0b++;
$V0f14082c['config']=$V51d3ee44['argv'][$V865c0c0b];
} elseif (strcmp($V51d3ee44['argv'][$V865c0c0b], "-l")==0) {
$V865c0c0b++;
$V0f14082c['log-gamecode']=$V51d3ee44['argv'][$V865c0c0b];
$V0f14082c['log-gametype']='';
if (preg_match("/(.*)-(.*)/", $V0f14082c['log-gamecode'], $Vb74df323)) {
$V0f14082c['log-gamecode']=$Vb74df323[1];
$V0f14082c['log-gametype']=$Vb74df323[2];
$V0f14082c['parser-options']['gametype']=$V0f14082c['log-gametype'];
}
} else {
Facf3bf61("error: invalid option ".$V51d3ee44['argv'][$V865c0c0b]);
}
}
} else {
Facf3bf61("error: logfile not specified");
}
$V0f14082c['logfile']=$V51d3ee44['argv'][$V51d3ee44['argc']-1];
if (!isset($V0f14082c['action'])) {
if (!isset($V0f14082c['logfile'])) {
Facf3bf61("error: logFile not specified");
}
if (!isset($V0f14082c['log-gamecode'])) {
Facf3bf61("error: logType not specified");
}
}
$V55d5b418="pub/configs/";
if (!isset($V0f14082c['config']) || preg_match("/\\.\\./", $V0f14082c['config']) || !is_file($V55d5b418.$V0f14082c['config'])) {
$V0f14082c['config']=$V55d5b418."cfg-default.php";
} else {
$V0f14082c['config']=$V55d5b418.$V0f14082c['config'];
}
echo "max_execution_time is ".ini_get("max_execution_time")."\n\n";
echo "[command-line options]: ";
print_r($V0f14082c);
if (isset($V0f14082c['parser-options']['savestate']) && $V0f14082c['parser-options']['savestate']) {
$Vb3521e13="writetest_".md5(uniqid(rand(), true));
$V2880b5ba = fopen('./logdata/'.$Vb3521e13, "wb");
if (!$V2880b5ba || !fwrite($V2880b5ba, "* WRITE TEST *\n")) {
echo "Error: savestate 1 processing requires logdata/ directory to be writable.\n";
echo " Enable write permissions for logdata/ directory (chmod 777)\n";
F56fd05e9();
}
fclose($V2880b5ba);
unlink("logdata/$Vb3521e13");
}
}
var_dump($V0f14082c);
array(6) {
'parser-options' =>
string(1) "g"
'prompt' =>
int(1)
'log-gamecode' =>
string(2) "hl"
'log-gametype' =>
string(0) ""
'logfile' =>
string(6) "./logs"
'config' =>
string(27) "pub/configs/cfg-default.php"
}
var_dump($V51d3ee44);
array(2) {
'argv' =>
array(7) {
[0] =>
string(7) "vsp.php"
[1] =>
string(2) "-l"
[2] =>
string(2) "hl"
[3] =>
string(2) "-p"
[4] =>
string(9) "savestate"
[5] =>
string(1) "1"
[6] =>
string(6) "./logs"
}
'argc' =>
int(7)
}
var_dump($V865c0c0b)
NULL
var_dump($V363b122c)
NULL
Quote from: VSP.PHP CLIPHP Warning: Illegal string offset 'trackID' in vsp.php on line 1038here is line 1038
$V0f14082c['parser-options']['trackID']=$GLOBALS['cfg']['parser']['trackID'];
function F68c076b3()
{
global $V0f14082c;
global $V51d3ee44;
require_once($V0f14082c['config']);
if (preg_match("/^ftp:\\/\\//i", $V0f14082c['logfile'])) {
$V0f14082c['logfile']=Fd2c39001($V0f14082c['logfile']);
}
$V0f14082c['parser-options']['trackID']=$GLOBALS['cfg']['parser']['trackID']; // This is link 1038
if (isset($GLOBALS['cfg']['db']['adodb_path'])) {
$GLOBALS['cfg']['db']['adodb_path']=F9578dd1f($GLOBALS['cfg']['db']['adodb_path']);
} else {
$GLOBALS['cfg']['db']['adodb_path']=F9578dd1f(Ce5c65ec5).'pub/lib/adodb/';
}
require_once("{$GLOBALS['cfg']['db']['adodb_path']}".'adodb.inc.php');
include_once("{$GLOBALS['cfg']['db']['adodb_path']}".'tohtml.inc.php');
require_once("sql/{$GLOBALS['cfg']['db']['adodb_driver']}.inc.php");
include_once("pub/include/playerBanList-{$GLOBALS['cfg']['player_ban_list']}.inc.php");
foreach ($GLOBALS['player_ban_list'] as $V7fa3b767 => $V36190f8a) {
$GLOBALS['player_ban_list'][$V7fa3b767]="/^".preg_quote($V36190f8a)."$/";
}
$GLOBALS['V9c1ebee8'] = &ADONewConnection($GLOBALS['cfg']['db']['adodb_driver']);
global $V9c1ebee8;
if (!$V9c1ebee8->Connect($GLOBALS['cfg']['db']['hostname'], $GLOBALS['cfg']['db']['username'], $GLOBALS['cfg']['db']['password'], $GLOBALS['cfg']['db']['dbname'])) {
echo "Attempting to create/connect to database {$GLOBALS['cfg']['db']['dbname']}\n";
$GLOBALS['V9c1ebee8'] = null;
$GLOBALS['V9c1ebee8'] = &ADONewConnection($GLOBALS['cfg']['db']['adodb_driver']);
global $V9c1ebee8;
$V9c1ebee8->Connect($GLOBALS['cfg']['db']['hostname'], $GLOBALS['cfg']['db']['username'], $GLOBALS['cfg']['db']['password']);
$V9c1ebee8->Execute($sql_create[0]);
if (!$V9c1ebee8->Connect($GLOBALS['cfg']['db']['hostname'], $GLOBALS['cfg']['db']['username'], $GLOBALS['cfg']['db']['password'], $GLOBALS['cfg']['db']['dbname'])) {
echo " - failed to create/connect to database {$GLOBALS['cfg']['db']['dbname']}\n";
F56fd05e9();
}
echo " - database created\n";
}
if (isset($V0f14082c['action']) && $V0f14082c['action']=="clear_db") {
if (cIS_SHELL && $V0f14082c['prompt']) {
echo "Are you sure you want to clear the database {$GLOBALS['cfg']['db']['dbname']} @ {$GLOBALS['cfg']['db']['hostname']}? (y/n)\n";
Fa10803e1();
$Vd0cf705f=Fd63c38c9();
} else {
$Vd0cf705f='y';
}
if ($Vd0cf705f=='y' || $Vd0cf705f=='Y') {
foreach ($sql_destroy as $V7fa3b767 => $Vac5c74b6) {
$V9c1ebee8->Execute($Vac5c74b6);
}
print "{$GLOBALS['cfg']['db']['table_prefix']}* tables in {$GLOBALS['cfg']['db']['dbname']} @ {$GLOBALS['cfg']['db']['hostname']} has been cleared\n";
}
Fa3e3aec1();
}
foreach ($sql_create as $V7fa3b767 => $Vac5c74b6) {
if ($V7fa3b767==0) {
continue;
}
$V9c1ebee8->Execute($Vac5c74b6);
}
$V9c1ebee8->SetFetchMode(ADODB_FETCH_NUM);
if (!is_dir("pub/games/{$GLOBALS['cfg']['game']['name']}")) {
echo "Error: The variable \$cfg['game']['name'] is not set properly in config file.\n";
echo " Edit your config file ({$V0f14082c['config']})\n";
echo " Read the comments beside that variable and set that variable properly.\n";
F56fd05e9();
}
if (!file_exists("vsp-{$V0f14082c['log-gamecode']}.php")) {
Facf3bf61("error: unrecognized logType");
}
require_once("vsp-{$V0f14082c['log-gamecode']}.php");
include_once("pub/games/{$GLOBALS['cfg']['game']['name']}/skillsets/{$GLOBALS['cfg']['skillset']}/{$GLOBALS['cfg']['skillset']}-skill.php");
if (!isset($GLOBALS['skillset'])) {
echo "Skill Definitions not found.\n";
echo " "."pub/games/{$GLOBALS['cfg']['game']['name']}/skillsets/{$GLOBALS['cfg']['skillset']}/{$GLOBALS['cfg']['skillset']}-skill.php"."\n";
}
$V21d8a920 = new F622a322a();
$Vae2aeb93 = new F02ac4643();
$V8db265ff=strtoupper($V0f14082c['log-gamecode']);
eval("\$V3643b863 = new VSPParser$V8db265ff(\$V0f14082c['parser-options'],\$V21d8a920,\$Vae2aeb93);");
$V3643b863->F1417ca90($V0f14082c['logfile']);
$V21d8a920->F215f9169();
}
Quote from: Krillin on December 13, 2018, 08:32:11 AMWow, this proved to be an easy fix. The first error was simple, but with nothing to work with, I cannot be certain this fix will work. Basically this is broken down to the fact that in PHP7 Class and Functions cannot have the same name, so the function was shortened and renamed being as a function is set on a per mod bases where as a class is a variable set globally so changing the function name should prove to be harmless.Quote from: JohnDory on November 12, 2018, 08:20:44 AMSorry or the delay. But the error messages you are showing here are NOT critical to the functionality of the engine. The error message is just a warning of a depreciated (soon to be disabled) function. I will look into the issue. Thank you for the information.
PHP has been updated, now we have to use v7.2 and get the following errors[24-Oct-2018 17:57:09 UTC][24-Oct-2018 17:57:10 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; VSPParserWET has a deprecated constructor in /home/harry/public_html/et/stats/hh/vsp-wet.php on line 2
[24-Oct-2018 17:57:10 UTC] PHP Warning: Use of undefined constant UTC - assumed 'UTC' (this will throw an Error in a future version of PHP) in /home/harry/public_html/et/stats/hh/vsp.php on line 401
Any chance of a fix ?
Krillin
Quote from: JohnDory on December 07, 2018, 04:24:15 PM
Anyone any idea's how to fix it ?
if not we'll have to find another stats system.
Page created in 0.326 seconds with 13 queries.