vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Database error question (https://vborg.vbsupport.ru/showthread.php?t=324415)

COOLORANGEFREEZ 02-09-2017 11:28 PM

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!

Lynne 02-10-2017 12:43 AM

What version of PHP and MySQL are on the server?

COOLORANGEFREEZ 02-10-2017 02:07 AM

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.

Kane@airrifle 02-10-2017 07:46 AM

You edit your includes/config.php - around line 26 change the database type to 'mysqli'

COOLORANGEFREEZ 02-11-2017 03:33 PM

Quote:

Originally Posted by Kane@airrifle (Post 2582138)
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.

Kane@airrifle 02-11-2017 03:38 PM

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';


COOLORANGEFREEZ 02-11-2017 03:56 PM

Thank you for your help. Appreciated!


All times are GMT. The time now is 11:41 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.01814 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete