J4 Issue ?
avatar infograf768
infograf768
25 Feb 2018

Very much used to mysqli being proposed as first choice for the database type (as most Joomla users use that db type), I did not care about the field.

In fact the default field value is now MySQL (PDO).
screen shot 2018-02-25 at 10 45 14

It totally broke the installation here.

To get back mysqli as first choice, I had to modify the xml to set mysqli as first choice.

		<field
				name="db_type"
				type="databaseconnection"
				id="db_type"
				class="custom-select form-control"
				label="INSTL_DATABASE_TYPE_DESC"
				supported="mysql,mysqli,pgsql,postgresql"
				required="true"
				default="mysqli" /// Changed here
				filter="string"
		/>

No idea if this is the real solution to that issue as I am not sure about the supposed use of MySQL (PDO) although I read http://php.net/manual/en/ref.pdo-mysql.php

avatar infograf768 infograf768 - open - 25 Feb 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Feb 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Feb 2018
avatar infograf768
infograf768 - comment - 25 Feb 2018

Error log shows this

[25-Feb-2018 10:59:53 Europe/Berlin] PHP Warning:  Uncaught PDOException: SQLSTATE[HY000] [1049] Unknown database 'mysqlpdotest' in /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php:312
Stack trace:
#0 /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php(312): PDO->__construct('mysql:host=loca...', 'root', 'root', Array)
#1 /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php(124): Joomla\Database\Pdo\PdoDriver->connect()
#2 /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php(222): Joomla\Database\Mysql\MysqlDriver->connect()
#3 [internal function]: Joomla\Session\Handler\DatabaseHandler->open('/Applications/M...', 'f16b9fffa4b4d08...')
#4 /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/session/src/Storage/NativeStorage.php(454): session_start()
#5 /Applications/MAMP/htdocs/newfolder/joomla40/libraries/src/Session/Storage/JoomlaStorage.p in /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php on line 317
[25-Feb-2018 10:59:53 Europe/Berlin] PHP Fatal error:  session_start(): Failed to initialize storage module: user (path: /Applications/MAMP/tmp/php) in /Applications/MAMP/htdocs/newfolder/joomla40/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 454
avatar infograf768
infograf768 - comment - 25 Feb 2018

Looks like it is related to #19646

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Feb 2018
Build staging 4.0-dev
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Feb 2018
Category com_installer
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Feb 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-02-25 11:59:33
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 25 Feb 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 25 Feb 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Feb 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Feb 2018

closed as having Pull Request #19780

avatar infograf768
infograf768 - comment - 25 Feb 2018

i think this should be reopened as the default db proposed is also broken

avatar infograf768 infograf768 - change - 25 Feb 2018
Status Closed New
Closed_Date 2018-02-25 11:59:33
Closed_By joomla-cms-bot
avatar infograf768 infograf768 - reopen - 25 Feb 2018
avatar brianteeman
brianteeman - comment - 25 Feb 2018

I changed the default in #19780

avatar mbabker
mbabker - comment - 25 Feb 2018

@infograf768 Please do not randomly link unrelated issues, none of the items you linked has ANYTHING to do with what you are describing in this item.

avatar mbabker
mbabker - comment - 25 Feb 2018

default db proposed is also broken

No, it's not. The PDO driver works just fine and I have it in use on production sites. What is broken is you have something triggering a session in the scope of the install application trying to use the database handler which is impossible.

avatar infograf768
infograf768 - comment - 25 Feb 2018

@mbabker
what about the error i got. look at the first line above. i can read mysqlpdotest

avatar infograf768
infograf768 - comment - 25 Feb 2018

for me, again a cultural issue?, this shows as broken. i have no idea what is

avatar mbabker
mbabker - comment - 25 Feb 2018

The problem is not that it is trying to read the database. The problem is the session handler is trying to connect to the database. In the install application. When you do not have a configuration saved. And can't reliably connect to your database. That is unrelated to the order of options.

The installation application should always use the filesystem session handler.

As for this issue "PHP Fatal error: session_start(): Failed to initialize storage module: user (path: /Applications/MAMP/tmp/php)" this implies that the MAMP temp directory doesn't have suitable read/write permissions. efc468a might fix that by making the configuration try to use the PHP runtime configuration instead of completely ignoring it, no promises on that one though.

As for what PDO is, it's basically another database connector built in C as an extension of PHP itself. Similar to how there are different extensions for legacy MySQL, MySQLi, and PostgreSQL. PDO tries to act as an abstraction layer (similar to what our database API does) and allows connections to different database engines. In 4.0 we explicitly support both MySQL and PostgreSQL connections either through the native PHP extensions (ext/mysqli or ext/pgsql) or the PDO abstraction layer. The only thing that really changes at our level is what internal PHP code is executed.

avatar infograf768 infograf768 - change - 26 Feb 2018
Title
[4.0] Installation proposing MySQL (PDO) as first choice prevents installing Joomla
[4.0] Installation proposing MySQL (PDO) as first choice prevents installing Joomla. Choosing this db type does not create the db.
avatar infograf768 infograf768 - edited - 26 Feb 2018
avatar infograf768
infograf768 - comment - 26 Feb 2018

I modified the title of this issue to fit.

avatar infograf768
infograf768 - comment - 26 Feb 2018

@mbabker
I found the issue.
One has to first manually create the db before installing.
I.e. it is not created on the fly as msqli does.

Is that expected or is it a bug?

avatar infograf768
infograf768 - comment - 26 Feb 2018

@laoneo I am told to ping you.

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Feb 2018
Status New Discussion
avatar mbabker
mbabker - comment - 26 Feb 2018
avatar infograf768
infograf768 - comment - 26 Feb 2018
avatar mbabker
mbabker - comment - 26 Feb 2018

You know, at one point I made all the required changes for that move, so I really don't know why all these problems are back.

avatar infograf768
infograf768 - comment - 26 Feb 2018

I'll leave these modifications to the powers that be.
For example, it may be that the code in libraries/src/Service/Provider/Database.php is there for B/C.
Over my abilities.

avatar mbabker
mbabker - comment - 26 Feb 2018

Read the inline commentary in the database provider, it is a B/C layer ?

avatar mbabker
mbabker - comment - 26 Feb 2018

Well, at least the changes I made to the installer in #16402 got lost. So once again someone is going to have to scan the full code base and adapt for the changed code structure.

avatar laoneo
laoneo - comment - 1 Mar 2018

Can the problem be the move to namespaces in the installation app? Did I screw something up?

avatar infograf768
infograf768 - comment - 1 Mar 2018

my tests show that using mysql instead of pdomysql works fine. The xml does not use pdomysql.

avatar brianteeman
brianteeman - comment - 1 Mar 2018

The xml should not use pdoxml as that would be invalid

avatar mbabker
mbabker - comment - 1 Mar 2018

Did I screw something up?

When the install app was converted to its current state some of the changes I made related to moving to the Framework's database package were lost (all the code references to "pdomysql" should have been replaced as seen in #16402 but looking at the current code they're back). So like I said, we just need to do another scan on the code base and find these remaining references and fix them.

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar mbabker
mbabker - comment - 25 Mar 2018

No guarantees but #19989 might fix this.

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Mar 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-03-26 05:24:55
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 26 Mar 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 26 Mar 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 26 Mar 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Mar 2018

closed as having Pull Request #19989

Add a Comment

Login with GitHub to post a comment