Karpathos Posted November 30, 2006 Share Posted November 30, 2006 Hello everyone, I am trying to set up a php page I downloaded from a mod website. This program is supposed to display a list of names and accesses a MySQL database. I have eveything working and one of the php pages displays fine, but when I browse to the address I get these errors:Warning: main(//sk_list/sklist.php): failed to open stream: No such file or directory in /home/www/wowarcraft.awardspace.com/sk_list/index.php on line 215Warning: main(): Failed opening '//sk_list/sklist.php' for inclusion (include_path='.:/usr/local/php4/share/pear') in /home/www/wowarcraft.awardspace.com/sk_list/index.php on line 215I think this is telling me it can't find sklist.php but it is in the same directory as the index.php file. Can you guys tell me what I am doing wrong here? Thanks for any help. Here is the index.php file [code]<?error_reporting(E_ALL ^ E_NOTICE);/*----------------------------------------------------------------------index.php - Displays information from the sk_list table------------------------------------------------------------------------Date : Monday Jan 23, 2006Copyright : B. Travis TurnerEmail : [email protected]You are free to modify these files for your own personal use as long asthis header and all copyright information remains intact. However, thesefiles cannot be redistributed after modification without explicit writtenpermission from the author.See http://creativecommons.org/licenses/by-nc-nd/2.5/ for completecopyright information.----------------------------------------------------------------------*/ // Report all errors except E_NOTICE // This is the default value set in php.ini error_reporting(E_ALL ^ E_NOTICE); require('config.php'); // SK_List config file putenv('TZ='.$timezone); // Sets the timezone (Defined in config.php) mysql_connect($db_host,$db_user,$db_pass); mysql_select_db($db_name); // If the file exists, display a timestamp if(file_exists("files/SuicideKings.lua")) { $timestamp = '(Last Updated '.date("m-d-Y H:i:s T",filemtime("files/SuicideKings.lua")).')'; } // If user has chosen from the drop-down, set the list if($_REQUEST['list']) { $currentList = $_REQUEST['list']; } if($_REQUEST['prefix']) { $currentPrefix = $_REQUEST['prefix']; } $listArr = Array(); $prefixArr = Array(); $query = "SELECT * FROM sk_list ORDER BY list"; $dropList = mysql_query($query); while($lists = mysql_fetch_array($dropList)) { //echo '<pre>'; //var_dump($lists); //echo '</pre>'; // If $currentList hasn't been set, default to the first list if(!$currentList) { $currentList = $defaultList; $currentPrefix = $lists['prefix']; } if($use_prefixes == 1) { // Check against the $prefixArr to make sure we don't get duplicates if(!in_array($lists['prefix'],$prefixArr)) { // If $currentPrefix is set, make it selected in the drop-down if($lists['prefix'] == $currentPrefix) { $selected = ' selected'; } else { $selected = ''; } // Build the drop-down box $prefixArr[] = $lists['prefix']; $prefix_name .= '<option value="'.$lists['prefix'].'"'.$selected.'>'.$lists['prefix'].'</option> '; } // Check against the $listArr to make sure we don't get duplicates if(!in_array($lists['list'],$listArr)) { // If $currentList is set, make it selected in the drop-down if($lists['list'] == $currentList) { $selected = ' selected'; } else { $selected = ''; } // Build the drop-down box $listArr[] = $lists['list']; $list_name .= '<option value="'.$lists['list'].'"'.$selected.'>'.$lists['list'].'</option> '; } } else { // Check against the $listArr to make sure we don't get duplicates if(!in_array($lists['list'],$listArr)) { // If $currentList is set, make it selected in the drop-down if($lists['list'] == $currentList) { $selected = ' selected'; } else { $selected = ''; } // Build the drop-down box $listArr[] = $lists['list']; $list_name .= '<option value="'.$lists['list'].'"'.$selected.'>'.$lists['list'].'</option> '; } } } $query = "SELECT * FROM sk_list WHERE list='".$currentList."' AND prefix='".$currentPrefix."' ORDER BY position"; $sklist = mysql_query($query); // When user selects a specific list, grab records that match that list while($players = mysql_fetch_array($sklist)) { // Default color $color = ' style="color: '.$default_color.';"'; // Grab the records from sk_class if classes or colors are enabled if($use_class_display == 1 || $use_class_color == 1) { $definedClasses = Array('Hunter','Warlock','Priest','Paladin','Mage','Rogue','Druid','Shaman','Warrior'); for($i = 0; $i < count($definedClasses); $i++) { if(stristr($currentList, $definedClasses[$i]) !== FALSE) { $is_class_list = 1; } } $query = "SELECT * FROM sk_class WHERE player_name='".$players['player_name']."'"; $skclass = mysql_query($query); $class = mysql_fetch_array($skclass); // Set the class display if enabled if($use_class_display == 1 && $is_class_list == 0) { $player_class = ' ('.$class["class"].')'; } // If using color-coding, set the appropriate color style if($use_class_color == 1) { if($class["class"] == 'Hunter') { $color = ' style="color: '.$hunter_color.';"'; } if($class["class"] == 'Warlock') { $color = ' style="color: '.$warlock_color.';"'; } if($class["class"] == 'Priest') { $color = ' style="color: '.$priest_color.';"'; } if($class["class"] == 'Paladin') { $color = ' style="color: '.$paladin_color.';"'; } if($class["class"] == 'Mage') { $color = ' style="color: '.$mage_color.';"'; } if($class["class"] == 'Rogue') { $color = ' style="color: '.$rogue_color.';"'; } if($class["class"] == 'Druid') { $color = ' style="color: '.$druid_color.';"'; } if($class["class"] == 'Shaman') { $color = ' style="color: '.$shaman_color.';"'; } if($class["class"] == 'Warrior') { $color = ' style="color: '.$warrior_color.';"'; } // If colors on class lists are disabled, set to the default style if($color_on_classes == 0 && $is_class_list == 1) { // Default color $color = ' style="color: '.$default_color.';"'; } } } // If roster linkbacks are enabled, make character names links to their roster entries if($use_roster_data == 1) { $player = '<td align="center"><a'.$color.' href="'.$roster_path.'char.php?name='.$players['player_name'].'&server='.$server_name.'" target="_self">'.$players['player_name'].$player_class.'</a></td>'; } else { $player = '<td align="center"'.$color.'>'.$players['player_name'].$player_class.'</td>'; } $list_order .= '<tr class="altRow"> <td align="center">'.$players['position'].'</td> '.$player.' </tr>'; } include($install_path . 'sklist.php'); // Template file?>[/code] Link to comment https://forums.phpfreaks.com/topic/28979-some-noob-questions-regarding-php/ Share on other sites More sharing options...
craygo Posted November 30, 2006 Share Posted November 30, 2006 looks like you did not set the include path to your server setup. Need to setup your server settings in the config.php file. Try that first and let us know.Ray Link to comment https://forums.phpfreaks.com/topic/28979-some-noob-questions-regarding-php/#findComment-132734 Share on other sites More sharing options...
Karpathos Posted November 30, 2006 Author Share Posted November 30, 2006 Thanks Ray, I'll give that a shot. And thank you for the prompt reply.-Joe Link to comment https://forums.phpfreaks.com/topic/28979-some-noob-questions-regarding-php/#findComment-132736 Share on other sites More sharing options...
Karpathos Posted November 30, 2006 Author Share Posted November 30, 2006 Okay, I tried every path I could think of and it still gives me the same error. Here is the config.php file, maybe you can see something wrong with it. Also I am using a hosting service, I am not sure if that is the problem. Thanks again[code]<?/*----------------------------------------------------------------------config.php - Configuration options for SK_List------------------------------------------------------------------------Date : Saturday Jan 21, 2006Copyright : B. Travis TurnerEmail : [email protected]You are free to modify these files for your own personal use as long asthis header and all copyright information remains intact. However, thesefiles cannot be redistributed after modification without explicit writtenpermission from the author.See http://creativecommons.org/licenses/by-nc-nd/2.5/ for completecopyright information.----------------------------------------------------------------------*/#--[ SKPARSER CONFIG ]-----------------------------------------------------$timezone = 'US/PST'; // Your timezone (make sure it's formatted correctly for the php date() function)$guild = 'Karpathian Knights - Convicted'; // Your guild name$website = 'http://wowarcraft.awardspace.com'; // Your guild website (without trailing slash)$subDir = '/sk_list/'; // Path to SK_list from the web root (i.e., what's after the .com of your website address)$linkback = 'http://wowarcraft.awardspace.com'; // Where you would like the guild name to link to (usually your hompage)$defaultList = 'Raid'; // Which list should the view default to?$redirect = $website . $subDir; // DO NOT CHANGE THIS$install_path = $_SERVER['DOCUMENT_ROOT'] . $subDir; // DO NOT CHANGE THIS$file_path = $install_path . 'files/SuicideKings.lua'; // DO NOT CHANGE THIS#--[ MYSQL CONFIG ]--------------------------------------------------------$db_user = '*******'; // MYSQL Database Username$db_pass = '*******'; // MYSQL Database Password$db_name = '*******'; // MYSQL Database Name$db_host = 'fdb1.awardspace.com'; // MYSQL Server Address (localhost if the database is on the same machine) #--[ PHPBB AUTH ]----------------------------------------------------------$use_phpbb_auth = 0; // 0 - Don't use phpBB Authentication | 1 - Use phpBB Authentication$phpbb_root_path = $_SERVER['DOCUMENT_ROOT'] . '/forums/'; // Path to root phpbb directory (usually '/phpBB2/' or '/forums/')$upload_group = '2, 3'; // User groups which have access to upload lists (look under "group_id" in the `phpbb_groups` table)#--[ MANUAL AUTH ]---------------------------------------------------------// DO NOT use this if you are using phpbb authentication! (above)$use_password = 0; // 0 - Don't use manual authentication | 1 - Use manual authentication$upload_password = 'karpathos'; // Set the password you would like to use#--[ GUILD ROSTER ]--------------------------------------------------------$use_roster_data = 0; // 0 - Don't use Guild Roster data | 1 - Use Guild Roster data$server_name = "Alexstrasza"; // Enter your server name EXACTLY as it is in the game$roster = '/roster/'; // Path to your guild roster (if present) from the web root (i.e., what's after the .com of your website address)$roster_path = $website . $roster; // DO NOT CHANGE THIS#--[ CLASS AND COLOR DISPLAY ]---------------------------------------------$use_class_display = 1; // 0 - Don't display classes | 1 - Display classes$use_class_color = 1; // 0 - Don't use color-coding | 1 - Use color-coding// If color-coding is enabled...$color_on_classes = 0; // 0 - Don't use colors on class-specific lists | 1 - Use colors on class-specific lists// If color-coding is disabled on classes or disabled completely...$default_color = '#DDDDDD'; // Hexidecimal color value to use if class colors are turned off.// These colors should match what's used in the game. If you want custom colors, you can change them below.$hunter_color = '#AAD372'; // Hexidecimal color value for the Hunter class$warlock_color = '#9382C9'; // Hexidecimal color value for the Warlock class$priest_color = '#FFFFFF'; // Hexidecimal color value for the Priest class$paladin_color = '#F48CBA'; // Hexidecimal color value for the Paladin class$mage_color = '#68CCEF'; // Hexidecimal color value for the Mage class$rogue_color = '#FFF468'; // Hexidecimal color value for the Rogue class$druid_color = '#FF7C0A'; // Hexidecimal color value for the Druid class$shaman_color = '#F78CBA'; // Hexidecimal color value for the Shaman class$warrior_color = '#C69B6D'; // Hexidecimal color value for the Warrior class#--[ LIST SORTING ]--------------------------------------------------------// Please review the readme for important information on this option.$use_prefixes = 0; // 0 - Don't sort by prefix | 1 - Sort by prefix$seperator = '-'; // Symbol that seperates prefixes from list names, commonly '-' or ' ' (dash or space)[/code] Link to comment https://forums.phpfreaks.com/topic/28979-some-noob-questions-regarding-php/#findComment-132750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.