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]> |
-- I've never got nginx working, but i don't understand why you would use both nginx and apache? -- Several reasons:1. Load balancing and performance improvement - that's why ngins is in front (plus eg can serve images etc. statically from separate caches - I need to check if that gives performance improvement)2. And/or To prevent making dead my other hosted websites for hours (and sometimes days if i am not carefull eg with mysql settings) on the same VPS when my experimental development (eg socnets) goes south...3. And that's why I started using FASTPANEL which is a fantastic tool for the above purposes and it has already integrated control for both servers with easy website control and much more. --$_SERVER['HTTPS'] thing - is that set for you? (and set to "off"?) If so, you should set $prefs['session_protected'] to "n" (also off)-- 1. I had not set up https on the server before installing tiki. It always worked for me with apache only. And it worked with apache only and with different mysql version on this new host.2. $prefs['session_protected'] I did not know it existed and I was not able neither to install a new tiki on a new host nor to have a look at it by starting tiki with a cloned database.3. What can be done with those lines of code I included? P.S. FASTPANEL have one click installation button of wordpress, btw. I want to offer them Tiki, as well. But the installer should work normally, first. Thanks,Aris On Monday, 19 July 2021, 12:11:22 EEST, Jonny Bradley <[email protected]> wrote: Well done Aris - sounds like fun! :p I've never got nginx working, but i don't understand why you would use both nginx and apache? Fabio probably knows though! :) Re the $_SERVER['HTTPS'] thing - is that set for you? (and set to "off"?) If so, you should set $prefs['session_protected'] to "n" (also off) jonny > On 18 Jul 2021, at 20:36, aris002 via TikiWiki-devel <[email protected]> wrote: > > At last... got cloned Tiki database working on a deadly combination of nginx front-apache back server at Ubuntu 20.04 with mysql 8.0.25 community server! > Still need to check tiki user creation and database tables population possibilities. > Maybe it will be useful for others. > One of the several things after somehow solving mysql users privileges ( not root user, password instead of caching sha , host % instead of localhost, and grants with grants). > But these 5 lines in tiki-setup_base.php where the main killers. They killed nearly one month of my life in total in an endless loops. After concentrating on this Error: "Too many redirects".. I found the main culprit. :) > > How to debug or/and to improve instead of commenting them out? Does anyone use nginx front-apache back server combination? > Change server settings? > This supposed to be for microsoft server? > > // IIS always sets the $_SERVER['HTTPS'] value (on|off) > $noSSLActive = ! isset($_SERVER['HTTPS']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'off'); > if (isset($prefs['session_protected']) && $prefs['session_protected'] == 'y' && $noSSLActive && php_sapi_name() != 'cli') { > header("Location: https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"); > exit; > } > > Thanks, > 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 > _______________________________________________ TikiWiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel