Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 02-09-2017, 11:28 PM
COOLORANGEFREEZ COOLORANGEFREEZ is offline
 
Join Date: Jul 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Database error question

Hi - I have the VB 3.8.3

I only use it to post research. Not for posting by the public.

Everything was fine until on the same VPS the PHP was compiled and curl was activated for another of my domains on a separate cPanel.

Then there were some detractable errors. They said, " I tried creating a new database and user and restored the database with the old one but still the base error exists."

"I have checked the mysql log but was not able to find any errors regarding the database. Could you please check the error with your developer and let me know if there is anything that needs to be done from our side."

Starting MySQL. ERROR! Manager of pid-file quit without updating file.
Log Messages 170209 9:30:52 [Note] /usr/sbin/mysqld: ready for connections.
170209 9:20:11 [Note] /usr/sbin/mysqld: Shutdown complete
170209 9:20:09 [Note] /usr/sbin/mysqld: Normal shutdown
160218 0:40:13 [Note] /usr/sbin/mysqld: ready for connections.
160217 22:48:45 [Note] /usr/sbin/mysqld: Shutdown complete
160217 22:48:37 [Note] /usr/sbin/mysqld: Normal shutdown
150723 22:29:59 [Note] /usr/sbin/mysqld: ready for connections.
150723 22:17:45 [Note] /usr/sbin/mysqld: Shutdown complete
150723 22:17:44 [Note] /usr/sbin/mysqld: Normal shutdown
150624 23:24:30 [Note] /usr/sbin/mysqld: ready for connections.
150624 22:59:46 [Note] /usr/sbin/mysqld: Shutdown complete
150624 22:59:45 [Note] /usr/sbin/mysqld: Normal shutdown
150622 23:07:14 [Note] /usr/sbin/mysqld: ready for connections.
150622 22:12:08 [Note] /usr/sbin/mysqld: Shutdown complete
150622 22:12:02 [Note] /usr/sbin/mysqld: Normal shutdown
150324 5:11:05 [Note] /usr/sbin/mysqld: ready for connections.
150324 5:11:05 [Note] /usr/sbin/mysqld: Shutdown complete
150324 5:11:04 [Note] /usr/sbin/mysqld: Normal shutdown
150225 5:13:23 [Note] /usr/sbin/mysqld: ready for connections.
150225 5:13:22 [Note] /usr/sbin/mysqld: Shutdown complete
150225 5:13:22 [Note] /usr/sbin/mysqld: Normal shutdown
150128 13:02:41 [Note] /usr/sbin/mysqld: ready for connections.
150128 13:02:37 [Note] /usr/sbin/mysqld: Shutdown complete
150128 13:02:31 [Note] /usr/sbin/mysqld: Normal shutdown
141230 14:29:12 [Note] /usr/sbin/mysqld: ready for connections.
141218 3:10:32 [Note] /usr/sbin/mysqld: ready for connections.
141218 2:44:19 [Note] /usr/sbin/mysqld: Shutdown complete
141218 2:44:16 [Note] /usr/sbin/mysqld: Normal shutdown
141212 4:54:39 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 1046544 bytes)
141209 18:19:36 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 1046544 bytes)
140818 5:06:37 [Note] /usr/sbin/mysqld: ready for connections.
140818 5:06:36 [Note] /usr/sbin/mysqld: Shutdown complete
140818 5:06:36 [Note] /usr/sbin/mysqld: Normal shutdown
140818 5:06:30 [Note] /usr/sbin/mysqld: ready for connections.
140818 5:06:19 [Note] /usr/sbin/mysqld: Shutdown complete
140818 5:06:15 [Note] /usr/sbin/mysqld: Normal shutdown
140721 19:50:05 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:50:05 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:59 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 1046544 bytes)
140721 19:49:59 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 671088 bytes)
140721 19:49:59 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 671088 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 671088 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 671088 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:41 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:35 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 1046544 bytes)
140721 19:49:21 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 559240 bytes)
140721 19:49:21 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 1046544 bytes)
140721 19:49:21 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 1046544 bytes)
140709 21:42:17 [Note] /usr/sbin/mysqld: ready for connections.

Any ideas for a fix would be appreciated. Thanks!
Reply With Quote
  #2  
Old 02-10-2017, 12:43 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What version of PHP and MySQL are on the server?
Reply With Quote
  #3  
Old 02-10-2017, 02:07 AM
COOLORANGEFREEZ COOLORANGEFREEZ is offline
 
Join Date: Jul 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi - More info:

mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
/home/wartornnations/public_html/forum/includes/class_core.php on line 311


It is throwing that error because mysql_connect extension is deprecated (http://php.net/manual/en/function.mysql-connect.php) for PHP versions 5.5 and above. The current PHP version in the server is 5.6

==
mysql Ver 14.12 Distrib 5.0.96, for pc-linux-gnu (i686) using readline 5.1
[root@server ~]# php -v
PHP 5.6.30 (cli) (built: Feb 5 2017 14:12:16)
Copyright (c) 1997-2016 The PHP Group
==

You will have to contact your developer and use mysqli or PDO instead to get this fixed.


Is there somewhere where I can just add the "i" and it should be good?

Thanks for your help

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

This is line 301 to 315. Should I go to line 311 and edit something? I don't see anywhere to add an "i". This is in file class_core.php

function db_connect($servername, $port, $username, $password, $usepconnect, $configfile = '', $charset = '')
{
if (function_exists('catch_db_error'))
{
set_error_handler('catch_db_error');
}

// catch_db_error will handle exiting, no infinite loop here
do
{
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
}
while ($link == false AND $this->reporterror);

restore_error_handler();

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

Right now I am seeing if we downgrade to 5.4 php if that will help.

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

So I got it to work by downgrading to 5.4 php. Thanks for any future help.
Reply With Quote
Благодарность от:
Lynne
  #4  
Old 02-10-2017, 07:46 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You edit your includes/config.php - around line 26 change the database type to 'mysqli'
Reply With Quote
2 благодарности(ей) от:
Lynne, MarkFL
  #5  
Old 02-11-2017, 03:33 PM
COOLORANGEFREEZ COOLORANGEFREEZ is offline
 
Join Date: Jul 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
You edit your includes/config.php - around line 26 change the database type to 'mysqli'

in includes and then config.php it only says -

<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.8.3
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is

There must be another file with same name if I wanted to make this change in the future. Thanks for the info.
Reply With Quote
  #6  
Old 02-11-2017, 03:38 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change the red text to mysqli in includes/config.php



Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.8.9 Patch Level 1
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2000-2017 vBulletin Solutions, Inc. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

/*-------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------+
| If you get any errors while attempting to connect to    |
| MySQL, you will need to email your webhost because we   |
| cannot tell you the correct values for the variables    |
| in this file.                                           |
\*-------------------------------------------------------*/

	//	****** DATABASE TYPE ******
	//	This is the type of the database server on which your vBulletin database will be located.
	//	Valid options are mysql and mysqli, for slave support add _slave.  Try to use mysqli if you are using PHP 5 and MySQL 4.1+
	// for slave options just append _slave to your preferred database type.
$config['Database']['dbtype'] = 'mysql';
Reply With Quote
2 благодарности(ей) от:
COOLORANGEFREEZ, TheLastSuperman
  #7  
Old 02-11-2017, 03:56 PM
COOLORANGEFREEZ COOLORANGEFREEZ is offline
 
Join Date: Jul 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your help. Appreciated!
Reply With Quote
Благодарность от:
TheLastSuperman
Reply

Thread Tools
Display Modes

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 01:24 PM.


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.04320 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (6)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete