Re: [Tiki-devel] Silent errors in installer - Is not declared $error is an error or not in installlib.php? and is this the reason not showing an error in a looping installer? etc.
aris002 via TikiWiki-devel <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Possible answer to Question 2.Now this works with web installer.It gives some good clues. Would it break console installer?
InstallerDatabaseErrorHandler.php
namespace Tiki\Installer;
use TikiDb;use TikiDb_ErrorHandler;use Feedback;
class InstallerDatabaseErrorHandler implements TikiDb_ErrorHandler{ /** * @param TikiDb $db * @param $query * @param $values * @param $result */ public function handle(TikiDb $db, $query, $values, $result) { $error_title = "InstallerDatabaseErrorHandler"; $error = var_export($db, true). '<br>'; $error = $error . var_export($query, true). '<br>'; $error = $error . var_export($values, true). '<br>';
$error = $error . var_export($result, true). '<br>'; Feedback::error( ['mes' => $error, 'title' => $error_title] );
}}
Aris
On Wednesday, 14 July 2021, 12:53:48 EEST, aris002 via TikiWiki-devel <[email protected]> wrote:
Hi devs,
For the last 21 days practically full time I have been strugling to make a smooth installation process of tikis (my socnets branch from a bit older master and new tiki-23.x - installer/tiki-install.php were completely different but the problems - the same) on ubuntu 20.04 with fastpanel (which is a very good tool except for its creepy version of mysql - caching sha paswords instead of normal... I guess, not letting installs for other users with too much privileges etc.) and nginx. I never had such headache with tiki on archlinux and apache nearly for the last 20 years... :) After changing a lot of mysql and user settings manually I succeeded once but can't repeat it now to make into tutorial or at least not unrepeateble random several hundred steps procedure...And after tiki success - fastpanel stopped working...So I had to reinstall a lot of mysql related items in a shitty ubuntish way with manual cleaning multiple items, repeat again multiple times and then, add insult to injury, - tiki headache started again despite mannualy created special tikiuser with all privileges.
Question 1.
Should $error be declared here or is it global or is created automagically:from /installer/installlib.php function createTikiDBUser(&$dbTiki, $host, $user, $pass, $dbname)
{ if (preg_match('/^(127\.0\.\d{1,3}\.\d{1,3}|localhost)(:\d+)?$/', $host)) { $host = 'localhost'; } else { $host = '%'; }
$pass = addslashes($pass); $sql = "GRANT ALL PRIVILEGES ON `$dbname`.* TO `$user`@`$host` IDENTIFIED BY '$pass';"; $dbTiki->queryError($sql, $error);
if (empty($error)) { Feedback::success(tra("User `%0` was created.", '', false, [$user])); } else { Feedback::error(tra("User `%0` creation failed.", '', false, [$user])); }
return empty($error);}
Question 2.
Is this error handler empty on purpose? When is it invoked? setup.sh or web? both?
class InstallerDatabaseErrorHandler implements TikiDb_ErrorHandler{ /** * @param TikiDb $db * @param $query * @param $values * @param $result */ public function handle(TikiDb $db, $query, $values, $result) { }}
Question 3.
Is it really the only way on Ubuntu to create a tiki user is manual way? why? when (versions)?
Question 4.
What are privileges and login plugin requirements for mysql in Ubuntu 20.04?Should or would be tiki installer be able to show them?
Question 5.
Don't you think that the installer should be more verbose in general about the reasons when failing?
Question 6.
Why there is no tiki installation log file?
Suggestion 7.
what if we Improve/Use my socnets class Util for logging if there is none in tiki?Other possibilities for easy and quick installer logging?
Thanks a lot in advance,Aris_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel