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 04-23-2008, 12:06 AM
taheri6 taheri6 is offline
 
Join Date: Jan 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Access denied for user 'apache' after moving to new host

Hello,

I am having a weird problem that just started after moving web hosts.

I am getting "Access denied for user 'apache'@'xx.xx.xx.xx' (using password: NO)" error displayed at the very top of ONLY the index.php page. No other page displays this error message.

it is important to note that my DB is not hosted on the local host, and the forums work fine other then that one message that is displayed. There are no htaccess files, nor php.ini system settings that have a default DB Host stated. I also have two other VB Sites on this same server and none of them are having this issue, All using the same remote database server (with different Databases).

Here is the top few lines of the header - the error message is displayed before even the html tag is rendered.
PHP Code:
Access denied for user 'apache'@'xx.xx.xx.xx' (using passwordNO)
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html dir="ltr" lang="en">
<
head>
    <!-- 
no cache headers -->
    <
meta http-equiv="Pragma" content="no-cache" />
    <
meta http-equiv="Expires" content="-1" />
    <
meta http-equiv="Cache-Control" content="no-cache" />
    <!-- 
end no cache headers -->
    <
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<
meta name="generator" content="vBulletin 3.6.8" /> 
One thing I did notice is that this header says I have vBulletin 3.6.8 when I really have vBulletin 3.6.9, not sure if that is relevant.

My previous web host was a windows 2003 server, using php5 and mysql 4.1 - and this problem did not occur. My new host is a Centos5 x86_64 host using php5 and mysqli library with mysql 5.0 - and now this problem occurs. PHP Safe mode is not enabled.

I have tried setting error reporting to none, and have also tried disabling all installed products and both do not help.

Any assistance would be appreciated.
Reply With Quote
  #2  
Old 04-23-2008, 08:11 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you only get it on a single page, then it is probably not because of the vBulletin configuration. My guess is that there is a modification installed that has the MySQL user/pass hardcoded.
Reply With Quote
  #3  
Old 04-23-2008, 12:36 PM
taheri6 taheri6 is offline
 
Join Date: Jan 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It was plugin "Haggis Top Poster" that was causing the message to display. Once I disabled that Plugin the error message went away.

This is the plugin code that caused my error message problem.

PHP Code:
$rows 10;
$query="select * from " TABLE_PREFIX "user ORDER BY posts desc limit $rows";
$rt=mysql_query($query);
echo 
mysql_error();

while(
$nt=mysql_fetch_array($rt)){
$test .= "<a href='member.php?u=$nt[userid]'>$nt[username]</a> ($nt[posts]),  ";

Reply With Quote
  #4  
Old 04-24-2008, 06:38 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use this code instead:
PHP Code:
$users $vbulletin->db->query_read("
    SELECT *
    FROM " 
TABLE_PREFIX "user
    ORDER BY posts DESC
    LIMIT 10
"
);

while (
$user $vbulletin->db->fetch_array($users))
{
    
$test .= '<a href="member.php?u=' $user['userid'] . '">' $user['username'] . '</a> (' $user['posts'] . '),  ';

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 06:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04030 seconds
  • Memory Usage 2,205KB
  • 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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete