There are a couple tests that use an undefined constant and look for the undefined constant warning in standard error. On PHP 8 these now cause fatal errors instead of warnings, causing the tests to fail. For example:
wp eval 'echo CONST_WITHOUT_QUOTES;'
PHP Fatal error: Uncaught Error: Undefined constant "CONST_WITHOUT_QUOTES" in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code:1
Stack trace:
#0 vendor/wp-cli/eval-command/src/Eval_Command.php(37): eval()
#1 [internal function]: Eval_Command->__invoke(Array, Array)
#2 php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func(Array, Array, Array)
#3 [internal function]: WP_CLIDispatcherCommandFactory::WP_CLIDispatcher{closure}(Array, Array)
#4 php/WP_CLI/Dispatcher/Subcommand.php(489): call_user_func(Object(Closure), Array, Array)
#5 php/WP_CLI/Runner.php(380): WP_CLIDispatcherSubcommand->invoke(Array, Array, Array)
#6 php/WP_CLI/Runner.php(403): WP_CLIRunner->run_command(Array, Array)
#7 php/WP_CLI/Runner.php(87): WP_CLIRunner->run_command_and_exit()
#8 php/WP_CLI/Runner.php(1116): WP_CLIRunner->do_early_invoke('before_wp_load')
#9 php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLIRunner->start()
#10 php/bootstrap.php(75): WP_CLIBootstrapLaunchRunner->process(Object(WP_CLIBootstrapBootstrapState))
#11 php/wp-cli.php(27): WP_CLIbootstrap()
#12 php/boot-fs.php(17): require_once('/Users/timothyb...')
#13 {main}
thrown in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code on line 1
Fatal error: Uncaught Error: Undefined constant "CONST_WITHOUT_QUOTES" in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code:1
Stack trace:
#0 vendor/wp-cli/eval-command/src/Eval_Command.php(37): eval()
#1 [internal function]: Eval_Command->__invoke(Array, Array)
#2 php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func(Array, Array, Array)
#3 [internal function]: WP_CLIDispatcherCommandFactory::WP_CLIDispatcher{closure}(Array, Array)
#4 php/WP_CLI/Dispatcher/Subcommand.php(489): call_user_func(Object(Closure), Array, Array)
#5 php/WP_CLI/Runner.php(380): WP_CLIDispatcherSubcommand->invoke(Array, Array, Array)
#6 php/WP_CLI/Runner.php(403): WP_CLIRunner->run_command(Array, Array)
#7 php/WP_CLI/Runner.php(87): WP_CLIRunner->run_command_and_exit()
#8 php/WP_CLI/Runner.php(1116): WP_CLIRunner->do_early_invoke('before_wp_load')
#9 php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLIRunner->start()
#10 php/bootstrap.php(75): WP_CLIBootstrapLaunchRunner->process(Object(WP_CLIBootstrapBootstrapState))
#11 php/wp-cli.php(27): WP_CLIbootstrap()
#12 php/boot-fs.php(17): require_once('/Users/timothyb...')
#13 {main}
thrown in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code on line 1
Error: There has been a critical error on this website.Learn more about debugging in WordPress. There has been a critical error on this website.
cwd: /var/folders/7d/mcmynw4x60v3y8nwlfz3ppg80000gn/T/wp-cli-test-run-flags.feature.61-5fac294c5a3947.34272270/
run time: 0.26895189285278
exit status: 1
In step `Then STDOUT should be:'. # vendor/wp-cli/wp-cli-tests/features/steps/then.php:21
From scenario `Debug run'. # features/flags.feature:61
Of feature `Global flags'.
For this it seems like it might be better to just call trigger_error() instead of trying to generate a PHP warning thru usage of invalid code?
$ wp eval "echo 'TEST_CONFIG_OVERRIDE => ' . TEST_CONFIG_OVERRIDE;"
PHP Fatal error: Uncaught Error: Undefined constant "TEST_CONFIG_OVERRIDE" in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code:1
Stack trace:
#0 vendor/wp-cli/eval-command/src/Eval_Command.php(37): eval()
#1 [internal function]: Eval_Command->__invoke(Array, Array)
#2 php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func(Array, Array, Array)
#3 [internal function]: WP_CLIDispatcherCommandFactory::WP_CLIDispatcher{closure}(Array, Array)
#4 php/WP_CLI/Dispatcher/Subcommand.php(489): call_user_func(Object(Closure), Array, Array)
#5 php/WP_CLI/Runner.php(380): WP_CLIDispatcherSubcommand->invoke(Array, Array, Array)
#6 php/WP_CLI/Runner.php(403): WP_CLIRunner->run_command(Array, Array)
#7 php/WP_CLI/Runner.php(87): WP_CLIRunner->run_command_and_exit()
#8 php/WP_CLI/Runner.php(1116): WP_CLIRunner->do_early_invoke('before_wp_load')
#9 php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLIRunner->start()
#10 php/bootstrap.php(75): WP_CLIBootstrapLaunchRunner->process(Object(WP_CLIBootstrapBootstrapState))
#11 php/wp-cli.php(27): WP_CLIbootstrap()
#12 php/boot-fs.php(17): require_once('/Users/timothyb...')
#13 {main}
thrown in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code on line 1
Fatal error: Uncaught Error: Undefined constant "TEST_CONFIG_OVERRIDE" in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code:1
Stack trace:
#0 vendor/wp-cli/eval-command/src/Eval_Command.php(37): eval()
#1 [internal function]: Eval_Command->__invoke(Array, Array)
#2 php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func(Array, Array, Array)
#3 [internal function]: WP_CLIDispatcherCommandFactory::WP_CLIDispatcher{closure}(Array, Array)
#4 php/WP_CLI/Dispatcher/Subcommand.php(489): call_user_func(Object(Closure), Array, Array)
#5 php/WP_CLI/Runner.php(380): WP_CLIDispatcherSubcommand->invoke(Array, Array, Array)
#6 php/WP_CLI/Runner.php(403): WP_CLIRunner->run_command(Array, Array)
#7 php/WP_CLI/Runner.php(87): WP_CLIRunner->run_command_and_exit()
#8 php/WP_CLI/Runner.php(1116): WP_CLIRunner->do_early_invoke('before_wp_load')
#9 php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLIRunner->start()
#10 php/bootstrap.php(75): WP_CLIBootstrapLaunchRunner->process(Object(WP_CLIBootstrapBootstrapState))
#11 php/wp-cli.php(27): WP_CLIbootstrap()
#12 php/boot-fs.php(17): require_once('/Users/timothyb...')
#13 {main}
thrown in vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code on line 1
Error: There has been a critical error on this website.Learn more about debugging in WordPress. There has been a critical error on this website.
cwd: /var/folders/7d/mcmynw4x60v3y8nwlfz3ppg80000gn/T/wp-cli-test-run-wp-config.feature.3-5fac29ee5c5131.28511182/
run time: 0.27620100975037
exit status: 1
In step `Then STDOUT should contain:'. # vendor/wp-cli/wp-cli-tests/features/steps/then.php:21
From scenario `Default WordPress install with WP_CONFIG_PATH specified in environment variable'. # features/wp-config.feature:3
Of feature `wp-config'.
This seems like it could be fixed by making this eval something like echo defined( 'TEST_CONFIG_OVERRIDE' ) ? TEST_CONFIG_OVERRIDE : 'missing'. And then look for either missing or success.
Все что было написано в header.php (1 — 97 строчка)
<?php
include 'config.php';
$base_logs = new mysqli(Config::DB_HOST_LOG, Config::DB_USER_LOG, Config::DB_PASS_LOG, Config::DB_NAME_LOG) or die("Ошибка BD #2!");
$base_logs -> query("SET character_set_results = utf8");
$base_logs -> query("SET NAMES 'utf8'");
$TABLE_LOG = Config::DB_LOG_TABLE;
$base_server = new mysqli(Config::DB_HOST_SERVER, Config::DB_USER_SERVER, Config::DB_PASS_SERVER, Config::DB_NAME_SERVER) or die("Ошибка BD #1!");
$base_server -> query("SET character_set_results = utf8");
$base_server -> query("SET NAMES 'utf8'");
if (isset($_COOKIE[hash]))
{
$result = $base_logs -> query("SELECT user_id FROM coookie WHERE hash = '".$_COOKIE[hash]."' LIMIT 1; ");
$data = mysqli_fetch_array($result);
$sql = "SELECT * FROM user WHERE id = '".$data[user_id]."' LIMIT 1;";
$result -> close();
$result = $base_logs -> query($sql);
$cookie = mysqli_fetch_assoc($result);
$result -> close();
$ip = explode( (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ':') == true ? ':':'.' ), $_SERVER['HTTP_X_FORWARDED_FOR'] );
$cookie[ip] = $ip[0].'^'.$ip[1].'^'.$ip[2];
$sign = hash('sha512', implode ( '|', $cookie ), false);
if ($sign !== $_COOKIE[hash])
{
$base_logs -> query("DELETE FROM coookie WHERE hash = '".$_COOKIE[hash]."'");
setcookie("hash", "", time() - 30, "/", "", 1);
unset($_SESSION['account_log_name']);
unset($_SESSION['account_log_password']);
session_destroy();
header('Location: ../check/authorization');
die();
}
}
else
{
$user = $_SESSION["account_log_name"];
$password = $_SESSION["account_log_password"];
$sql = "SELECT * FROM user WHERE login = '".$user."' AND password = '".$password."'";
}
$query = $base_logs -> query($sql);
$row = mysqli_num_rows($query);
$data = mysqli_fetch_assoc($query);
$subscription = $data['sub'];
if (!$row && $_SERVER['SCRIPT_NAME'] !== '/check/authorization')
{
unset($_SESSION['account_log_name']);
unset($_SESSION['account_log_password']);
session_destroy();
header('Location: ../check/authorization');
die();
}
else if (!$data[status])
{
die('<html><head><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"></head></html><center><b>Внимание ошибка авторизации:<br />Ваш аккаунт проходит модерацию</b><br /><a href = ../check/authorization>Вернуться на раздел авторизации</a></center>');
return false;
}
$query -> close();
$query = $base_logs -> query('SELECT * FROM `settings`');
$server = mysqli_fetch_assoc($query);
if (!$server[status])
{
include '../404/close.php';
die();
return false;
}
else if ($row && $subscription < time() && $_SERVER['SCRIPT_NAME'] !== '/pages/subscription.php')
{
header('Location: ../pages/subscription');
die();
}
?>
Moderator: General Support Moderators
-
kuktas
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Feb 15, 2021 4:36 pm
Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING» in /var/www/libraries/vendor/joomla/string/src/phputf8/utf8.php:38 Stack trace: #0 /var/www/libraries/vendor/composer/autoload_real.php(66): require() #1 /var/www/libraries/vendor/composer/autoload_real.php(56): composerRequire205c915b9c7d3e718e7c95793ee67ffe() #2 /var/www/libraries/vendor/autoload.php(7): ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee6 7ffe::getLoader() #3 /var/www/libraries/cms.php(36): require(‘…’) #4 /var/www/installation/application/framework.php(39): require_once(‘…’) #5 /var/www/installation/application/bootstrap.php(17): require_once(‘…’) #6 /var/www/installation/index.php(29): require_once(‘…’) #7 {main} thrown in /var/www/libraries/vendor/joomla/string/src/phputf8/utf8.php on line 38
how to fix this error?
ubuntu 20.04
nginx
php 8.0.2
-
frostmakk
- Joomla! Explorer
- Posts: 256
- Joined: Sun Dec 28, 2014 9:30 am
- Location: Stavanger, Norway
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by frostmakk » Mon Feb 15, 2021 10:03 pm
What version of Joomla is it you are trying to install?
It does not look like latest 3.9.24
-
kuktas
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Feb 15, 2021 4:36 pm
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by kuktas » Tue Feb 16, 2021 7:42 am
frostmakk wrote: ↑
Mon Feb 15, 2021 10:03 pm
What version of Joomla is it you are trying to install?
It does not look like latest 3.9.24
I think v3.9.23.
I’m not sure. I have installed PHP 7.3 and it works fine.
-
DeeEmm
- Joomla! Apprentice
- Posts: 28
- Joined: Fri Mar 04, 2011 4:36 am
- Contact:
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by DeeEmm » Mon Mar 01, 2021 6:38 am
Looks to be an error in /libraries/vendor/joomla/string/src/phputf8/utf8.php
MB_OVERLOAD_STRING is depreciated as of php8.0
-
toivo
- Joomla! Master
- Posts: 15503
- Joined: Thu Feb 15, 2007 5:48 am
- Location: Sydney, Australia
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by toivo » Mon Mar 01, 2021 7:44 am
kuktas wrote: ↑
Tue Feb 16, 2021 7:42 am
I think v3.9.23.
The line number of the PHP fatal error indicates that the version of Joomla is earlier than 3.9.23.
In Joomla 3.9.23 the line 38, where the error in your version occurred, is actually the start of the following comment about the subsequent lines of code that address the removal, not just deprecation, of the constant MB_OVERLOAD_STRING in PHP 8:
Code: Select all
/*
* Joomla modification - As of PHP 8, the `mbstring.func_overload` configuration has been removed and the
* MB_OVERLOAD_STRING constant will no longer be present, so this check only runs for PHP 7 and older
* See https://github.com/php/php-src/commit/331e56ce38a91e87a6fb8e88154bb5bde445b132
* and https://github.com/php/php-src/commit/97df99a6d7d96a886ac143337fecad775907589a
* for additional references
*/
Before you can update PHP to version 8, update Joomla to the latest version, which is currently 3.9.24 and likely 3.9.25 from tomorrow.
Toivo Talikka, Global Moderator
-
DeeEmm
- Joomla! Apprentice
- Posts: 28
- Joined: Fri Mar 04, 2011 4:36 am
- Contact:
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by DeeEmm » Mon Mar 01, 2021 7:47 am
I have the same error and I’m on 3.9.24
-
toivo
- Joomla! Master
- Posts: 15503
- Joined: Thu Feb 15, 2007 5:48 am
- Location: Sydney, Australia
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by toivo » Mon Mar 01, 2021 8:41 am
@DeeEmm, something must have gone wrong in the Joomla update. Go to Extensions — Joomla! Update, click Check for Updates and re-install the Joomla core files from the update package.
Toivo Talikka, Global Moderator
-
DeeEmm
- Joomla! Apprentice
- Posts: 28
- Joined: Fri Mar 04, 2011 4:36 am
- Contact:
Re: Fatal error: Uncaught Error: Undefined constant «MB_OVERLOAD_STRING»
Post
by DeeEmm » Mon Mar 01, 2021 1:01 pm
toivo wrote: ↑
Mon Mar 01, 2021 8:41 am
@DeeEmm, something must have gone wrong in the Joomla update. Go to Extensions — Joomla! Update, click Check for Updates and re-install the Joomla core files from the update package.
Thanks. Now working okay with php 8
Return to “Installation Joomla! 3.x”
Jump to
- Joomla! Announcements
- ↳ Announcements
- ↳ Announcements Discussions
- Joomla! 4.x — Ask Support Questions Here
- ↳ General Questions/New to Joomla! 4.x
- ↳ Installation Joomla! 4.x
- ↳ Administration Joomla! 4.x
- ↳ Migrating and Upgrading to Joomla! 4.x
- ↳ Extensions for Joomla! 4.x
- ↳ Security in Joomla! 4.x
- ↳ Templates for Joomla! 4.x
- ↳ Search Engine Optimization (Joomla! SEO) in Joomla! 4.x
- ↳ Language — Joomla! 4.x
- ↳ Performance — Joomla! 4.x
- ↳ Joomla! 4.x Coding
- Joomla! 3.x — Ask Support Questions Here
- ↳ General Questions/New to Joomla! 3.x
- ↳ Installation Joomla! 3.x
- ↳ Joomla! 3.x on IIS webserver
- ↳ Administration Joomla! 3.x
- ↳ Access Control List (ACL) in Joomla! 3.x
- ↳ Migrating and Upgrading to Joomla! 3.x
- ↳ Security in Joomla! 3.x
- ↳ Extensions for Joomla! 3.x
- ↳ Templates for Joomla! 3.x
- ↳ Search Engine Optimization (Joomla! SEO) in Joomla! 3.x
- ↳ Language — Joomla! 3.x
- ↳ Performance — Joomla! 3.x
- ↳ Joomla! 3.x Coding
- Joomla! Versions which are End of Life
- ↳ Joomla! 2.5 — End of Life 31 Dec 2014
- ↳ General Questions/New to Joomla! 2.5
- ↳ Installation Joomla! 2.5
- ↳ Joomla! 2.5 on IIS webserver
- ↳ Administration Joomla! 2.5
- ↳ Access Control List (ACL) in Joomla! 2.5
- ↳ Migrating and Upgrading to Joomla! 2.5
- ↳ Security in Joomla! 2.5
- ↳ Extensions for Joomla! 2.5
- ↳ Templates for Joomla! 2.5
- ↳ Search Engine Optimization (Joomla! SEO) in Joomla! 2.5
- ↳ Language — Joomla! 2.5
- ↳ Performance — Joomla! 2.5
- ↳ Joomla! 1.5 — End of Life Sep 2012
- ↳ General Questions/New to Joomla! 1.5
- ↳ Installation 1.5
- ↳ Joomla! 1.5 on IIS webserver
- ↳ Administration 1.5
- ↳ Migrating and Upgrading to Joomla! 1.5
- ↳ Security in Joomla! 1.5
- ↳ Extensions for Joomla! 1.5
- ↳ Templates for Joomla! 1.5
- ↳ Search Engine Optimization (Joomla! SEO) in Joomla! 1.5
- ↳ Language — Joomla! 1.5
- ↳ Performance — Joomla! 1.5
- ↳ Joomla! 1.0 — End of Life 22 July 2009
- ↳ Installation — 1.0.x
- ↳ Upgrading — 1.0.x
- ↳ Security — 1.0.x
- ↳ 3rd Party/Non Joomla! Security Issues
- ↳ Administration — 1.0.x
- ↳ Extensions — 1.0.x
- ↳ Components
- ↳ Modules
- ↳ Plugins/Mambots
- ↳ WYSIWYG Editors — 1.0.x
- ↳ Integration & Bridges — 1.0.x
- ↳ phpbb — Joomla! Integration
- ↳ Templates & CSS — 1.0.x
- ↳ Language — 1.0.x
- ↳ Joom!Fish and Multilingual Sites
- ↳ Performance — 1.0.x
- ↳ General Questions — 1.0.x
- Joomla! International Language Support
- ↳ International Zone
- ↳ Arabic Forum
- ↳ تنبيهات هامة
- ↳ الدروس
- ↳ 4.x جوملا!
- ↳ جوملا! 1.6/1.7
- ↳ الأسئلة الشائعة
- ↳ التثبيت و الترقية
- ↳ الحماية — و تحسين السرعة والأداء
- ↳ لوحة التحكم
- ↳ الإضافات البرمجية
- ↳ تعريب جوملا! و الإضافات البرمجية
- ↳ القوالب و التصميم
- ↳ صداقة محركات البحث
- ↳ القسم العام
- ↳ 1.5 !جوملا
- ↳ الأسئلة الشائعة
- ↳ التثبيت و الترقية
- ↳ الحماية — و تحسين السرعة والأداء
- ↳ لوحة التحكم
- ↳ الإضافات البرمجية
- ↳ تعريب جوملا! و الإضافات البرمجية
- ↳ القوالب و التصميم
- ↳ صداقة محركات البحث
- ↳ القسم العام
- ↳ جوملا! 1.0
- ↳ الأسئلة الشائـعة
- ↳ التثبيت
- ↳ لوحة التحكم
- ↳ الإضافات البرمجية
- ↳ الإضافات المعرّبة
- ↳ القوالب و التصميم
- ↳ الحماية — تحسين السرعة والأداء — صداقة محركات البحث
- ↳ القسم العام
- ↳ القسم العام
- ↳ !عرض موقعك بجوملا
- ↳ الأرشيف
- ↳ Bengali Forum
- ↳ Bosnian Forum
- ↳ Joomla! 1.5
- ↳ Instalacija i prvi koraci
- ↳ Ekstenzije
- ↳ Templejti
- ↳ Moduli
- ↳ Prevodi i dokumentacija
- ↳ Joomla! 1.7 / Joomla! 1.6
- ↳ Catalan Forum
- ↳ Notícies
- ↳ Temes sobre l’administració
- ↳ Temes sobre la traducció
- ↳ Components, mòduls i joombots
- ↳ Temes de disseny
- ↳ Webs realitzades amb Joomla!
- ↳ Offtopics
- ↳ Chinese Forum
- ↳ Croatian Forum
- ↳ Danish Forum
- ↳ Meddelelser
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x (Anbefalet til nye installationer. Nyeste funktionalitet)
- ↳ Installation, backup, opdatering og flytning — Godt igang
- ↳ Administration — Generel brug
- ↳ Komponenter, Moduler og Plugins
- ↳ Template, CSS og Design
- ↳ Nethandel, betaling m.m.
- ↳ Ældre versioner (disse vedligeholdes ikke længere fra officiel side)
- ↳ Joomla! 2.5 (Supporteres indtil 31. dec. 2014)
- ↳ Installation, backup, opdatering og flytning — Godt igang
- ↳ Administration — Generel brug
- ↳ Komponenter, Moduler og Plugins
- ↳ Template, CSS og Design
- ↳ Nethandel, betaling m.m.
- ↳ Joomla 1.5 (Tidligere langtidssupporteret version indtil sep. 2012)
- ↳ Installation, backup, opdatering og flytning — Godt igang
- ↳ Administration — Generel brug
- ↳ Komponenter, Moduler og Plugins
- ↳ Template, CSS og Design
- ↳ Nethandel, betaling m.m.
- ↳ Joomla 1.0 (Udgået version, der blev afløst af 1.5 i 2008)
- ↳ Installation, backup, opdatering og flytning — Godt igang
- ↳ Administration — Generel brug
- ↳ Komponenter, Moduler og Mambots
- ↳ Template, CSS og Design
- ↳ Nethandel, betaling m.m.
- ↳ Oversættelser (lokalisering)
- ↳ Joomla brugergrupper i Danmark
- ↳ JUG Kolding
- ↳ JUG København
- ↳ JUG Odense
- ↳ JUG Århus
- ↳ JUG Sorø
- ↳ Kommerciel (betalt) hjælp ønskes
- ↳ SEO
- ↳ FAQ — Dokumentation og vejledninger
- ↳ Vis dit websted
- ↳ Afviste ‘Vis dit websted’ indlæg
- ↳ Diverse (Off topic)
- ↳ Dutch Forum
- ↳ Aankondigingen
- ↳ Algemene vragen
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x
- ↳ Installatie 3.x
- ↳ Extensies 3.x
- ↳ Templates 3.x
- ↳ Joomla! 2.5
- ↳ Installatie 2.5
- ↳ Componenten 2.5
- ↳ Modules 2.5
- ↳ Plugins 2.5
- ↳ Templates 2.5
- ↳ Joomla! 1.5
- ↳ Installatie
- ↳ Componenten
- ↳ Modules
- ↳ Plugins
- ↳ Templates
- ↳ Joomla! 1.0
- ↳ Installatie 1.0.x
- ↳ Componenten 1.0.x
- ↳ Modules 1.0.x
- ↳ Mambots 1.0.x
- ↳ Templates 1.0.x
- ↳ Vertalingen
- ↳ Offtopic
- ↳ Show jouw website
- ↳ Filipino Forum
- ↳ International Support Center
- ↳ Pinoy General Discussion & Archives
- ↳ Site Showcase
- ↳ Events
- ↳ Design Tips and Tricks
- ↳ Tsismis Zone
- ↳ Pinoy Translation Zone
- ↳ Pinoy Forum Archives
- ↳ Joomla! Philippines Local Forum www.joomla.org.ph
- ↳ Finnish Forum
- ↳ French Forum
- ↳ Les annonces!
- ↳ Le bistrot!
- ↳ L’expo!
- ↳ J! 4.x — L’atelier!
- ↳ J! 3.x — L’atelier!
- ↳ 3.x — Questions générales, nouvel utilisateur
- ↳ 3.x — Installation, migration et mise à jour
- ↳ 3.x — Sécurité et performances
- ↳ 3.x — Extensions tierce partie
- ↳ 3.x — Templates et design
- ↳ 3.x — Développement
- ↳ 3.x — Ressources
- ↳ J! 2.5.x — L’atelier!
- ↳ 2.5 — Questions générales
- ↳ 2.5 — Installation, migration et mise à jour
- ↳ 2.5 — Sécurité et performances
- ↳ 2.5 — Extensions tierce partie
- ↳ 2.5 — Templates et design
- ↳ 2.5 — Développement
- ↳ 2.5 — Ressources
- ↳ J! 1.5.x — L’atelier!
- ↳ 1.5 — Questions générales
- ↳ 1.5 — Installation, migration et mise à jour
- ↳ 1.5 — Sécurité et performances
- ↳ 1.5 — Extensions tierce partie
- ↳ 1.5 — Templates et design
- ↳ 1.5 — Développement
- ↳ 1.5 — Ressources
- ↳ J! 1.0.x — L’atelier!
- ↳ 1.0 — Questions générales
- ↳ 1.0 — Installation et mise à jour
- ↳ 1.0 — Sécurité
- ↳ 1.0 — Extensions tierce partie
- ↳ 1.0 — Templates et design
- ↳ 1.0 — Développement
- ↳ 1.0 — Ressources
- ↳ Besoin d’un professionel ?
- ↳ Extensions Open Source pour Joomla!
- ↳ German Forum
- ↳ Ankündigungen
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x
- ↳ Allgemeine Fragen
- ↳ Installation und erste Schritte
- ↳ Komponenten, Module, Plugins
- ↳ Template, CSS und Designfragen
- ↳ Entwicklerforum
- ↳ Zeige Deine Webseite
- ↳ Joomla! 2.5
- ↳ Allgemeine Fragen
- ↳ Installation und erste Schritte
- ↳ Komponenten, Module, Plugins
- ↳ Template, CSS und Designfragen
- ↳ Entwicklerforum
- ↳ Zeige Deine Webseite
- ↳ Joomla! 1.5
- ↳ Allgemeine Fragen
- ↳ Installation und erste Schritte
- ↳ Komponenten, Module, Plugins
- ↳ Template, CSS und Designfragen
- ↳ Entwicklerforum
- ↳ Zeige Deine Webseite
- ↳ Professioneller Service
- ↳ Sonstiges (Offtopic)
- ↳ Archiv
- ↳ Joomla! 1.0
- ↳ Allgemeine Fragen 1.0.x
- ↳ Installation und erste Schritte 1.0.x
- ↳ Komponenten, Module, Mambots 1.0.x
- ↳ Template, CSS und Designfragen 1.0.x
- ↳ Entwicklerforum 1.0.x
- ↳ Zeige Deine Webseite 1.0.x
- ↳ Greek Forum
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x
- ↳ Joomla! 2.5.x
- ↳ Joomla! 1.5.x
- ↳ Joomla! 1.0.x
- ↳ Hebrew Forum
- ↳ Indic Languages Forum
- ↳ Indonesian Forum
- ↳ FAQ
- ↳ Bantuan
- ↳ Komponen
- ↳ Modul
- ↳ Template
- ↳ Diskusi
- ↳ Italian Forum
- ↳ Guide
- ↳ Traduzioni
- ↳ Componenti — Moduli — Plugins
- ↳ Template — Grafica
- ↳ Notizie
- ↳ Prodotti Open Source per Joomla!
- ↳ Richieste professionali
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x
- ↳ Joomla! 2.5.x
- ↳ Joomla! 1.x
- ↳ Latvian Forum
- ↳ Lithuanian Forum
- ↳ Joomla! 4.x
- ↳ Joomla! 1.5
- ↳ Joomla! 1.7 / Joomla! 1.6
- ↳ Joomla! 1.0
- ↳ Vertimai ir Kalba
- ↳ Malaysian Forum
- ↳ Solved
- ↳ Norwegian Forum
- ↳ Informasjon
- ↳ Arkiverte annonseringer
- ↳ FAQ — Ofte spurte spørsmål
- ↳ Arkiv
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x
- ↳ Administrasjon/installasjon
- ↳ Migrering/Oppdatering
- ↳ Template, CSS og design
- ↳ Komponenter/moduler/programutvidelser
- ↳ Sikkerhet
- ↳ Generelt
- ↳ Netthandel, betaling m.m.
- ↳ VirtueMart
- ↳ Andre nettbutikkløsninger
- ↳ Generelt
- ↳ Oversettelser
- ↳ Fremvisning av sider (Show off)
- ↳ Avviste fremvisninger
- ↳ Diverse (off topic)
- ↳ Kommersiell hjelp ønskes
- ↳ Eldre versjoner av Joomla!
- ↳ Joomla! 1.0
- ↳ Administrasjon/installasjon
- ↳ Template, CSS og design
- ↳ Komponenter/moduler/mambots
- ↳ Sikkerhet
- ↳ Generelt
- ↳ Joomla! 1.5
- ↳ Administrasjon/installasjon
- ↳ Migrering/Oppdatering
- ↳ Template, CSS og design
- ↳ Komponenter/moduler/programutvidelser
- ↳ Sikkerhet
- ↳ Generelt
- ↳ Joomla! 2.5
- ↳ Administrasjon/installasjon
- ↳ Migrering/Oppdatering
- ↳ Template, CSS og design
- ↳ Komponenter/moduler/programutvidelser
- ↳ Sikkerhet
- ↳ Generelt
- ↳ Persian Forum
- ↳ قالب ها
- ↳ مدیریت
- ↳ سوالهای عمومی
- ↳ نصب
- ↳ مامبوت ها
- ↳ ماژولها
- ↳ کامپوننت ها
- ↳ Polish Forum
- ↳ Instalacja i aktualizacja
- ↳ Administracja
- ↳ Komponenty, moduły, wtyczki
- ↳ Szablony
- ↳ Paczta i Podziwiajta
- ↳ Modyfikacje i własne rozwiązania
- ↳ Tłumaczenia
- ↳ FAQ
- ↳ Tips&Tricks
- ↳ Dokumentacja
- ↳ Profesjonalne usługi
- ↳ Portuguese Forum
- ↳ Componentes, módulos e mambots
- ↳ Programação e desenvolvimento
- ↳ Segurança
- ↳ Sites dos usuários
- ↳ Off-topic
- ↳ Tradução
- ↳ Templates
- ↳ Romanian Forum
- ↳ Traduceri
- ↳ Russian Forum
- ↳ Объявления по Joomla!
- ↳ Безопасность Joomla!
- ↳ Joomla 4.x — Задайте здесь свой вопрос по поддержке
- ↳ Joomla 3.x — Задайте здесь свой вопрос по поддержке
- ↳ Общие вопросы/Новичок в Joomla! 3.x
- ↳ Установка Joomla! 3.x
- ↳ Миграция и переход на Joomla! 3.x
- ↳ Расширения для Joomla! 3.x
- ↳ Многоязычные веб-сайты на Joomla 3.x
- ↳ Joomla 2.5 — Задайте здесь свой вопрос по поддержке
- ↳ Общие вопросы/Новичок в Joomla! 2.5
- ↳ Установка Joomla! 2.5
- ↳ Расширения для Joomla! 2.5
- ↳ Русский язык Joomla! 2.5
- ↳ Serbian/Montenegrin Forum
- ↳ Tehnička pitanja
- ↳ Instalacija i početnička pitanja
- ↳ Šabloni
- ↳ Prevod i dokumentacija
- ↳ Ćaskanje
- ↳ Bezbednost
- ↳ Joomla! dodaci
- ↳ Pravna pitanja
- ↳ Arhiva
- ↳ Joomla! Događaji i Zajednica
- ↳ Izlog (spisak) sajtova radjenih u Joomla! CMS-u
- ↳ Profesionalne usluge
- ↳ Slovak Forum
- ↳ Spanish Forum
- ↳ Joomla! 4.x
- ↳ Joomla! 3.x
- ↳ Migración y actualización a Joomla 3.x
- ↳ Versiones de Joomla! obsoletas
- ↳ Joomla! 2.5
- ↳ Joomla! 1.5
- ↳ Extensiones
- ↳ Plantillas (templates) y diseño
- ↳ Idioma y traducciones
- ↳ SEO para Joomla!
- ↳ Seguridad y rendimiento
- ↳ Productos de Código Abierto para Joomla!
- ↳ Servicios profesionales
- ↳ Salón de la comunidad Ñ
- ↳ Swedish Forum
- ↳ Meddelanden
- ↳ Forum Joomla! 4.x
- ↳ Forum Joomla! 3.x
- ↳ Allmänna frågor
- ↳ Användning och administration
- ↳ Installation, backup och säkerhet
- ↳ Komponenter, moduler och plugin
- ↳ Mallar (templates) och design
- ↳ Äldre versioner
- ↳ Forum Joomla! 1.0
- ↳ Allmänna frågor
- ↳ Användning och administration
- ↳ Installation, backup och säkerhet
- ↳ Komponenter, moduler och Mambots
- ↳ Mallar (templates) och design
- ↳ Forum Joomla! 1.7 / Joomla! 1.6
- ↳ Allmänna frågor
- ↳ Användning och administration
- ↳ Installation, backup och säkerhet
- ↳ Komponenter, moduler och plugin
- ↳ Mallar (templates) och design
- ↳ Forum Joomla! 1.5
- ↳ Allmänna frågor
- ↳ Användning och administration
- ↳ Installation, backup och säkerhet
- ↳ Komponenter, moduler och plugin
- ↳ Mallar (templates) och design
- ↳ Forum Joomla! 2.5
- ↳ Allmänna frågor
- ↳ Användning och administration
- ↳ Installation, backup och säkerhet
- ↳ Komponenter, moduler och plugin
- ↳ Mallar (templates) och design
- ↳ Översättning
- ↳ Webbplatser gjorda i Joomla
- ↳ Webbplatser J! 3.x
- ↳ Webbplatser J! 2.5
- ↳ Webbplatser Joomla! 1.7 / Joomla! 1.6
- ↳ Webbplatser J! 1.5
- ↳ Webbplatser J! 1.0
- ↳ Kommersiell hjälp önskas
- ↳ Diverse (off topic)
- ↳ Tamil Forum
- ↳ Thai Forum
- ↳ โชว์เว็บไซต์ของคุณที่สร้างด้วยจูมล่า
- ↳ เคล็ดลับการใช้งานส่วนต่างๆ เกี่ยวกับจ&#
- ↳ คอมโพเน้นท์ โมดูล ปลักอิน ต่างๆ ที่ติดตั
- ↳ อับเดดข่าวสารเกี่ยวกับจูมล่าลายไทย
- ↳ Turkish Forum
- ↳ Duyurular
- ↳ Dersler
- ↳ Genel Sorular
- ↳ Bileşen, Modül, Bot
- ↳ Eklenti Haberleri
- ↳ Temalar
- ↳ Vietnamese Forum
- ↳ Gặp gỡ và giao lưu
- ↳ Joomla Tiếng Việt
- ↳ Cài đặt — Cấu hình
- ↳ Thành phần mở rộng cho Joomla!
- ↳ Hỏi đáp Joomla! 3.x
- ↳ Hỏi đáp Joomla! 2.5
- ↳ Hỗ trợ kỹ thuật
- ↳ Bài viết cũ
- ↳ Thiết kế Template
- ↳ Joomla! 1.5
- ↳ Hỏi đáp Joomla! 4.x
- ↳ Welsh Forum
- Other Forums
- ↳ Open Source Products for Joomla!
- ↳ The Lounge
- ↳ Forum Post Assistant (FPA)
- Joomla! Development Forums
- Joomla! Official Sites & Infrastructure
- ↳ docs.joomla.org — Feedback/Information
- ↳ extensions.joomla.org — Feedback/Information
- ↳ joomla.com — Feedback/Information
- ↳ Sites & Infrastructure — Feedback/Information
- ↳ Archived Boards — All boards closed
- ↳ Design and Accessibility — Archived
- ↳ Quality and Testing — Locked and Archived
- ↳ Joomla! 1.0.x_Q&T
- ↳ Q&T 1.0.x Resolved
- ↳ Known Issues
- ↳ Superseded Issues
- ↳ Archive
- ↳ Q&T 1.0.x Resolved — Archived
- ↳ Known Issues — Archive
- ↳ Superseded Issues — Archive
- ↳ Joomla! 3.x Bug Reporting
- ↳ Third Party Testing for Joomla! 1.5
- ↳ Q&T 1.5.x Resolved
- ↳ Joomla! 1.5 BETA
- ↳ Joomla! 1.5 BETA 2
- ↳ Reaction to the ‘Letter to the community’
- ↳ Reaction to New Project Name
- ↳ Logo Competition
- ↳ Humor, Fun and Games
- ↳ Libraries
- ↳ patTemplate
- ↳ com_connector — Multi Joomla Bridge
- ↳ CiviCRM Support
- ↳ CiviCRM Installation Issues
- ↳ FAQ Archive
- ↳ FAQ Discussion Board
- ↳ 3rd Party Extensions FAQ
- ↳ FAQs not moved
- ↳ 3rd Party/Non Joomla! Security FAQ
- ↳ Joomla! Coding 101
- ↳ Joombie Tools of the Trade
- ↳ Joombie Coding Q/A
- ↳ Joombie Think Tank
- ↳ Joombie Developer Lab
- ↳ Joomla Forge — Archived
- ↳ Non-Profit Organizations and Joomla!
- ↳ Schools and Universities
- ↳ Bangsamoro Forum
- ↳ Joomla! 1.5 Template Contest
- ↳ SMF — Simplemachines.org Forum
- ↳ GPL Discussion
- ↳ Security Announcements — Old
- ↳ Tips & Tricks — Moving
- ↳ Submit Your Suggested Tips & Tricks to Docs.joomla.org now please.
- ↳ Google Summer of Code and GHOP
- ↳ Google Summer of Code 2008
- ↳ Proposed projects
- ↳ Student area
- ↳ Past Google Summer of Code Editions
- ↳ Google’s Highly Open Participation Contest
- ↳ Documentation
- ↳ Suggestions, Modifications, and Corrections
- ↳ Archive
- ↳ 1.5 Archive
- ↳ Suggestions, Modifications & Corrections
- ↳ Submit
- ↳ Feedback and Suggestions
- ↳ Applications for participation in the Development Workgroup
- ↳ Development
- ↳ 1.5 Site Showcase — Archived
- ↳ 1.0 x Site Showcase — Archived.
- ↳ Feature Requests — White Papers — Archived
- ↳ Under Review — Archived
- ↳ Accepted — Archived
- ↳ Not Accepted — Archived
- ↳ Wishlists and Feature Requests — Archive
- ↳ Wishlist Archives — Archived
- ↳ Spanish Forum — Archive
- ↳ Papelera
- ↳ Tutoriales
- ↳ General
- ↳ Salón de la Joomlaesfera hispanohablante
- ↳ Danish Forum — Archive
- ↳ Diskussion af Meddelelser + Sikkerhedsmeddelelser + FAQ
- ↳ Shop.Joomla.org
- ↳ Joomla! 1.6 RC Support [closed]
- ↳ Joomla! 1.0 Coding
- ↳ Core Hacks and Patches
- ↳ Joomla! 2.5 Beta Support
- ↳ People.joomla.org — Feedback/Information
- ↳ Joomla! 1.5 Bug Reporting
- ↳ Joomla! 1.5 Coding
- ↳ Joomla! 3 Beta Support
- ↳ Trending Topics
- ↳ Help wanted in the community
- ↳ templates.joomla.org — Feedback/Information
- ↳ Certification
- ↳ Albanian Forum
- ↳ Azeri Forum
- ↳ Urdu Forum
- ↳ Basque Forum
- ↳ Itzulpenaren inguruan
- ↳ Laguntza teknikoa
- ↳ Belarusian Forum
- ↳ Maltese Forum
- ↳ Hungarian Forum
- ↳ Slovenian Forum
- ↳ Japanese Forum
- ↳ Khmer Forum
- ↳ ពិពណ៌ស្ថានបណ្ដាញជុំឡា
- ↳ ជុំឡាខ្មែរមូលដ្ឋានីយកម្ម
- ↳ Community Blog Discussions
- ↳ JoomlaCode.org
- ↳ Joomla! Marketing and PR Team
- ↳ resources.joomla.org — Feedback/Information
- ↳ Training.Joomla.org
- ↳ OpenSourceMatters.org
- ↳ magazine.joomla.org — Feedback/Information
- ↳ Site Showcase
- ↳ Joomla! 4 Related
- ↳ Joomla! Events
- ↳ Joomla! Ideas Forum
- ↳ Registered Joomla! User Groups
- ↳ Joomla! 2.5 Coding
- ↳ Joomla! 2.5 Bug Reporting
- ↳ User eXperience (UX)
- ↳ Joomla! Working Groups
- ↳ Translations
Содержание
- Cannot run composer install due to PHP Fatal error (Undefined class constant ‘PRE_COMMAND_RUN’) #27867
- Comments
- Preconditions (*)
- Steps to reproduce (*)
- Expected result (*)
- Actual result (*)
- Undefined class constant COLOR_DEFAULT #1724
- Comments
- Fatal error
- Fatal error uncaught error undefined class constant
- User Contributed Notes 18 notes
- Fatal error uncaught error undefined class constant
- User Contributed Notes 18 notes
Cannot run composer install due to PHP Fatal error (Undefined class constant ‘PRE_COMMAND_RUN’) #27867
I cannot run composer install in a fresh 2.4-develop branch.
Preconditions (*)
- Ubuntu 18.04
- PHP 7.2.29
- Composer 1.6.3
Steps to reproduce (*)
- git checkout 2.4-branch
- composer install
Expected result (*)
- I expect the composer to install all dependencies
Actual result (*)
- I got a fatal error as shown here:
The text was updated successfully, but these errors were encountered:
Hi @bnymn. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance — upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
@bnymn do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Источник
Undefined class constant COLOR_DEFAULT #1724
Not sure when this started, but every time I try to run phpunit I get this error message
Fatal error: Undefined class constant ‘COLOR_DEFAULT’ in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 900
When I run phpunit —colors it works.
I’m on fedora and I have installed phpunit with yum install php-phpunit-PHPUnit
The text was updated successfully, but these errors were encountered:
Please provide the output of phpunit —version and yum info php-phpunit-PHPUnit .
phpunit —version
PHPUnit 4.6.5 by Sebastian Bergmann and contributors.
yum info php-phpunit-PHPUnit
Loaded plugins: langpacks
Installed Packages
Name : php-phpunit-PHPUnit
Arch : noarch
Version : 4.6.5
Release : 1.fc21
Size : 750 k
Repo : installed
From repo : updates
Summary : The PHP Unit Testing framework
URL : https://github.com/sebastianbergmann/phpunit
License : BSD
Description : PHPUnit is a family of PEAR packages that supports the development of
: object-oriented PHP applications using the concepts and methods of Agile
: Software Development, Extreme Programming, Test-Driven Development and
: Design-by-Contract Development by providing an elegant and robust framework
: for the creation, execution and analysis of Unit Tests.
I cannot reproduce this with «vanilla» PHPUnit 4.6.5. And as you can see below, the constant is declared:
As far as I know, @remicollet does not patch PHPUnit for Fedora in any way that would explain this.
@sebastianbergmann I confirm, no patch in fedora (except autoloader stuff).
Such strange issues (like this one) can happens when you have 2 versions of PHPunit
- one in system
- one in current project (probably an old one)
So, when you want ro tun unit test from a composer project which have «require-dev: phpunit» you need to run «vendor/bin/phpunit»
@donalddw can you please check if you are in this case.
Probably I should add a check in the launcher to check such case.
@remicollet This seems to have been the problem. Thank you!
The version installed in vendor was 4.3.5
Источник
Fatal error
Fatal error: Uncaught Error: Undefined class constant ‘ICONS’ in /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementskit-lite/widgets/icon-box/icon-box.php:98 Stack trace: #0 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/base/controls-stack.php(1916): ElementorElementsKit_Widget_Icon_Box->_register_controls() #1 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/base/controls-stack.php(485): ElementorControls_Stack->init_controls() #2 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/base/widget-base.php(160): ElementorControls_Stack->get_stack() #3 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/base/controls-stack.php(278): ElementorWidget_Base->get_stack() #4 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/base/controls-stack.php(1951): ElementorControls_Stack->get_controls() #5 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/base/c in /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementskit-lite/widgets/icon-box/icon-box.php on line 98
There has been a critical error on your website.
Learn more about debugging in WordPress.
The page I need help with: [log in to see the link]
I’m really sorry that you’re facing a fatal error on your website. But the error message indicating that it’s coming from ElementsKit plugin. Please check this out: https://d.pr/i/oNwVuW
So I would request you to contact ElementsKit plugin support to get it resolve.
Fatal error: Uncaught Error: Call to a member function get_main_post() on boolean in /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/core/kits/manager.php:113 Stack trace: #0 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/core/kits/manager.php(87): ElementorCoreKitsManager->get_kit_for_frontend() #1 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-includes/class-wp-hook.php(287): ElementorCoreKitsManager->frontend_before_enqueue_styles(”) #2 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #3 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/includes/frontend.php(596): do_action(‘elementor/front…’) #5 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-includes/class-wp-hook.php(287): ElementorFrontend->enqueue_styles(”) #6 /home/dwfyp6jrjkmh/public_html/EPH2020/wp-includes/class-wp-hook.php(311): WP_Hook->apply_fil in /home/dwfyp6jrjkmh/public_html/EPH2020/wp-content/plugins/elementor/core/kits/manager.php on line 113
There has been a critical error on this website.
Learn more about debugging in WordPress.
Seems like your Elementor version isn’t updated to the latest version. Please make sure you’re using the latest version of Elementor and check back again.
If the issue still persists, please contact with ElementsKit plugin support to get it resolve, since it’s not related to Essential addons for Elementor.
Источник
Fatal error uncaught error undefined class constant
It is possible to define constants on a per-class basis remaining the same and unchangeable. The default visibility of class constants is public .
Class constants can be redefined by a child class. As of PHP 8.1.0, class constants cannot be redefined by a child class if it is defined as final.
It’s also possible for interfaces to have constants . Look at the interface documentation for examples.
It’s possible to reference the class using a variable. The variable’s value can not be a keyword (e.g. self , parent and static ).
Note that class constants are allocated once per class, and not for each class instance.
Example #1 Defining and using a constant
class MyClass
<
const CONSTANT = ‘constant value’ ;
function showConstant () <
echo self :: CONSTANT . «n» ;
>
>
echo MyClass :: CONSTANT . «n» ;
$classname = «MyClass» ;
echo $classname :: CONSTANT . «n» ;
$class = new MyClass ();
$class -> showConstant ();
echo $class :: CONSTANT . «n» ;
?>
The special ::class constant allows for fully qualified class name resolution at compile time, this is useful for namespaced classes:
Example #2 Namespaced ::class example
namespace foo <
class bar <
>
echo bar ::class; // foobar
>
?>
Example #3 Class constant expression example
Example #4 Class constant visibility modifiers, as of PHP 7.1.0
Output of the above example in PHP 7.1:
As of PHP 7.1.0 visibility modifiers are allowed for class constants.
User Contributed Notes 18 notes
it’s possible to declare constant in base class, and override it in child, and access to correct value of the const from the static method is possible by ‘get_called_class’ method:
abstract class dbObject
<
const TABLE_NAME = ‘undefined’ ;
public static function GetAll ()
<
$c = get_called_class ();
return «SELECT * FROM `» . $c :: TABLE_NAME . «`» ;
>
>
class dbPerson extends dbObject
<
const TABLE_NAME = ‘persons’ ;
>
class dbAdmin extends dbPerson
<
const TABLE_NAME = ‘admins’ ;
>
echo dbPerson :: GetAll (). «
» ; //output: «SELECT * FROM `persons`»
echo dbAdmin :: GetAll (). «
» ; //output: «SELECT * FROM `admins`»
As of PHP 5.6 you can finally define constant using math expressions, like this one:
class MyTimer <
const SEC_PER_DAY = 60 * 60 * 24 ;
>
Most people miss the point in declaring constants and confuse then things by trying to declare things like functions or arrays as constants. What happens next is to try things that are more complicated then necessary and sometimes lead to bad coding practices. Let me explain.
A constant is a name for a value (but it’s NOT a variable), that usually will be replaced in the code while it gets COMPILED and NOT at runtime.
So returned values from functions can’t be used, because they will return a value only at runtime.
Arrays can’t be used, because they are data structures that exist at runtime.
One main purpose of declaring a constant is usually using a value in your code, that you can replace easily in one place without looking for all the occurences. Another is, to avoid mistakes.
Think about some examples written by some before me:
1. const MY_ARR = «return array(»A», »B», »C», »D»);»;
It was said, this would declare an array that can be used with eval. WRONG! This is just a string as constant, NOT an array. Does it make sense if it would be possible to declare an array as constant? Probably not. Instead declare the values of the array as constants and make an array variable.
2. const magic_quotes = (bool)get_magic_quotes_gpc();
This can’t work, of course. And it doesn’t make sense either. The function already returns the value, there is no purpose in declaring a constant for the same thing.
3. Someone spoke about «dynamic» assignments to constants. What? There are no dynamic assignments to constants, runtime assignments work _only_ with variables. Let’s take the proposed example:
/**
* Constants that deal only with the database
*/
class DbConstant extends aClassConstant <
protected $host = ‘localhost’ ;
protected $user = ‘user’ ;
protected $password = ‘pass’ ;
protected $database = ‘db’ ;
protected $time ;
function __construct () <
$this -> time = time () + 1 ; // dynamic assignment
>
>
?>
Those aren’t constants, those are properties of the class. Something like «this->time = time()» would even totally defy the purpose of a constant. Constants are supposed to be just that, constant values, on every execution. They are not supposed to change every time a script runs or a class is instantiated.
Conclusion: Don’t try to reinvent constants as variables. If constants don’t work, just use variables. Then you don’t need to reinvent methods to achieve things for what is already there.
I think it’s useful if we draw some attention to late static binding here:
class A <
const MY_CONST = false ;
public function my_const_self () <
return self :: MY_CONST ;
>
public function my_const_static () <
return static:: MY_CONST ;
>
>
class B extends A <
const MY_CONST = true ;
>
$b = new B ();
echo $b -> my_const_self ? ‘yes’ : ‘no’ ; // output: no
echo $b -> my_const_static ? ‘yes’ : ‘no’ ; // output: yes
?>
const can also be used directly in namespaces, a feature never explicitly stated in the documentation.
# foo.php
namespace Foo ;
const BAR = 1 ;
?>
# bar.php
require ‘foo.php’ ;
var_dump ( Foo BAR ); // => int(1)
?>
Hi, i would like to point out difference between self::CONST and $this::CONST with extended class.
Let us have class a:
class a <
const CONST_INT = 10 ;
public function getSelf () <
return self :: CONST_INT ;
>
public function getThis () <
return $this :: CONST_INT ;
>
>
?>
And class b (which extends a)
class b extends a <
const CONST_INT = 20 ;
public function getSelf () <
return parent :: getSelf ();
>
public function getThis () <
return parent :: getThis ();
>
>
?>
Both classes have same named constant CONST_INT.
When child call method in parent class, there is different output between self and $this usage.
print_r ( $b -> getSelf ()); //10
print_r ( $b -> getThis ()); //20
Источник
Fatal error uncaught error undefined class constant
Константы также могут быть объявлены в пределах одного класса. Область видимости констант по умолчанию public .
Константы класса могут быть переопределены дочерним классом. Начиная с PHP 8.1.0, константы класса не могут быть переопределены дочерним классом, если он определён как окончательный (final).
Интерфейсы также могут содержать константы . За примерами обращайтесь к разделу об интерфейсах.
К классу можно обратиться с помощью переменной. Значение переменной не может быть ключевым словом (например, self , parent и static ).
Обратите внимание, что константы класса задаются один раз для всего класса, а не отдельно для каждого созданного объекта этого класса.
Пример #1 Объявление и использование константы
class MyClass
<
const CONSTANT = ‘значение константы’ ;
function showConstant () <
echo self :: CONSTANT . «n» ;
>
>
echo MyClass :: CONSTANT . «n» ;
$classname = «MyClass» ;
echo $classname :: CONSTANT . «n» ;
$class = new MyClass ();
$class -> showConstant ();
echo $class :: CONSTANT . «n» ;
?>
Специальная константа ::class , которой на этапе компиляции присваивается полное имя класса, полезна при использовании с классами, использующими пространства имён.
Пример #2 Пример использования ::class с пространством имён
namespace foo <
class bar <
>
echo bar ::class; // foobar
>
?>
Пример #3 Пример констант, заданных выражением
class foo <
const TWO = ONE * 2 ;
const THREE = ONE + self :: TWO ;
const SENTENCE = ‘Значение константы THREE — ‘ . self :: THREE ;
>
?>
Пример #4 Модификаторы видимости констант класса, начиная с PHP 7.1.0
Результат выполнения данного примера в PHP 7.1:
Начиная с PHP 7.1.0 для констант класса можно использовать модификаторы области видимости.
User Contributed Notes 18 notes
it’s possible to declare constant in base class, and override it in child, and access to correct value of the const from the static method is possible by ‘get_called_class’ method:
abstract class dbObject
<
const TABLE_NAME = ‘undefined’ ;
public static function GetAll ()
<
$c = get_called_class ();
return «SELECT * FROM `» . $c :: TABLE_NAME . «`» ;
>
>
class dbPerson extends dbObject
<
const TABLE_NAME = ‘persons’ ;
>
class dbAdmin extends dbPerson
<
const TABLE_NAME = ‘admins’ ;
>
echo dbPerson :: GetAll (). «
» ; //output: «SELECT * FROM `persons`»
echo dbAdmin :: GetAll (). «
» ; //output: «SELECT * FROM `admins`»
As of PHP 5.6 you can finally define constant using math expressions, like this one:
class MyTimer <
const SEC_PER_DAY = 60 * 60 * 24 ;
>
Most people miss the point in declaring constants and confuse then things by trying to declare things like functions or arrays as constants. What happens next is to try things that are more complicated then necessary and sometimes lead to bad coding practices. Let me explain.
A constant is a name for a value (but it’s NOT a variable), that usually will be replaced in the code while it gets COMPILED and NOT at runtime.
So returned values from functions can’t be used, because they will return a value only at runtime.
Arrays can’t be used, because they are data structures that exist at runtime.
One main purpose of declaring a constant is usually using a value in your code, that you can replace easily in one place without looking for all the occurences. Another is, to avoid mistakes.
Think about some examples written by some before me:
1. const MY_ARR = «return array(»A», »B», »C», »D»);»;
It was said, this would declare an array that can be used with eval. WRONG! This is just a string as constant, NOT an array. Does it make sense if it would be possible to declare an array as constant? Probably not. Instead declare the values of the array as constants and make an array variable.
2. const magic_quotes = (bool)get_magic_quotes_gpc();
This can’t work, of course. And it doesn’t make sense either. The function already returns the value, there is no purpose in declaring a constant for the same thing.
3. Someone spoke about «dynamic» assignments to constants. What? There are no dynamic assignments to constants, runtime assignments work _only_ with variables. Let’s take the proposed example:
/**
* Constants that deal only with the database
*/
class DbConstant extends aClassConstant <
protected $host = ‘localhost’ ;
protected $user = ‘user’ ;
protected $password = ‘pass’ ;
protected $database = ‘db’ ;
protected $time ;
function __construct () <
$this -> time = time () + 1 ; // dynamic assignment
>
>
?>
Those aren’t constants, those are properties of the class. Something like «this->time = time()» would even totally defy the purpose of a constant. Constants are supposed to be just that, constant values, on every execution. They are not supposed to change every time a script runs or a class is instantiated.
Conclusion: Don’t try to reinvent constants as variables. If constants don’t work, just use variables. Then you don’t need to reinvent methods to achieve things for what is already there.
I think it’s useful if we draw some attention to late static binding here:
class A <
const MY_CONST = false ;
public function my_const_self () <
return self :: MY_CONST ;
>
public function my_const_static () <
return static:: MY_CONST ;
>
>
class B extends A <
const MY_CONST = true ;
>
$b = new B ();
echo $b -> my_const_self ? ‘yes’ : ‘no’ ; // output: no
echo $b -> my_const_static ? ‘yes’ : ‘no’ ; // output: yes
?>
const can also be used directly in namespaces, a feature never explicitly stated in the documentation.
# foo.php
namespace Foo ;
const BAR = 1 ;
?>
# bar.php
require ‘foo.php’ ;
var_dump ( Foo BAR ); // => int(1)
?>
Hi, i would like to point out difference between self::CONST and $this::CONST with extended class.
Let us have class a:
class a <
const CONST_INT = 10 ;
public function getSelf () <
return self :: CONST_INT ;
>
public function getThis () <
return $this :: CONST_INT ;
>
>
?>
And class b (which extends a)
class b extends a <
const CONST_INT = 20 ;
public function getSelf () <
return parent :: getSelf ();
>
public function getThis () <
return parent :: getThis ();
>
>
?>
Both classes have same named constant CONST_INT.
When child call method in parent class, there is different output between self and $this usage.
print_r ( $b -> getSelf ()); //10
print_r ( $b -> getThis ()); //20
Источник
Since applying some updates to the server this morning, running certain wp cli commands returns a PHP Fatal Error.
An example would be…
wp cache flush
This worked yesterday, but now I get…
PHP Fatal error: Uncaught Error: Undefined constant "WP_CONTENT_DIR" in /sites/www.mywebsite.com/files/wp-includes/load.php:115
Stack trace:
#0 /sites/www.mywebsite.com/files/wp-settings.php(37): wp_check_php_mysql_versions()
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): require('...')
#2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1158): WP_CLIRunner->load_wordpress()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLIRunner->start()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(74): WP_CLIBootstrapLaunchRunner->process()
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLIbootstrap()
#6 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('...')
#7 /usr/local/bin/wp(4): include('...')
#8 {main}
thrown in /sites/www.mywebsite.com/files/wp-includes/load.php on line 115
The code it references is the 2nd IF statement, in the following function…
function wp_check_php_mysql_versions() {
global $required_php_version, $wp_version;
$php_version = phpversion();
if ( version_compare( $required_php_version, $php_version, '>' ) ) {
$protocol = wp_get_server_protocol();
header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
header( 'Content-Type: text/html; charset=utf-8' );
printf( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.', $php_version, $wp_version, $required_php_version );
exit( 1 );
}
if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! extension_loaded( 'mysqlnd' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
require_once ABSPATH . WPINC . '/functions.php';
wp_load_translations_early();
$args = array(
'exit' => false,
'code' => 'mysql_not_found',
);
wp_die(
__( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ),
__( 'Requirements Not Met' ),
$args
);
exit( 1 );
}
}
I can see that it’s checking php and mysql versions and having ran updates today, these may well have changed, which is why I’m getting the issue.
I’ve got WordPress set to log errors and it’s logging other errors successfully, such as if I break the db connection info temporarily. The error messages in the function above don’t appear to be getting displayed anywhere. I’d like to think that if «Your PHP installation appears to be missing the MySQL extension which is required by WordPress.» was true, I’d be having much bigger issues than just wp cli commands not running.
It looks to me like the WordPress function isn’t finding what it needs on the server, but that’s about as far as my knowledge goes.
Would it be wishful thinking to hope more updates will be released tomorrow, which once installed, will make this issue go away?
I’m using mariadb, so for a newbie like me, it’s adding extra confusion when the issue appears to be related to php and mysql version.
The issue is occurring on Ubuntu 18.04 and 20.04, with both PHP 7.3 and 7.4.
Any guidance would be greatly appreciated.
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Backup restoration / Patchwork error localhost
Hello everybody,
Happy new year to all of you.
I’ve been trying to recover some content from a phpboard by running it on a local server.
I have followed the following document to install and run an server through XAMPP:
https://www.phpbb.com/support/docs/en/3 … eb-server/
I did put the forum backup in htdocs, however when loading the forum through my browser I get the following error message:
Fatal error: Uncaught Error: Undefined constant «PatchworkUtf8MB_OVERLOAD_STRING» in C:xampphtdocsforumvendorpatchworkutf8srcPatchworkUtf8Bootup.php:45 Stack trace: #0 C:xampphtdocsforumincludesutfutf_tools.php(28): PatchworkUtf8Bootup::initMbstring() #1 C:xampphtdocsforumcommon.php(97): require(‘C:\xampp\htdocs…’) #2 C:xampphtdocsforumindex.php(23): include(‘C:\xampp\htdocs…’) #3 {main} thrown in C:xampphtdocsforumvendorpatchworkutf8srcPatchworkUtf8Bootup.php on line 45
I don’t know what it means and my very basics knowledge in IT does not really help. I’ve been scouring google results and don’t find anything very similar to my problem.
EDIT: I’m also not sure of the version of PHPbb its running so apologies if it’s not in the right forum.
Thanks a lot for your help.
-
EA117
- Registered User
- Posts: 2151
- Joined: Wed Aug 15, 2018 3:23 am
- Contact:
Re: Backup restoration / Patchwork error localhost
Post
by EA117 » Sun Jan 03, 2021 6:05 pm
It seems unusual to not know the phpBB version when setting up a local XAMPP server. It will be whatever version you downloaded and installed. But you can check the /docs/CHANGELOG.html file in the phpBB installation to see what version was used in creating the local installation of phpBB. The /style/prosilver/style.cfg file content will always declare the current phpBB version in a new installation, too.
Since I’m not aware of any other reason for MB_OVERLOAD_STRING to be undefined (since this isn’t «new to later versions of PHP» or similar), what seems most probable is that the «mbstring» extension in the XAMPP phpphp.ini configuration file is disabled.
But I don’t recall this ever being the default state of mbstring in a new XAMPP installation, at least up to and including XAMPP w/PHP 7.4.13. But regardless, have a look in the XAMPP phpphp.ini configuration file and look for whether extension=mbstring exists, or perhaps exists but is commented out with a leading semicolon.
There are other extensions typically required too, like mysqli, for proper operation. This is what the extension section looks like in my XAMPP 7.4.13 installation, for what it’s worth. Which I’m not saying is definitive or «exactly what every installation needs». It’s just a place to start if you find your extensions list is completely disabled and are unsure what else to enable.
Code: Select all
extension=bz2
extension=curl
;extension=ffi
;extension=ftp
extension=fileinfo
extension=gd2
extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 6:30 pm
Thanks for the tips for the version.
In the changelog file, the latest change I have is 3.2.0-RC1.
EDIT: in style.cfg I have phpbb 3.3.2 So I’m not sure which one is correct.
In php.ini, extension=mbstring was enabled
I checked the list you provided and all matched except extension=gd2 which I added there was also a ;extension=gd which I left.
After doing that no changes.
-
EA117
- Registered User
- Posts: 2151
- Joined: Wed Aug 15, 2018 3:23 am
- Contact:
Re: Backup restoration / Patchwork error localhost
Post
by EA117 » Sun Jan 03, 2021 7:42 pm
TRUE211 wrote: ↑Sun Jan 03, 2021 6:30 pm
In the changelog file, the latest change I have is 3.2.0-RC1.EDIT: in style.cfg I have phpbb 3.3.2 So I’m not sure which one is correct.
Since mbstring was already enabled, for the moment we’re assuming that the PHP error cited earlier has something to do with older or mis-matched files in the /vendor folder. Since phpBB 3.2.0 files were present, presumably those are restored files from the backup, and your old board was phpBB 3.2.0. And the phpBB 3.3.2 files were from downloading the current phpBB version available here on phpbb.com.
There are at least two ways to go here:
You can install under XAMPP using phpBB 3.2.0, presuming that’s what your original board was. Advantages of installing with the same phpBB version your backup was using is that any active extensions the board had enabled will still be compatible when your board «wakes up under XAMPP». But you do have to use a XAMPP with a PHP version compatible with this older phpBB version; such as PHP 7.1.x for phpBB 3.2.0, for example.
Or you can use phpBB 3.3.2 and a current PHP 7.4.x version of XAMPP, and essentially use the upgrade process after having restored the database from backup, and after having restored just the files and folders listed in Step 10 from your backup. The challenges here are the same as with any upgrade, where incompatible extensions could keep the board from working under the latest phpBB version. But in your case you won’t have access to the phpBB ACP «before upgrading» in order to disable or uninstall those extensions.
With either approach, although you start with your restored config.php to ensure you have the correct table prefix configuration, you have to then update that config.php with the local database server address and port, as well as the database name, user and password, as created during the «MySQL User & Database Setup» section of https://www.phpbb.com/support/docs/en/3 … eb-server/. Since the existing settings in the restored config.php of the old site are unlikely to be correct for the new local XAMPP installation.
What version of XAMPP did you already download and install, so that folks will know what the compatibility window is between the version of XAMPP & PHP you currently have installed, relative to the available phpBB versions.
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 8:36 pm
Thanks for your reply.
I think it might be a mismatch between version since at the beginning I did not know which version my board was.
I downloaded the latest version of XAMPP (8.0.0);
I think I will try to use the first method, match the version of XAMPP and phpbb to the original board because looking at my downlaod list the phpBB I used was 3.3.2 which is I believe why we have that version in style.cfg
So just to be sure, does XAMPP and phpbb have to be both the right version or can phpbb only be the right one ? The requirements for 3.2 says that it needs: PHP 5.4.7+ with support for the database you intend to use
I’m thinking to start from scratch with XAMPP if it requires an older version, too afraid I’ll gloss over a detail.
-
EA117
- Registered User
- Posts: 2151
- Joined: Wed Aug 15, 2018 3:23 am
- Contact:
Re: Backup restoration / Patchwork error localhost
Post
by EA117 » Sun Jan 03, 2021 9:32 pm
TRUE211 wrote: ↑Sun Jan 03, 2021 8:36 pm
So just to be sure, does XAMPP and phpbb have to be both the right version or can phpbb only be the right one ? The requirements for 3.2 says that it needs:PHP 5.4.7+ with support for the database you intend to use
I’m thinking to start from scratch with XAMPP if it requires an older version, too afraid I’ll gloss over a detail.
Indeed, each phpBB version has a particular «range» it’s known to be compatible with. Unfortunately the phpBB statement such as the one you quoted was written back before future PHP versions were released, and future PHP version compatibility issues surfaced.
phpBB 3.2.0, specifically, would have been compatible with PHP 5.x through PHP 7.1.x.
PHP 7.2.x would have shown issues with phpBB 3.2.0, and wasn’t supported until after phpBB 3.2.4 if I recall correctly.
PHP 7.3.x was not supported by phpBB 3.2.x, and could show issues with any phpBB 3.2.x version.
phpBB 3.3.x requires phpBB 7.1.3 or later, and supports up though current PHP 7.4.x.
PHP 8.x was only recently released, and there are known issues even with the latest phpBB 3.3.2.
So PHP 7.1.33 (last PHP 7.1.x version of XAMPP offerred) would be recommended if you’re restoring a phpBB 3.2.0 board and wanting to initially run phpBB 3.2.0. This would also be a sufficient minimum PHP version for upgrading to phpBB 3.3.2 later, if or when that’s necessary for whatever the goal of your restoration might be.
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 9:52 pm
Yes I made progress thanks to your message. I’m no longer getting the initial error message. I installed XAMPP 7.1.4.
However now I’m facing another issue regarding the database.
General Error
SQL ERROR [ mysqli ]Access denied for user ‘user’@’localhost’ (using password: YES) [1045]
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
In localhost/phpmyadmin, I made sure to create database and everything with new username and changed it in the config.php (which by the way says PHPBB 3.0.x )
I’m having a hard time understanding where the database should be uploaded (the.sql file) I’m trying to apply the method found here:
https://www.phpbb.com/support/docs/en/3 … or-domain/
But I’m blocked with Bigdump. Is this step necessary or can I just put the .sql file somewhere in htdocs ?
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 10:12 pm
janus_zonstraal wrote: ↑Sun Jan 03, 2021 10:07 pm
On localhost it doesn’t matter where you put the database file.
Just go tolocalhost/phpmyadminimport database and point to the database file
I did try it, however through the phpmyadmin it fails. The file is almost 30 MB, that is why I was looking into the bigdump solution.
EDIT: I manages to bypass this by increasing max file size limit.
Now I’m getting this after the import
Error
SQL query:
DROP TABLE IF EXISTS `phpbb_acl_groups`
MySQL said: Documentation
#1046 — No database selected
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 10:28 pm
Ok I’m dumb. I did manage to upload the database. It’s just that no server were selected.
But now I’m back to
General Error
SQL ERROR [ mysqli ]Access denied for user ‘user’@’localhost’ (using password: YES) [1045]
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
I double checked the config.php and all seems correct to me.
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 10:40 pm
I tried it again with a new user and database, no dice:
Here are the info you require.
Config.php:
Code: Select all
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'test';
$dbuser = 'test';
$dbpasswd = 'test';
$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';
@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
Code: Select all
GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' IDENTIFIED BY PASSWORD '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'%';
GRANT ALL PRIVILEGES ON `test_%`.* TO 'test'@'%';
-
TRUE211
- Registered User
- Posts: 10
- Joined: Sun Jan 03, 2021 5:00 pm
Re: Backup restoration / Patchwork error localhost
Post
by TRUE211 » Sun Jan 03, 2021 10:50 pm
Yep, I do believe so. This is with all what I gave you before.
SQL ERROR [ mysqli ]
Access denied for user ‘test’@’localhost’ (using password: YES) [1045]
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.





