>>  Site Map >>  Forums >>  Post Installation Help

Forum module - topics in forum:



Post Installation Help - Help with problems after installation.



Major php problems

I have been battling this for a week. I moved hosts and swapped my site and DB to the new host and cannot get my site to work properly. I deleted my entire site and downloaded "PHP-Nuke-7.6_Full_Patch_3.3". Still no luck.

I have error checking on true and when I click on Forums here is what I get.


Code: :
Warning: main() [function.main]: Unable to access ./common.php in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.main]: Unable to access ./common.php in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.main]: Unable to access ./common.php in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.main]: Unable to access ./includes/functions_display.php in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main(./includes/functions_display.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main() [function.main]: Unable to access ./includes/functions_display.php in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main(./includes/functions_display.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main() [function.main]: Unable to access ./includes/functions_display.php in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main(./includes/functions_display.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main() [function.include]: Failed opening './includes/functions_display.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Fatal error: Call to a member function on a non-object in /home/xtsquad/public_html/modules/Forums/index.php on line 28



All of these point to Forums/index.php at lines 24, 25 and 28. Below is my index.php code and I put line indicators in for help >LINE 24< etc..



Code: :
<?php
/**
*
* @package phpBB3
* @version $Id: index.php,v 1.166 2006/12/14 03:21:24 davidmj Exp $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");

define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
>LINE 24< include($phpbb_root_path . 'common.' . $phpEx);
>LINE 25< include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
>LINE 28< $user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');

display_forums('', $config['load_moderators']);

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts   = $config['num_posts'];
$total_topics   = $config['num_topics'];
$total_users   = $config['num_users'];
$newest_user   = $config['newest_username'];
$newest_uid      = $config['newest_user_id'];

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

// Grab group details for legend display
$sql = 'SELECT group_id, group_name, group_colour, group_type
   FROM ' . GROUPS_TABLE . '
   WHERE group_legend = 1
      AND group_type <> ' . GROUP_HIDDEN . '
   ORDER BY group_name ASC';
$result = $db->sql_query($sql);

$legend = '';
while ($row = $db->sql_fetchrow($result))
{
   if ($row['group_name'] == 'BOTS')
   {
      $legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . $user->lang['G_BOTS'] . '</span>';
   }
   else
   {
      $legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
   }
}
$db->sql_freeresult($result);

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'])
{
   $now = getdate(time() + $user->timezone + $user->dst - date('Z'));
   $sql = 'SELECT user_id, username, user_colour, user_birthday
      FROM ' . USERS_TABLE . "
      WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
         AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
   $result = $db->sql_query($sql);

   while ($row = $db->sql_fetchrow($result))
   {
      $user_colour = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] .'"' : '';
      $birthday_list .= (($birthday_list != '') ? ', ' : '') . '<a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a>';

      if ($age = (int) substr($row['user_birthday'], -4))
      {
         $birthday_list .= ' (' . ($now['year'] - $age) . ')';
      }
   }
   $db->sql_freeresult($result);
}

// Assign index specific vars
$template->assign_vars(array(
   'TOTAL_POSTS'   => sprintf($user->lang[$l_total_post_s], $total_posts),
   'TOTAL_TOPICS'   => sprintf($user->lang[$l_total_topic_s], $total_topics),
   'TOTAL_USERS'   => sprintf($user->lang[$l_total_user_s], $total_users),
   'NEWEST_USER'   => sprintf($user->lang['NEWEST_USER'], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $newest_uid) . '" style="color:#' . $config['newest_user_colour'] . '">', $newest_user, '</a>'),
   'LEGEND'      => $legend,
   'BIRTHDAY_LIST'   => $birthday_list,

   'FORUM_IMG'            => $user->img('forum_read', 'NO_NEW_POSTS'),
   'FORUM_NEW_IMG'         => $user->img('forum_unread', 'NEW_POSTS'),
   'FORUM_LOCKED_IMG'      => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
   'FORUM_NEW_LOCKED_IMG'   => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),

   'S_LOGIN_ACTION'         => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
   'S_DISPLAY_BIRTHDAY_LIST'   => ($config['load_birthdays']) ? true : false,

   'U_MARK_FORUMS'      => append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums'),
   'U_MCP'            => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=front', true, $user->session_id) : '')
);

// Output page
page_header($user->lang['INDEX']);

$template->set_filenames(array(
   'body' => 'index_body.html')
);

page_footer();

?>



Someone please help. I have searched this site for all these errors and the little info I found was not any help. I can copy and paste any codes or files you need to help me. Thanks. www.xtsquad.com




Re: Major php problems

lilc420 Wrote: :
I have been battling this for a week. I moved hosts and swapped my site and DB to the new host and cannot get my site to work properly. I deleted my entire site and downloaded "PHP-Nuke-7.6_Full_Patch_3.3". Still no luck.

I have error checking on true and when I click on Forums here is what I get.


Code: :
Warning: main() [function.main]: Unable to access ./common.php in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.main]: Unable to access ./common.php in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.main]: Unable to access ./common.php in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xtsquad/public_html/modules/Forums/index.php on line 24

Warning: main() [function.main]: Unable to access ./includes/functions_display.php in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main(./includes/functions_display.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main() [function.main]: Unable to access ./includes/functions_display.php in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main(./includes/functions_display.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main() [function.main]: Unable to access ./includes/functions_display.php in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main(./includes/functions_display.php) [function.main]: failed to open stream: No such file or directory in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Warning: main() [function.include]: Failed opening './includes/functions_display.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xtsquad/public_html/modules/Forums/index.php on line 25

Fatal error: Call to a member function on a non-object in /home/xtsquad/public_html/modules/Forums/index.php on line 28



All of these point to Forums/index.php at lines 24, 25 and 28. Below is my index.php code and I put line indicators in for help >LINE 24< etc..



Code: :
<?php
/**
*
* @package phpBB3
* @version $Id: index.php,v 1.166 2006/12/14 03:21:24 davidmj Exp $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");

define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
>LINE 24< include($phpbb_root_path . 'common.' . $phpEx);
>LINE 25< include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
>LINE 28< $user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');

display_forums('', $config['load_moderators']);

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts   = $config['num_posts'];
$total_topics   = $config['num_topics'];
$total_users   = $config['num_users'];
$newest_user   = $config['newest_username'];
$newest_uid      = $config['newest_user_id'];

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

// Grab group details for legend display
$sql = 'SELECT group_id, group_name, group_colour, group_type
   FROM ' . GROUPS_TABLE . '
   WHERE group_legend = 1
      AND group_type <> ' . GROUP_HIDDEN . '
   ORDER BY group_name ASC';
$result = $db->sql_query($sql);

$legend = '';
while ($row = $db->sql_fetchrow($result))
{
   if ($row['group_name'] == 'BOTS')
   {
      $legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . $user->lang['G_BOTS'] . '</span>';
   }
   else
   {
      $legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
   }
}
$db->sql_freeresult($result);

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'])
{
   $now = getdate(time() + $user->timezone + $user->dst - date('Z'));
   $sql = 'SELECT user_id, username, user_colour, user_birthday
      FROM ' . USERS_TABLE . "
      WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
         AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
   $result = $db->sql_query($sql);

   while ($row = $db->sql_fetchrow($result))
   {
      $user_colour = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] .'"' : '';
      $birthday_list .= (($birthday_list != '') ? ', ' : '') . '<a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a>';

      if ($age = (int) substr($row['user_birthday'], -4))
      {
         $birthday_list .= ' (' . ($now['year'] - $age) . ')';
      }
   }
   $db->sql_freeresult($result);
}

// Assign index specific vars
$template->assign_vars(array(
   'TOTAL_POSTS'   => sprintf($user->lang[$l_total_post_s], $total_posts),
   'TOTAL_TOPICS'   => sprintf($user->lang[$l_total_topic_s], $total_topics),
   'TOTAL_USERS'   => sprintf($user->lang[$l_total_user_s], $total_users),
   'NEWEST_USER'   => sprintf($user->lang['NEWEST_USER'], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $newest_uid) . '" style="color:#' . $config['newest_user_colour'] . '">', $newest_user, '</a>'),
   'LEGEND'      => $legend,
   'BIRTHDAY_LIST'   => $birthday_list,

   'FORUM_IMG'            => $user->img('forum_read', 'NO_NEW_POSTS'),
   'FORUM_NEW_IMG'         => $user->img('forum_unread', 'NEW_POSTS'),
   'FORUM_LOCKED_IMG'      => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
   'FORUM_NEW_LOCKED_IMG'   => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),

   'S_LOGIN_ACTION'         => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
   'S_DISPLAY_BIRTHDAY_LIST'   => ($config['load_birthdays']) ? true : false,

   'U_MARK_FORUMS'      => append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums'),
   'U_MCP'            => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=front', true, $user->session_id) : '')
);

// Output page
page_header($user->lang['INDEX']);

$template->set_filenames(array(
   'body' => 'index_body.html')
);

page_footer();

?>



Someone please help. I have searched this site for all these errors and the little info I found was not any help. I can copy and paste any codes or files you need to help me. Thanks. www.xtsquad.com


Did you install the Core Php-Nuke 7.6 or just upload and do the patch. You must install the Core 7.6 before you apply the patch. You must also follow all directions it contains concerning editing any files for your site to work correctly. Sounds like to me you just uploaded the patch and not the core 7.6 Php-Nuke.




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS