Thread: Add-On Releases - vbRosterMaster
View Single Post
  #19  
Old 07-01-2007, 07:29 AM
SuprSurfr SuprSurfr is offline
 
Join Date: Apr 2005
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not sure what I did wrong...
I am using PHP Version 5.2.3 and mysql 5.0.41

When I try and run the scheduled task to populate the database I get the following error:

Code:
RosterMasterUpdater 

db)) { exit; } //require_once(DIR . '/includes/rostermaster/logging.php'); function error_message($message, $sql="") { //todo vbulletin log error echo "
" ."
Roster Master Error

" ."Error:
" ."$message

"; // Show's over. exit; } // FUNCTION: rm_prune_log() // Delete log entries older than specified number of days. // Arguments: $days - Maximum age (in days) to keep // Returns: None. function rm_prune_log($days) { global $vbulletin; $cutoff = (time() - ($days * 60 * 60 * 24)); $query = "DELETE FROM " . TABLE_PREFIX . "roster_master_log " ."WHERE date < $cutoff"; if(!($result = $vbulletin->db->query($query))) { error_message('rostermaster_unable_to_prune_database',$query); } } function add_to_log($type, $message, $level=1) { global $vbulletin; if ($level <= $vbulletin->options['rostermaster_logging_verbosity']) { $query = "INSERT INTO " . TABLE_PREFIX . "roster_master_log " ."(date, type, message, level) " ."VALUES (" .time().",'$type','".addSlashes($message)."', $level)"; } } // *********************************XML Parser ***************************************** function startElement($parser, $name, $attr) { global $member, $currentElement, $row; if ($name == 'member') { $member = TRUE; $row = array(); } // name and level are sub-elements of characterclass/artisanclass. // If we were handling something involving char/artisanclass, we modify the element // name to discern wether we're working on the name or the level sub-elements. $matches = array(); if ($member && preg_match('/^(characterclass|artisanclass)/', $currentElement, $matches)) { $currentElement = $matches[1].'<'.$name; } else { $currentElement = $name; } } function characterData($parser, $data) { global $member, $currentElement, $row; if ($member) { $data = trim($data); switch ($currentElement) { case 'link': $field = 'Char_id'; break; case 'name': $field = 'Name'; break; case 'lastname': $field = 'Lastname'; break; case 'rank': $field = 'Rank'; break; case 'characterclass~\\1~<",$row[$field]); } } } } function endElement($parser, $name) { global $member, $currentElement, $row, $rm_roster_data, $vbulletin; switch ($name) { // We were working on sub-elements of either of these case 'characterclass': case 'artisanclass': $currentElement = ''; break; // We just finished processing a member. case 'member': // We have everything expected to form a full member - processing it if (count($row) == 14) { // Convert date to timestamp. if ($row['Joined']) { $row['Joined'] = strtotime($row['Joined']); } // Clean up numbers, so they can be easily sorted. // We can reformat at display time if needed. $row['Quests'] = str_replace(',', '', $row['Quests']); // $row['KVD'] = floatval($row['KVD']); $row['Points'] = str_replace(',', '', $row['Points']); // $row['highestmeleehit'] = intval($row['highestmeleehit']); // $row['highestmagichit'] = intval($row['highestmagichit']); $row['rank_value'] = (!empty($rmconfig['lookup_rank'][$row['Rank']])) ? $rmconfig['lookup_rank'][$row['Rank']] : 99; // Create a rank_value based on the lookup // Store element data in global array. $rm_roster_data[$row['Name']] = $row; // Reset for next member element. $member = FALSE; } else { $GLOBALS['badlines']++; } break; } } // Function: fetch_URL() // Retrieve the requested webpage and returns it // Arguments: $url_fetch = the url of the desired webpage // // Return: The content of the retrieved URL, or NULL if an error occured. function fetch_URL($url_fetch) { global $vbulletin; if ($vbulletin->options['rostermaster_curluse']) { $cUrl = curl_init(); curl_setopt($cUrl, CURLOPT_URL, $url_fetch); curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cUrl, CURLOPT_TIMEOUT, '30'); if (($vbulletin->options['rostermaster_curlip']) && ($vbulletin->options['rostermaster_curlport'])) { curl_setopt($cUrl, CURLOPT_PROXY, "{$vbulletin->options['rostermaster_curlip']}:{$vbulletin->options['rostermaster_curlport']}"); } $pageContent = curl_exec($cUrl); // If there was an error, close the handle and report error message. if (curl_errno($cUrl)) { // Build error message before closing handle and exiting to the error display function. $errormsg = "(CURL) Error ".curl_errno($cUrl).": ".curl_error($cUrl)."

\n" ."Cannot retrieve data from the EQ2Players website!"; curl_close($cUrl); add_to_log("Error",$errormsg,1); return NULL; } curl_close($cUrl); } else { if (!($pageContent = file_get_contents($url_fetch))) { add_to_log("Error","Cannot retrieve data from the EQ2Players website!",1); } } return $pageContent; } // Function: parse_guild_HTML() // Retrieves and parses the HTML guild summary page from the EQ2players.com site. // Arguments: &$log = pointer to the log array (used by the flatfile log) // $url = URL of the Guild Summary page on EQ2Players.com // Returns: TRUE on success. function parse_guild_HTML(&$log, $url) { global $vbulletin, $mod_dirname,$rm_roster_data,$rm_summary_data; // Fetch and parse the guild summary page. $i = 0; $rlimit = 1; do { if ($raw_data = fetch_URL($url)) { // Got the data, bail out of the loop. break; } $stime = pow(3, $i++); if ($i < $rlimit) { // Sleep for 3^n seconds... sleep($stime); } } while ($i < $rlimit); if (empty($raw_data)) { // Unable to read the URL as presented add_to_log("Error","Unable to access EQ2Players for HTML parsing!",1); return FALSE; } // Verify that the configured guild name is found on the webpage. if (strpos($raw_data, $vbulletin->options['rostermaster_guild_name']) === FALSE) { error_message(''.sprintf('(XML) '._ERR_GRGNSC, $vbulletin->options['rostermaster_guild_name'])."
I couldnt post the entire output, if you need more let me know.
any suggestions?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01054 seconds
  • Memory Usage 1,799KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete