? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
5 Mar 2018

Actually the database is created during the constructor call in the applications. Because the InputFilter class is requesting the database also in it's constructor. This pr loads the database not before it is actually used.

I'm splitting #16918 into different pr's to be easier to review.

avatar laoneo laoneo - open - 5 Mar 2018
avatar laoneo laoneo - change - 5 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2018
Category Libraries
avatar laoneo laoneo - change - 6 Mar 2018
Labels Added: ?
1819c91 6 Aug 2018 avatar laoneo ns
avatar csthomas
csthomas - comment - 3 Sep 2018

Joomla4 is trying to take care of utf8, but the minimum version of mysql is 5.5.3, which supports utf8mb4.
AFAIK the result will always be true (for utf8mb4).

See:

avatar mbabker
mbabker - comment - 3 Sep 2018

For the MySQL server itself, that is a true statement. BUT, there is also a condition based on the library being used to connect by PHP. So there's also an extra check needed if using the mysqlnd library, see [https://github.com/joomla-framework/database/blob/07a8bc36c50bc9e55c5c555bf80c745a2f704aa3/src/Mysqli/MysqliDriver.php#L891-L918](the MysqliDriver class) for this check.

avatar csthomas
csthomas - comment - 3 Sep 2018

Starting from PHP version 5.4, the mysqlnd client version is 5.0.10. Did I miss something?

See: https://github.com/php/php-src/blob/PHP-5.4/ext/mysqlnd/mysqlnd.h#L25

avatar mbabker
mbabker - comment - 3 Sep 2018

The bundled version may be appropriate, but also keep in mind it is possible to compile PHP without using the bundled externals included in core PHP.

avatar csthomas
csthomas - comment - 3 Sep 2018

Should I understand that someone can compile very old version of mysqlnd <= 5.0.8 on php7?

avatar mbabker
mbabker - comment - 3 Sep 2018

No idea what the extension compatibility is, but in general you can't just rely on what's bundled with PHP to be what is actually used every time (that goes for the extensions and the underlying libraries they depend on, i.e. ext/curl and libcurl). In this case we're probably safe to assume that anything before 5.0.12 is incompatible with PHP 7 though.

avatar csthomas
csthomas - comment - 3 Sep 2018

A little related example
https://stackoverflow.com/questions/14331003/phpize-and-php-api-version-doesnt-match

AFAIK we are safe and can remove this check.

http://www.phpinternalsbook.com/php7/build_system/building_extensions.html

... If they mismatch, then the extension will not load, and an error message will be displayed.

[UPDATED] This sentence is only for already compiled extension, not related to build process. The same for php-api-version from the first link.

avatar laoneo
laoneo - comment - 6 Sep 2018

@csthomas can you make a new pr which removes the check then and I'm happy to close this one if we are safe. Would be a good move if we can get rid of the db dependency in the filter at all.

avatar csthomas
csthomas - comment - 7 Sep 2018

Mysqlnd extension can not be installed by pecl.

Even if someone wants to compile mysqlnd from php5.3 on php7 (manually by phpize), it will be incompatible AFAIK.

I will make a new PR.

avatar laoneo
laoneo - comment - 10 Sep 2018

Closing in favor of #22035.

avatar laoneo laoneo - change - 10 Sep 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-09-10 06:55:17
Closed_By laoneo
avatar laoneo laoneo - close - 10 Sep 2018

Add a Comment

Login with GitHub to post a comment