vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Forum and Server Management (https://vborg.vbsupport.ru/forumdisplay.php?f=232)
-   -   Database Error (https://vborg.vbsupport.ru/showthread.php?t=253461)

Khan_ 11-10-2010 06:48 PM

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 .

borbole 11-10-2010 06:52 PM

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.

Khan_ 11-10-2010 07:03 PM

DB names are different than config.php file .. can you check for me if possible please.. i am lost .

borbole 11-10-2010 07:06 PM

Quote:

Originally Posted by Khan_ (Post 2120319)
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?

Khan_ 11-10-2010 07:10 PM

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 .

borbole 11-10-2010 07:19 PM

Quote:

Originally Posted by Khan_ (Post 2120321)
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.

Khan_ 11-10-2010 07:24 PM

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
:(

Outbackmark 11-11-2010 09:49 AM

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.

Khan_ 11-11-2010 04:06 PM

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.

borbole 11-11-2010 04:49 PM

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


All times are GMT. The time now is 12:59 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.01010 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete