Page 1 of 2 12 LastLast
Results 1 to 20 of 39

Thread: I am getting database error after changing my cmps_index.php to index.php

  1. #1
    Join Date
    Nov 2006
    Posts
    27

    Default I am getting database error after changing my cmps_index.php to index.php


    Hello every body!

    I am shah from hyderabad, india.

    I am getting database error after changing my cmps_index.php to index.php.Currently I have 3.6.1 and vbadvance installed.

    It would be thankful if any body could help me out.

    Thanks!

  2. #2

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    It would be helpful if you could post the error that you are getting.

  3. #3
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    only vbulletin logo is seen with text " Database Error" and IE page has navigation canceled.....no specific error....

    Please help
    Thanks.
    Shah

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    If you view the source of the page then it will show the DB error. Check that and post it here please.

  5. #5
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    This is the error what i am encountring....please help me.

    Database error in vBulletin 3.6.1:
    Invalid SQL:
    SELECT threadid, firstpostid FROM bkthread AS thread
    WHERE visible = 1 AND open != 10 AND thread.forumid IN(3)

    ORDER BY sticky DESC,voteavg DESC
    LIMIT 10;

    MySQL Error : Unknown column 'voteavg' in 'order clause'
    Error Number : 1054
    Date : Friday, December 29th 2006 @ 09:09:33 PM
    Script : http://www.ipremed.net/forums/index.php
    Referrer : http://www.ipremed.net/forums/admincp/index.php?do=head
    IP Address : 59.93.79.248
    Username : maxwell
    Classname : vb_database

    Regards
    Shah

  6. #6
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    So, now i have rolled back to earlier version. But up listed is the error i am getting .....

    Shah

  7. #7
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    It looks like there may be a small bug that can occur when you have your news posts ordered by rating, but don't display ratings with your news posts. If you'll look in your modules/news.php file for this code though:
    PHP Code:
    if    ($mod_options['portal_news_showrating']) 
    And replace with this:
    PHP Code:
            if ($mod_options['portal_news_showrating'] OR $mod_options['portal_news_orderby'] == 'voteavg'
    Then that should take care of the problem.

  8. #8
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Thanks Sir,

    I tried the same but this time i am getting the error as stated below:


    Database error
    The ipremed.net database has encountered a problem.

    --------------------------------------------------------------------------------

    Please try the following:
    Load the page again by clicking the Refresh button in your web browser.
    Open the www.ipremed.net home page, then try to open another page.
    Click the Back button to try another link.

    The www.ipremed.net forum technical staff have been notified of the error, though you may contact them if the problem persists.

    We apologise for any inconvenience.

  9. #9
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Sir, Can u please inform me how to get vbadvance installed on a fresh all total. It would be very kind of you. I know it's easy......

    Thanking You.
    Shah
    Happy New Year

  10. #10
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Can you view the source of the page again so we can see the error?

  11. #11
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Sir here is the source code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>ipremed.net Database Error</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <style type="text/css">
    <!--
    body { background-color: white; color: black; }
    #container { width: 400px; }
    #message { width: 400px; color: black; background-color: #FFFFCC; }
    #bodytitle { font: 13pt/15pt verdana, arial, sans-serif; height: 35px; vertical-align: top; }
    .bodytext { font: 8pt/11pt verdana, arial, sans-serif; }
    a:link { font: 8pt/11pt verdana, arial, sans-serif; color: red; }
    a:visited { font: 8pt/11pt verdana, arial, sans-serif; color: #4e4e4e; }
    -->
    </style>
    </head>
    <body>
    <table cellpadding="3" cellspacing="5" id="container">
    <tr>
    <td><img src="./image.php?type=dberror" alt="Database Error" width="48" height="48" /></td>
    <td id="bodytitle" width="100%">Database error</td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">The ipremed.net database has encountered a problem.</td>
    </tr>
    <tr>
    <td colspan="2"><hr /></td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">
    Please try the following:
    <ul>
    <li>Load the page again by clicking the <a href="#" onclick="window.location = window.location;">Refresh</a> button in your web browser.</li>
    <li>Open the <a href="/">www.ipremed.net</a> home page, then try to open another page.</li>
    <li>Click the <a href="javascript:history.back(1)">Back</a> button to try another link.</li>
    </ul>
    </td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">The www.ipremed.net forum technical staff have been notified of the error, though you may <a href="mailto:[email protected]">contact them</a> if the problem persists.</td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">&nbsp;<br />We apologise for any inconvenience.</td>
    </tr>
    </table>


    <!--
    Database error in vBulletin 3.6.1:

    Invalid SQL:

    SELECT threadid, firstpostid FROM bkthread AS thread
    WHERE visible = 1 AND open != 10 AND thread.forumid IN(3)

    ORDER BY sticky DESC,voteavg DESC
    LIMIT 10;

    MySQL Error : Unknown column 'voteavg' in 'order clause'
    Error Number : 1054
    Date : Tuesday, January 2nd 2007 @ 09:47:16 PM
    Script : http://www.ipremed.net/forums/cmps_index.php
    Referrer :
    IP Address : 59.93.94.224
    Username : Unregistered
    Classname : vb_database
    -->


    </body>
    </html>

  12. #12
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    It looks like you didn't apply the changes I mentioned in post #7 in this thread.

  13. #13
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    I have already made the changes...should i again re-install the.

  14. #14
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Sir, Again the same error in a box...

    SELECT threadid, firstpostid FROM bkthread AS thread
    WHERE visible = 1 AND open != 10 AND thread.forumid IN(3)

    ORDER BY sticky DESC,voteavg DESC
    LIMIT 10;

    MySQL Error : Unknown column 'voteavg' in 'order clause'
    Error Number : 1054
    Date : Wednesday, January 3rd 2007 @ 09:47:56 PM
    Script : http://www.ipremed.net/forums/cmps_index.php
    Referrer :
    IP Address : 59.93.94.115
    Username : maxwell
    Classname : vb_database

  15. #15
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Can you post the contents of your modules/news.php file here?

  16. #16
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Here Sir,

    PHP Code:
    <?php
    // ++=========================================================================++
    // || vBadvanced CMPS v2.2.0 (vB 3.6) - 40190
    // || © 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved
    // || This file may not be redistributed in whole or significant part.
    // || [url]http://www.vbadvanced.com[/url]
    // || Downloaded 09:05, Mon Oct 2nd 2006
    // || 
    // ++ ========================================================================++

    $newsmod $mods;

    if (!empty(
    $modules))
    {
        foreach (
    $modules AS $omods)
        {
            if (
    $omods['parent'] == $mods['identifier'])
            {
                
    $archivemod $omods;
                
    $mod_options array_merge($cmps_options["adv_portal_$omods[identifier]"], $mod_options);
                
    $donenewsids[] = $omods['modid'];
            }
        }
    }

    unset(
    $omods);

    $vbulletin->templatecache['postbit_attachmentthumbnail'] = str_replace('"attachment.php''"' $vbulletin->options['bburl'] . '/attachment.php'$vbulletin->templatecache['postbit_attachmentthumbnail']);

    if (
    $newsmod['modid'] == $mods['modid'] OR $archivemod['modid'] == $mods['modid'])
    {
        if (
    $mod_options['portal_news_maxposts'] OR $mod_options['portal_news_enablearchive'])
        {
            
    $newslimit 'LIMIT ' . ($mod_options['portal_news_maxposts'] + $mod_options['portal_news_enablearchive']);
        }

        
    $mod_options['portal_threadids'] = unserialize($mod_options['portal_threadids']);

        if (!empty(
    $mod_options['portal_threadids']))
        {
            
    $newstids array_keys($mod_options['portal_threadids']);
            
    $newspids array_values($mod_options['portal_threadids']);

            if (!empty(
    $adv_forumperms) AND $mod_options['portal_applypermissions'])
            {
                
    $mods['exforums'] = 'AND thread.forumid NOT IN(' implode(','$adv_forumperms) . ')';
            }
        }
        else
        {
            
    // Get postids
            
    $newstids = array();
            
    $newspids = array();

            if (
    $mod_options['portal_news_forumid'])
            {
                
    $mods['inforums'] = explode(','$mod_options['portal_news_forumid']);

                if (
    $mod_options['portal_applypermissions'])
                {
                    
    $mods['inforums'] = array_diff($mods['inforums'], $adv_forumperms);
                }
            }

            if (!empty(
    $mods['inforums']))
            {
                
    $getnewsids $db->query_read("
                        SELECT threadid, firstpostid FROM " 
    TABLE_PREFIX "thread AS thread
                        WHERE visible = 1 AND open != 10 AND thread.forumid IN(" 
    implode(','$mods['inforums']) . ")
                        " 
    iif($mod_options['portal_news_cutoffdate'], 'AND thread.dateline > ' . (TIMENOW $mod_options['portal_news_cutoffdate'] * 86400)) . "
                        ORDER BY " 
    iif($mod_options['portal_news_sticky'], 'sticky DESC,') . iif($mod_options['portal_news_orderby'] == 'postdateline''dateline'$mod_options['portal_news_orderby']) . $mod_options[portal_news_direction]
                        
    $newslimit
                "
    );
                while (
    $ids $db->fetch_array($getnewsids))
                {
                    
    $newstids[] = $ids['threadid'];
                    
    $newspids[] = $ids['firstpostid'];
                }
            }
        }

        if (!empty(
    $newstids))
        {
            
    // Attachments
            
    if ($mod_options['portal_news_showattachments'])
            {
                
    $nattachcache = array();
                
    $getnattach $db->query_read("
                        SELECT attachmentid, filename, filesize, visible, postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, counter, attachment.thumbnail, LENGTH(attachment.thumbnail) AS thumbnailsize, newwindow
                        FROM " 
    TABLE_PREFIX "attachment AS attachment
                        LEFT JOIN " 
    TABLE_PREFIX "attachmenttype AS attachmenttype ON (attachment.extension = attachmenttype.extension)
                        WHERE postid IN(" 
    implode(','$newspids) . ")
                        ORDER BY attachmentid
                "
    );
                while (
    $nattach $db->fetch_array($getnattach))
                {
                    
    $nattachcache["$nattach[postid]"]["$nattach[attachmentid]"] = $nattach;
                }
            }

            
    $newscount 0;

            
    $show['lastpost'] = $mod_options['portal_newsarchive_lastpost'];

            
    $getnews $db->query_read("
                    SELECT " 
    iif($mod_options['portal_news_showrating'], 'IF(votenum >= ' $vbulletin->options['showvotes'] . ', votenum, 0) AS numbvote, IF(votenum >= ' $vbulletin->options['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
                    thread.threadid, post.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=thread.replycount, thread.replycount+1, views) AS views, thread.forumid, post.postid, pagetext, allowsmilie
                    " 
    iif ($mod_options['portal_news_showsignature'], ', showsignature, sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages, sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight') . "
                    " 
    iif ($mod_options['portal_news_showicon'] , ',thread.iconid AS threadiconid, iconpath AS threadiconpath') . "
                    " 
    iif ($mod_options['portal_news_showavatar'] , ', avatarpath, NOT ISNULL(customavatar.filedata) AS hascustom, customavatar.dateline AS avatardateline, avatarrevision') . "
                    " 
    iif ($mod_options['portal_news_showsubscribed'] AND $vbulletin->userinfo['userid'] , ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed ') . "
                    FROM " 
    TABLE_PREFIX "thread AS thread
                    LEFT JOIN " 
    TABLE_PREFIX "post AS post ON (post.postid = thread.firstpostid)

                    LEFT JOIN " 
    TABLE_PREFIX "postparsed AS postparsed ON (postparsed.postid = post.postid AND postparsed.styleid = " intval(STYLEID) . " AND postparsed.languageid = " intval(LANGUAGEID) . ")

                    " 
    iif ($mod_options['portal_news_showicon'] , 'LEFT JOIN ' TABLE_PREFIX 'icon AS icon ON (icon.iconid = thread.iconid)') . "
                    " 
    iif ($mod_options['portal_news_showavatar'] OR $mod_options['portal_news_showsignature'],
                        
    'LEFT JOIN ' TABLE_PREFIX 'user AS user ON (user.userid = post.userid)
                    '
    ) . "
                    " 
    iif ($mod_options['portal_news_showsignature'], 
                            
    'LEFT JOIN ' TABLE_PREFIX 'sigparsed AS sigparsed ON (sigparsed.userid = user.userid AND sigparsed.styleid = ' intval(STYLEID) . ' AND sigparsed.languageid = ' intval(LANGUAGEID) . ')
                            LEFT JOIN ' 
    TABLE_PREFIX 'sigpic AS sigpic ON (sigpic.userid = post.userid)') .
                    
    iif ($mod_options['portal_news_showavatar'] , '
                        LEFT JOIN ' 
    TABLE_PREFIX 'avatar as avatar ON (avatar.avatarid = user.avatarid)
                        LEFT JOIN ' 
    TABLE_PREFIX 'customavatar as customavatar ON (customavatar.userid = user.userid)
                    '
    ) . "
                    " 
    iif ($mod_options['portal_news_showsubscribed'] AND $vbulletin->userinfo['userid'] , ' LEFT JOIN ' TABLE_PREFIX 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = \'' $vbulletin->userinfo['userid'] . '\')') . "
                    WHERE thread.threadid IN(" 
    implode(','$newstids) . ")
                    " 
    iif($ignusers'AND thread.postuserid NOT IN(' $ignusers ')') . "
                    
    $mods[exforums]
                    GROUP BY post.postid
                    ORDER BY " 
    iif($mod_options['portal_news_sticky'], 'sticky DESC,') . iif($mod_options['portal_news_orderby'] == 'postdateline''thread.dateline'$mod_options['portal_news_orderby']) . $mod_options[portal_news_direction]
                    
    $newslimit
            "
    );
            while (
    $news $db->fetch_array($getnews))
            {
                
    $newscount++;

                if (
    $mod_options['portal_news_archivepreview'])
                {
                    
    $news['preview'] = $news['pagetext'];
                }

                
    $news process_thread_array($news''$mod_options['portal_news_showicon']);

                
    $news['reply_noformat'] = $news['replycount'];

                
    $news['dateposted'] = vbdate($mod_options['portal_news_dateformat'], $news['postdateline'], '''');

                if (
    $newscount <= $mod_options['portal_news_maxposts'] AND $newsmod['modid'])
                {
                    
    // Signature
                    
    $show['signature'] = false;
                    if (
    $mod_options['portal_news_showsignature'] AND $news['showsignature'] AND trim($news['signatureparsed']))
                    {
                        
    $show['signature'] = true;

                        if (!
    $cachedsigs[$news['userid']])
                        {
                            
    $cachedsigs[$news['userid']] = $bbcode_parser->parse($news['signature'], 'signature'truefalse$news['signatureparsed'], $news['sighasimages'], true);
                        }

                        
    $news['signature'] =& $cachedsigs[$news['userid']];
                    }

                    
    // News Avatar
                    
    if ($mod_options['portal_news_showavatar'])
                    {
                        if (
    $news['avatarpath'])
                        {
                            
    $news['avatarpath'] = $vbulletin->options['bburl'] . '/' $news['avatarpath'];
                        }
                        else if (
    $news['hascustom'])
                        {
                            if (
    $vbulletin->options['usefileavatar'])
                            {
                                
    $news['avatarpath'] = $vbulletin->options['bburl'] . '/' $vbulletin->options['avatarurl'] . '/avatar' $news['postuserid']. '_' $news['avatarrevision'] . '.gif';
                            }
                            else
                            {
                                
    $news['avatarpath'] = $vbulletin->options['bburl'] . '/image.php?' $session['sessionurl'] . 'u=' $news['postuserid'] . '&amp;dateline=' $news['avatardateline'];
                            }
                        }
                    }

                    if (!
    $mod_options['portal_news_enablesmilies'])
                    {
                        
    $news['allowsmilie'] = 0;
                    }

                    
    // Parse bb code if necessary
                    
    if ($news['pagetext_html'])
                    {
                        
    $news['message'] = $news['pagetext_html'];
                    }
                    else
                    {
                        
    $news['message'] = $bbcode_parser->do_parse($news['pagetext'], $mod_options['portal_news_enablehtml'], $news['allowsmilie'], $mod_options['portal_news_enablevbcode'], $mod_options['portal_news_enablevbimage']);
                    }

                    
    // Strip characters and add "read more"
                    
    if ($mod_options['portal_news_maxchars'] AND strlen($news['message']) > $mod_options['portal_news_maxchars'])
                    {
                        
    $news['message'] = substr($news['message'], 0strrpos(substr($news['message'], 0$mod_options['portal_news_maxchars']), ' ')) . '...' construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $news['threadid'], $session['sessionurl']);
                    }

                    if (empty(
    $newsforumperms["$news[forumid]"]))
                    {
                        
    $newsforumperms["$news[forumid]"] = fetch_permissions($news['forumid']);
                    }

                    
    $show['editbutton'] = false;

                    if (((
    $newsforumperms["$news[forumid]"] & $vbulletin->bf_ugp_forumpermissions['caneditpost']) AND $vbulletin->userinfo['userid'] == $news['userid']) OR can_moderate($news['forumid'], 'caneditposts'))
                    {
                        
    $show['editbutton'] = true;
                    }

                    
    $show['replybutton'] = iif(($newsforumperms["$news[forumid]"] & $vbulletin->bf_ugp_forumpermissions['canreplyothers']) AND $mod_options['portal_news_allowreplies'], true);

                    
    // Rating
                    
    $news['votenum'] = $news['numbvote'];
                    if (
    $mod_options['portal_news_showrating'] OR $mod_options['portal_news_orderby'] == 'voteavg'
                    {
                        
    $news['rating'] = intval(round($news['voteavg']));
                    }

                    
    // News Attachments
                    
    if ($nattachcache["$news[postid]"])
                    {
                        foreach (
    $nattachcache["$news[postid]"] AS $attachid => $attachment)
                        {
                            if (
    $attachment['hasthumbnail'] AND $vbulletin->options['attachthumbs'] AND ($newsforumperms["$news[forumid]"] & $vbulletin->bf_ugp_forumpermissions['cangetattachment']))
                            {
                                
    $show['newwindow'] = $attachment['newwindow'];
                                eval(
    '$news[\'attachment\'] .= "' fetch_template('postbit_attachmentthumbnail') . '";');
                            }
                            else
                            {
                                
    $attachment['attachmentextension'] = file_extension($attachment['filename']);
                                
    $news['attachment'] .= '<img class="inlineimg" src="' $stylevar['imgdir_attach'] . '/' $attachment['attachmentextension'] . '.gif" alt="' construct_phrase($vbphrase['file_type_x'], $attachment['attachmentextension']) . '" width="16" height="16" border="0" style="vertical-align:baseline" /> <a href="' $vbulletin->options['bburl'] . '/attachment.php?' $session['sessionurl'] . 'attachmentid=' $attachment['attachmentid'] . '">' $attachment['filename'] . '</a> (' vb_number_format($attachment['filesize'], 1true) . ', ' construct_phrase($vbphrase['x_views'], $attachment['counter']) . ')';
                            }
                        }
                    }

                    
    $blockbullet $vba_style['portal_blockbullet'];
                    if (
    $mod_options['portal_news_showicon'])
                    {
                        
    $vba_style['portal_blockbullet'] = '';
                        if (
    $news['threadiconpath'])
                        {
                            
    $vba_style['portal_blockbullet'] = '<img alt="" border="0" src="' $news['threadiconpath'] . '" title="' $news['threadicontitle'] . '" />';
                        }
                    }

                    if (
    $mod_options['portal_news_legacy'])
                    {
                        
    $mods['title'] = '<a href="' $vbulletin->options['bburl'] . '/showthread.php?' $session['sessionurl'] . 't=' $news['threadid'] . '">' $news['title'] . '</a>';

                        
    $mods['collapse'] = $newsmod['modid'] . '_' $news['threadid'];
                        
    $modcollapse $vbcollapse["collapseobj_module_" $mods['collapse'] . ""];
                        
    $modimgcollapse $vbcollapse["collapseimg_module_" $mods['collapse']. ""];

                        eval(
    '$modulehtml = "' fetch_template('adv_portal_newsbits') . '";');

                        if (
    $newsmod['useshell'])
                        {
                            eval(
    '$home[$newsmod[\'modid\']][\'content\'] .= "' fetch_template('adv_portal_module_shell') . '";');
                        }
                        else
                        {
                            
    $home["$newsmod[modid]"]['content'] .= $modulehtml;
                        }
                    }
                    else
                    {
                        eval(
    '$newsbits .= "' fetch_template('adv_portal_newsbits') . '";');
                    }

                    
    $vba_style['portal_blockbullet'] = $blockbullet;
                }
                else if (
    $archivemod['modid'])
                {
                    
    $mods['modcol'] = $archivemod['modcol'];
                    if (
    $mods['modcol'] != 1)
                    {
                        
    $bgclass exec_switch_bg();
                    }

                    if (
    $archivemod['useshell'])
                    {
                        eval(
    '$newsarchivebits .= "' fetch_template('adv_portal_news_archivebits') . '";');
                    }
                    else
                    {
                        eval(
    '$home[$archivemod[\'modid\']][\'content\'] = "' fetch_template('adv_portal_news_archivebits') . '";');
                    }
                }
            }

            
    $db->free_result($getnews);

            if (
    $newsarchivebits)
            {
                
    $modulehtml '';
                if (
    $mods['modcol'] == 1)
                {
                    eval(
    '$modulehtml = "' fetch_template('adv_portal_news_archive_head') . '";');
                }

                
    $mods['link'] = '';
                if (
    $archivemod['link'])
                {
                    eval(
    '$mods[\'link\'] = "' addslashes($archivemod['link']) . '";');
                }

                
    $modulehtml .= $newsarchivebits;
                
    $mods['modid'] = $archivemod['modid'];
                
    $mods['colspan'] = $archivemod['colspan'];
                
    $mods['title'] = $archivemod['title'];
                
    $modcollapse $vbcollapse["collapseobj_module_" $archivemod['modid'] . ""];
                
    $mods['collapse'] = $archivemod['modid'];
                
    $modimgcollapse $vbcollapse["collapseimg_module_" $archivemod['modid'] . ""];
                eval(
    '$home[$archivemod[\'modid\']][\'content\'] = "' fetch_template('adv_portal_module_shell') . '";');
            }

            if (
    $newsbits AND !$mod_options['portal_news_legacy'])
            {
                
    $modulehtml $newsbits;
                
    $mods['modid'] = $newsmod['modid'];
                
    $mods['colspan'] = $newsmod['colspan'];
                
    $mods['title'] = $newsmod['title'];
                
    $mods['collapse'] = $newsmod['modid'];
                
    $modcollapse $vbcollapse["collapseobj_module_" $newsmod['modid'] . ""];
                
    $modimgcollapse $vbcollapse["collapseimg_module_" $newsmod['modid'] . ""];
                if (
    $newsmod['useshell'])
                {
                    eval(
    '$home[$newsmod[\'modid\']][\'content\'] = "' fetch_template('adv_portal_module_shell') . '";');
                }
                else
                {
                    
    $home["$newsmod[modid]"]['content'] = $modulehtml;
                }
            }
        }

        unset(
    $news$newsarchivebits$attachment$newscount$newsforumbits$newsmod$archivemod$newsbits);
    }

    $mods['noshell'] = true;

    ?>
    Last edited by Brian; 01-05-2007 at 01:33 PM.

  17. #17

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    holy crap.

  18. #18
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    There's the problem... I was looking at the code from v2.2.1, but you're still running v2.2.0.

    Try looking for this code instead:
    PHP Code:
    SELECT " . iif($mod_options['portal_news_showrating'] 
    Change to this:
    PHP Code:
    SELECT " . iif($mod_options['portal_news_showrating'] OR $mod_options['portal_news_orderby'] == 'voteavg' 
    And that should take care of the problem.

  19. #19
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Sir, I liiked for the code - found it - changed it - but still getting database error, like

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>ipremed.net Database Error</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <style type="text/css">
    <!--
    body { background-color: white; color: black; }
    #container { width: 400px; }
    #message { width: 400px; color: black; background-color: #FFFFCC; }
    #bodytitle { font: 13pt/15pt verdana, arial, sans-serif; height: 35px; vertical-align: top; }
    .bodytext { font: 8pt/11pt verdana, arial, sans-serif; }
    a:link { font: 8pt/11pt verdana, arial, sans-serif; color: red; }
    a:visited { font: 8pt/11pt verdana, arial, sans-serif; color: #4e4e4e; }
    -->
    </style>
    </head>
    <body>
    <table cellpadding="3" cellspacing="5" id="container">
    <tr>
    <td><img src="./image.php?type=dberror" alt="Database Error" width="48" height="48" /></td>
    <td id="bodytitle" width="100%">Database error</td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">The ipremed.net database has encountered a problem.</td>
    </tr>
    <tr>
    <td colspan="2"><hr /></td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">
    Please try the following:
    <ul>
    <li>Load the page again by clicking the <a href="#" onclick="window.location = window.location;">Refresh</a> button in your web browser.</li>
    <li>Open the <a href="/">www.ipremed.net</a> home page, then try to open another page.</li>
    <li>Click the <a href="javascript:history.back(1)">Back</a> button to try another link.</li>
    </ul>
    </td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">The www.ipremed.net forum technical staff have been notified of the error, though you may <a href="mailto:[email protected]">contact them</a> if the problem persists.</td>
    </tr>
    <tr>
    <td class="bodytext" colspan="2">&nbsp;<br />We apologise for any inconvenience.</td>
    </tr>
    </table>


    <!--
    Database error in vBulletin 3.6.1:

    Invalid SQL:

    SELECT threadid, firstpostid FROM bkthread AS thread
    WHERE visible = 1 AND open != 10 AND thread.forumid IN(3)

    ORDER BY sticky DESC,voteavg DESC
    LIMIT 10;

    MySQL Error : Unknown column 'voteavg' in 'order clause'
    Error Number : 1054
    Date : Friday, January 5th 2007 @ 10:52:15 PM
    Script : http://www.ipremed.net/forums/
    Referrer :
    IP Address : 59.93.91.178
    Username : Unregistered
    Classname : vb_database
    -->


    </body>
    </html>

    Plese do something Sir.

  20. #20
    Join Date
    Nov 2006
    Posts
    27

    Default Re: I am getting database error after changing my cmps_index.php to index.php

    Sir, u can also check the error at:
    http://www.ipremed.net/forums/cmps_index.php.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Changing cmps_index.php Directories
    By Strife in forum "How Do I..." Questions
    Replies: 2
    Last Post: 01-23-2007, 01:03 PM
  2. After changing the cmps_index.php to index.php I get this error message.
    By Ann Marie in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 12-22-2006, 04:16 PM
  3. index and cmps_index
    By Jaegermeister-a in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 02-14-2006, 06:06 PM
  4. cmps_index.php -> index.php
    By cLord in forum Troubleshooting / "How do I..." Questions
    Replies: 6
    Last Post: 01-29-2005, 01:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •