MyBB Community Forums

Full Version: MyBB error 42
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everyone,

I have this random MyBB error 42 message on my forum: https://promotionparadise.net

- My forum was installed on the current 1.8.14 version
- I have refused connection problems from my phone and hours later i got the error
- I tried doing the upgrade file, but my username and password couldn't work?
- I removed the install folder since it was already upgraded to the latest version?
- I cannot access the admin
Most likely the file inc/config.php has been reset because you performed the upgrade script without finishing it. If you have a backup of that file, you have to restore it, otherwise you have to perform again the upgrade script.
(2018-01-14, 07:30 AM)chack1172 Wrote: [ -> ]Most likely the file inc/config.php has been reset because you performed the upgrade script without finishing it. If you have a backup of that file, you have to restore it, otherwise you have to perform again the upgrade script.

The upgrade coudln'teven take my username and password and there was no version to upgrade? Also, I never even attempted to upgrade MyBB anyways so the install came randomly.
how your forum was installed - is it through one click installer at web host control panel ?
if so you have to find that service at your web host control panel & stop automatic upgrades

And you have to upload MyBB 1.8.14 files & do manual upgrade by visiting
https://promotionparadise.net/install/upgrade.php
Can you send the content of file inc/config.php removing passwords if present?
(2018-01-14, 07:50 AM).m. Wrote: [ -> ]how your forum was installed - is it through one click installer at web host control panel ?
if so you have to find that service at your web host control panel & stop automatic upgrades

And you have to upload MyBB 1.8.14 files & do manual upgrade by visiting
https://promotionparadise.net/install/upgrade.php

I did the one click installein Novemember with 1.8.14 and the forum was live and working. I never  even attempted to upgrade and auto upgrades was never selected and i checked and it was unchecked. Why would the install folder appeared randomly? I have not done any file uploads for the past couple days.

(2018-01-14, 07:51 AM)chack1172 Wrote: [ -> ]Can you send the content of file inc/config.php removing passwords if present?

Quote:<?php
/**
 * Database configuration
 *
 * Please see the MyBB Docs for advanced
 * database configuration for larger installations
 * https://docs.mybb.com/
 */

$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'bigbzogt_mybbpp';
$config['database']['table_prefix'] = 'mybbpp_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'bigbzogt_mybbpp';
$config['database']['password'] = Removed.

/**
 * Admin CP directory
 *  For security reasons, it is recommended you
 *  rename your Admin CP directory. You then need
 *  to adjust the value below to point to the
 *  new directory.
 */

$config['admin_dir'] = 'admin';

/**
 * Hide all Admin CP links
 *  If you wish to hide all Admin CP links
 *  on the front end of the board after
 *  renaming your Admin CP directory, set this
 *  to 1.
 */

$config['hide_admin_links'] = 0;

/**
 * Data-cache configuration
 *  The data cache is a temporary cache
 *  of the most commonly accessed data in MyBB.
 *  By default, the database is used to store this data.
 *
 *  If you wish to use the file system (cache/ directory), MemCache (or MemCached), xcache, APC, or eAccelerator
 *  you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc' or 'eaccelerator' from 'db'.
 */

$config['cache_store'] = 'db';

/**
 * Memcache configuration
 *  If you are using memcache or memcached as your
 *  data-cache, you need to configure the hostname
 *  and port of your memcache server below.
 *
 * If not using memcache, ignore this section.
 */

$config['memcache']['host'] = 'localhost';
$config['memcache']['port'] = 11211;

/**
 * Super Administrators
 *  A comma separated list of user IDs who cannot
 *  be edited, deleted or banned in the Admin CP.
 *  The administrator permissions for these users
 *  cannot be altered either.
 */

$config['super_admins'] = '1';

/**
 * Database Encoding
 *  If you wish to set an encoding for MyBB uncomment
 *  the line below (if it isn't already) and change
 *  the current value to the mysql charset:
 *  http://dev.mysql.com/doc/refman/5.1/en/c...mysql.html
 */

$config['database']['encoding'] = 'utf8';

/**
 * Automatic Log Pruning
 *  The MyBB task system can automatically prune
 *  various log files created by MyBB.
 *  To enable this functionality for the logs below, set the
 *  the number of days before each log should be pruned.
 *  If you set the value to 0, the logs will not be pruned.
 */

$config['log_pruning'] = array(
    'admin_logs' => 365, // Administrator logs
    'mod_logs' => 365, // Moderator logs
    'task_logs' => 30, // Scheduled task logs
    'mail_logs' => 180, // Mail error logs
    'user_mail_logs' => 180, // User mail logs
    'promotion_logs' => 180 // Promotion logs
);

/**
 * Disallowed Remote Hosts
 *  List of hosts the fetch_remote_file() function will not
 *  perform requests to.
 *  It is recommended that you enter hosts resolving to the
 *  forum server here to prevent Server Side Request
 *  Forgery attacks.
 */

$config['disallowed_remote_hosts'] = array(
    'localhost',
);

/**
 * Disallowed Remote Addresses
 *  List of IPv4 addresses the fetch_remote_file() function
 *  will not perform requests to.
 *  It is recommended that you enter addresses resolving to
 *  the forum server here to prevent Server Side Request
 *  Forgery attacks.
 *  Removing all values disables resolving hosts in that
 *  function.
 */

$config['disallowed_remote_addresses'] = array(
    '127.0.0.1',
    '10.0.0.0/8',
    '172.16.0.0/12',
    '192.168.0.0/16',
);

/**
 * Admin CP Secret PIN
 *  If you wish to request a PIN
 *  when someone tries to login
 *  on your Admin CP, enter it below.
 */

$config['secret_pin'] = '';
Ok, there is no issue with this file. The problem is the cached version.
First, edit file inc/class_core.php and check if variable $version is set to 1.8.14. If so connect to your database and execute this query. (this is not the correct method to fix it, you should perform the upgrade script again)
REPLACE INTO `mybbpp_datacache` (title, cache) VALUES ('version', 'a:2:{s:7:"version";s:6:"1.8.14";s:12:"version_code";i:1814;}')
(2018-01-14, 08:29 AM)chack1172 Wrote: [ -> ]Ok, there is no issue with this file. The problem is the cached version.
First, edit file inc/class_core.php and check if variable $version is set to 1.8.14. If so connect to your database and execute this query. (this is not the correct method to fix it, you should perform the upgrade script again)
REPLACE INTO `mybbpp_datacache` (title, cache) VALUES ('version', 'a:2:{s:7:"version";s:6:"1.8.14";s:12:"version_code";i:1814;}')

I ran the query and my username and password appears to be invalid? I didn't change my password at all.
Check the mybbpp_users table and check if there is your account. It should have uid = 1
(2018-01-14, 08:50 AM)chack1172 Wrote: [ -> ]Check the mybbpp_users table and check if there is your account. It should have uid = 1

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0003 sec)
SELECT * 
FROM `mybbpp_users` 
LIMIT 0 , 30

This is all i see

I just restored from a view days ago. I hope a random install folder does not appear again and I changed the backups from once a week to once a day. I am so confused and I really hope this does not happen to anyone else.
Pages: 1 2