Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2010, 06:48 PM
Khan_ Khan_ is offline
 
Join Date: Sep 2009
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Database Error

i just moved from old web host to new webhost and i get database error ..

how can i fix this ?

this is what i get in my technical email as error ..

Code:
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'champ_admin'@'localhost' (using password: YES)
/home/wrest/public_html/includes/class_core.php on line 312

MySQL Error   :
Error Number  :
Request Date  : Wednesday, November 10th 2010 @ 09:20:25 PM
Error Date    : Wednesday, November 10th 2010 @ 09:20:25 PM
Script        : http://178.239.49.61/~wrest/
Referrer      :
IP Address    : 86.25.188.112
Username      :
Classname     : vB_Database
MySQL Version :
please help .
Reply With Quote
  #2  
Old 11-10-2010, 06:52 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check that the db infos are updated accordingly at the config.php file. If they are, then make sure that the forum db user has got full permissions and access to the db where he is assigned to.
Reply With Quote
  #3  
Old 11-10-2010, 07:03 PM
Khan_ Khan_ is offline
 
Join Date: Sep 2009
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DB names are different than config.php file .. can you check for me if possible please.. i am lost .
Reply With Quote
  #4  
Old 11-10-2010, 07:06 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Khan_ View Post
DB names are different than config.php file .. can you check for me if possible please.. i am lost .
Well, the database informations at the config.php file should match those of whatever database your forum is residing on. All you have to do is upload the config.php file to your pc, open it with a php editor program, enter the right db infos, save the changes and re-upload it back overwritting the old one and you should be all set.

P.s. Did you move the database to the new host btw? Can you tell us the exact procedure that you followed?
Reply With Quote
  #5  
Old 11-10-2010, 07:10 PM
Khan_ Khan_ is offline
 
Join Date: Sep 2009
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i backed up from old host and uploaded the backed up file to new host server .. then they restored it and said that it got errors .. i know it cant be because that back is fine . it must have problem with giving permissions to database ..and after you mentioned i checked config.php and my sql on cpanel .. they both got different names .
Reply With Quote
  #6  
Old 11-10-2010, 07:19 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Khan_ View Post
i backed up from old host and uploaded the backed up file to new host server .. then they restored it and said that it got errors .. i know it cant be because that back is fine . it must have problem with giving permissions to database ..and after you mentioned i checked config.php and my sql on cpanel .. they both got different names .
Then update the config.php file with the right db infos as I explained above.
Reply With Quote
  #7  
Old 11-10-2010, 07:24 PM
Khan_ Khan_ is offline
 
Join Date: Sep 2009
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the DB name is different and the config.php names are different ..

with that being said .. i dont have to change the names of DB but must change config.php names .. am i correct ..

but if i have to change the config names i want to say you some that these are the names i created 2 years ago and i never changed it .. how come i should change the names now with using the same database . i am new to it, dont take me wrong .

--------------- Added [DATE]1289427390[/DATE] at [TIME]1289427390[/TIME] ---------------

NeverMind .. i did it as you mentioned and now i get new error ..

Quote:

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: custom_announcements in [path]/includes/functions.php on line 3957

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 8

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 32

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 36

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 41

Fatal error: Call to a member function hide_errors() on a non-object in /home/wrest/public_html/includes/class_bootstrap.php(384) : eval()'d code on line 66
Reply With Quote
  #8  
Old 11-11-2010, 09:49 AM
Outbackmark's Avatar
Outbackmark Outbackmark is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change the names in the config.php file, there are 3 DB settings in there that must be correct
DB username
DB password
DBname

The username and dbname will look something like wrest_username and wrest_password

The reason you need to change is now is that the DB name etc has all changed on the new server/host, and your settings in config.php must be changed to match.

As always, keep a copy of the old one on your computer.
Reply With Quote
  #9  
Old 11-11-2010, 04:06 PM
Khan_ Khan_ is offline
 
Join Date: Sep 2009
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thats not the issue now mate .. i done that and it is fixed .. its a hook issue + i disabled the hooks and now i get database error ..


Quote:
Database error in vBulletin 3.8.0:

Invalid SQL:

SELECT forum.forumid, forum.lastpost, forum.lastposter, forum.lastposterid, forum.lastthread, forum.lastthreadid, forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend

FROM forum AS forum

LEFT JOIN user AS user ON (user.userid = forum.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 0);

MySQL Error : Unknown column 'forum.lastposterid' in 'field list'
Error Number : 1054
Request Date : Thursday, November 11th 2010 @ 06:06:04 AM
Error Date : Thursday, November 11th 2010 @ 06:06:04 AM
Script : http://xx.xx.xx.xx/~xxxx/
Referrer : http://xx.xx.xx.xx/~xxxx/
IP Address : xx.xx.xx.xx
Username : Unregistered
Classname : vB_Database
MySQL Version :
And another thing .. my forum was 4.0.3 and now it is giving error of 3.8.0 .. weird .

i had 3.8.0 almost year and a half ago then i upgraded it to 3.8.2 and then i upgraded to 4.0.3 and stayed on 4.0.3 for almost 8 months now .. and my backup is of 1 month old ... i dont know why it is showing 3.8.0 ..

this is something so wired . please someone help fix this issue.
Reply With Quote
  #10  
Old 11-11-2010, 04:49 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like the lastposterid column is missing in the forum table. Maybe something ddin''t go right during the database transfer.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04403 seconds
  • Memory Usage 2,261KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete