mChat

mChat installation errors - mChat

Re: mChat installation errors

by ivailo95 » Thu Mar 28, 2019 6:18 pm

kasimi wrote:Did you do this?
kasimi wrote:Then use phpMyAdmin or similar to delete all remaining rows in the phpbb_modules and phpbb_migrations tables that have mchat or MCHAT in their name.
i have smth like that table but i don't know if this table are from board or mchat file
Attachments
Screenshot 2019-03-28 20.16.29.png
User avatar
ivailo95
Registered User
Posts: 837
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Sat Mar 30, 2019 8:33 am

You don't have these problems when installing mChat manually on a new phpBB board.
kasimi wrote:Unfortunately I can't provide support if Upload Extensions was used to install/uninstall mChat
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3991
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by ivailo95 » Sat Mar 30, 2019 8:46 am

well i removed upload ext and try to fix mchat .. so..now i need reinstall whole board
User avatar
ivailo95
Registered User
Posts: 837
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by ivailo95 » Sun Apr 07, 2019 10:34 am

Okay then !
I delete mchat succesfully !
now i will try to install it thro my ftp account
Attachments
Screenshot 2019-04-07 13.17.48.png
User avatar
ivailo95
Registered User
Posts: 837
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by ivailo95 » Sun Apr 07, 2019 3:58 pm

Code: Select all

Directory listing of "/test.kefcheto.eu/ext/dmzx" successful
same result as before
Attachments
Screenshot 2019-04-07 18.57.38.png
User avatar
ivailo95
Registered User
Posts: 837
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Sun Apr 07, 2019 4:04 pm

Apply the edit in the second post of this topic.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3991
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by ivailo95 » Sun Apr 07, 2019 4:22 pm

kasimi wrote:Apply the edit in the second post of this topic.

Code: Select all

<?php

/**
 *
 * @package phpBB Extension - mChat
 * @copyright (c) 2016 dmzx - http://www.dmzx-web.net
 * @copyright (c) 2016 kasimi - https://kasimi.net
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
 *
 */

namespace dmzx\mchat;

use phpbb\extension\base;

class ext extends base
{
	/**
	 * Requires phpBB 3.1.7-PL1 due to usage of \phpbb\session:update_session_infos()
	 * Requires phpBB 3.1.8-RC1 due to HTTPS in version check
	 * Requires phpBB 3.2.0 due to EoL of phpBB 3.1
	 *
	 * @return bool
	 * @access public
	 */
	public function is_enableable()
	{
		$config = $this->container->get('config');
		return true;

		// Here we check if any modules from the mChat MOD for phpBB 3.0.x are still in the database.
		// This is_enableable() method is called multiple times during the installation but we only
		// need to do the following check once. Checking for the absence of the mchat_version value
		// in the config guarantees that we're in the very first step of the installation process.
		// Any later call of this method doesn't need to check this again and in fact will wrongly
		// detect the extension's modules as being remnants.
		if (empty($config['mchat_version']))
		{
			$table_prefix = $this->container->getParameter('core.table_prefix');
			$module_ids = $this->get_old_module_ids($table_prefix);

			if ($module_ids)
			{
				$lang = $this->container->get('language');
				$lang->add_lang('mchat_acp', 'dmzx/mchat');
				$php_ext = $this->container->getParameter('core.php_ext');
				$error_msg = $lang->lang('MCHAT_30X_REMNANTS', $table_prefix, implode($lang->lang('COMMA_SEPARATOR'), $module_ids)) . adm_back_link(append_sid('index.' . $php_ext, ['i' => 'acp_extensions', 'mode' => 'main']));

				trigger_error($error_msg, E_USER_WARNING);
			}
		}

		return phpbb_version_compare(PHPBB_VERSION, '3.2.0', '>=') && phpbb_version_compare(PHP_VERSION, '5.4.7', '>=');
	}

	/**
	 * This method checks whether the phpbb_modules table contains remnants of the 3.0 MOD.
	 * It returns an array of the modules' IDs, or an empty array if no old modules are found.
	 *
	 * @param string $table_prefix
	 * @return array
	 */
	protected function get_old_module_ids($table_prefix)
	{
		$db = $this->container->get('dbal.conn');

		$mchat_30x_module_langnames = [
			'ACP_CAT_MCHAT',
			'ACP_MCHAT_CONFIG',
			'ACP_USER_MCHAT',
			'UCP_CAT_MCHAT',
			'UCP_MCHAT_CONFIG',
		];

		$sql = 'SELECT module_id
			FROM ' . $table_prefix . 'modules
			WHERE ' . $db->sql_in_set('module_langname', $mchat_30x_module_langnames);
		$result = $db->sql_query($sql);
		$rows = $db->sql_fetchrowset($result);
		$db->sql_freeresult($result);

		$module_ids = [];

		foreach ($rows as $row)
		{
			$module_ids[] = $row['module_id'];
		}

		return $module_ids;
	}
}
Attachments
Screenshot 2019-04-07 19.21.40.png
User avatar
ivailo95
Registered User
Posts: 837
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact:

Re: mChat installation errors

by kasimi » Sun Apr 07, 2019 4:30 pm

You still have inconsistencies in your database, most likely caused by the Upload Extensions ext. See this post.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3991
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: mChat installation errors

by ivailo95 » Sun Apr 07, 2019 4:51 pm

kasimi wrote:You still have inconsistencies in your database, most likely caused by the Upload Extensions ext. See this post.
where is it?
Attachments
Screenshot 2019-04-07 20.06.13.png
User avatar
ivailo95
Registered User
Posts: 837
Joined: Tue Sep 05, 2017 8:00 am
Location: Bulgaria
Name: Ivailo
Contact: