Hello, I want to ask about errors that I get while installing Magento using Pro version install script, it does not finish installation, but I can finish it using browser, but I am not sure if all permissions are set correct after installation. Current folders permissions 0755, files 0754, index.php 0750 Some errors might be because I am using 7.2 Remi PHP
Magento 2.3.1 and 2.3.0 (same errors) Operating system CentOS Linux 7.6.1810 Perl version 5.016003 Path to Perl /usr/bin/perl BIND version 9.9 Postfix version 2.10.1 Mail injection command /usr/lib/sendmail -t Apache version 2.4.6 PHP versions 7.2.17 from Remi Webalizer version 2.23-08 Logrotate version 3.8.6 MySQL version 10.2.23-MariaDB ProFTPD version 1.35 SpamAssassin version 3.4.0 ClamAV version 0.101.2
Error msg: PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib64/php/modules/mysqli.so (/usr/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib64/php/modules/mysqli.so.so (/usr/lib64/php/modules/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: Module 'intl' already loaded in Unknown on line 0
PHP Warning: Module 'soap' already loaded in Unknown on line 0
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
PHP Warning: Module 'zip' already loaded in Unknown on line 0
SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost' (using password: YES)
'user' is not a valid hostname for email address 'user@user'
'user' does not match the expected structure for a DNS hostname
'user' appears to be a local network name but local network names are not allowed
In InstallCommand.php line 264:
Parameter validation failed
setup:install [--backend-frontname BACKEND-FRONTNAME] [--enable-debug-logging ENABLE-DEBUG-LOGGING] [--enable-syslog-logging ENABLE-SYSLOG-LOGGING] [--amqp-host AMQP-HOST] [--amqp-port AMQP-PORT] [--amqp-user AMQP-USER] [--amqp-password AMQP-PASSWORD] [--amqp-virtualhost AMQP-VIRTUALHOST] [--amqp-ssl AMQP-SSL] [--amqp-ssl-options AMQP-SSL-OPTIONS] [--key KEY] [--db-host DB-HOST] [--db-name DB-NAME] [--db-user DB-USER] [--db-engine DB-ENGINE] [--db-password DB-PASSWORD] [--db-prefix DB-PREFIX] [--db-model DB-MODEL] [--db-init-statements DB-INIT-STATEMENTS] [-s|--skip-db-validation] [--http-cache-hosts HTTP-CACHE-HOSTS] [--session-save SESSION-SAVE] [--session-save-redis-host SESSION-SAVE-REDIS-HOST] [--session-save-redis-port SESSION-SAVE-REDIS-PORT] [--session-save-redis-password SESSION-SAVE-REDIS-PASSWORD] [--session-save-redis-timeout SESSION-SAVE-REDIS-TIMEOUT] [--session-save-redis-persistent-id SESSION-SAVE-REDIS-PERSISTENT-ID] [--session-save-redis-db SESSION-SAVE-REDIS-DB] [--session-save-redis-compression-threshold SESSION-SAVE-REDIS-COMPRESSION-THRESHOLD] [--session-save-redis-compression-lib SESSION-SAVE-REDIS-COMPRESSION-LIB] [--session-save-redis-log-level SESSION-SAVE-REDIS-LOG-LEVEL] [--session-save-redis-max-concurrency SESSION-SAVE-REDIS-MAX-CONCURRENCY] [--session-save-redis-break-after-frontend SESSION-SAVE-REDIS-BREAK-AFTER-FRONTEND] [--session-save-redis-break-after-adminhtml SESSION-SAVE-REDIS-BREAK-AFTER-ADMINHTML] [--session-save-redis-first-lifetime SESSION-SAVE-REDIS-FIRST-LIFETIME] [--session-save-redis-bot-first-lifetime SESSION-SAVE-REDIS-BOT-FIRST-LIFETIME] [--session-save-redis-bot-lifetime SESSION-SAVE-REDIS-BOT-LIFETIME] [--session-save-redis-disable-locking SESSION-SAVE-REDIS-DISABLE-LOCKING] [--session-save-redis-min-lifetime SESSION-SAVE-REDIS-MIN-LIFETIME] [--session-save-redis-max-lifetime SESSION-SAVE-REDIS-MAX-LIFETIME] [--session-save-redis-sentinel-master SESSION-SAVE-REDIS-SENTINEL-MASTER] [--session-save-redis-sentinel-servers SESSION-SAVE-REDIS-SENTINEL-SERVERS] [--session-save-redis-sentinel-verify-master SESSION-SAVE-REDIS-SENTINEL-VERIFY-MASTER] [--session-save-redis-sentinel-connect-retires SESSION-SAVE-REDIS-SENTINEL-CONNECT-RETIRES] [--cache-backend CACHE-BACKEND] [--cache-backend-redis-server CACHE-BACKEND-REDIS-SERVER] [--cache-backend-redis-db CACHE-BACKEND-REDIS-DB] [--cache-backend-redis-port CACHE-BACKEND-REDIS-PORT] [--cache-backend-redis-password CACHE-BACKEND-REDIS-PASSWORD] [--cache-id-prefix CACHE-ID-PREFIX] [--page-cache PAGE-CACHE] [--page-cache-redis-server PAGE-CACHE-REDIS-SERVER] [--page-cache-redis-db PAGE-CACHE-REDIS-DB] [--page-cache-redis-port PAGE-CACHE-REDIS-PORT] [--page-cache-redis-compress-data PAGE-CACHE-REDIS-COMPRESS-DATA] [--page-cache-redis-password PAGE-CACHE-REDIS-PASSWORD] [--page-cache-id-prefix PAGE-CACHE-ID-PREFIX] [--base-url BASE-URL] [--language LANGUAGE] [--timezone TIMEZONE] [--currency CURRENCY] [--use-rewrites USE-REWRITES] [--use-secure USE-SECURE] [--base-url-secure BASE-URL-SECURE] [--use-secure-admin USE-SECURE-ADMIN] [--admin-use-security-key ADMIN-USE-SECURITY-KEY] [--admin-user [ADMIN-USER]] [--admin-password [ADMIN-PASSWORD]] [--admin-email [ADMIN-EMAIL]] [--admin-firstname [ADMIN-FIRSTNAME]] [--admin-lastname [ADMIN-LASTNAME]] [--cleanup-database] [--sales-order-increment-prefix SALES-ORDER-INCREMENT-PREFIX] [--use-sample-data] [--enable-modules [ENABLE-MODULES]] [--disable-modules [DISABLE-MODULES]] [--convert-old-scripts [CONVERT-OLD-SCRIPTS]] [-i|--interactive] [--safe-mode [SAFE-MODE]] [--data-restore [DATA-RESTORE]] [--dry-run [DRY-RUN]] [--magento-init-params MAGENTO-INIT-PARAMS]
Comments
Submitted by andreychek on Tue, 04/23/2019 - 14:09 Comment #1
Howdy -- thanks for contacting us!
I had actually just done a few test installs of Magento using PHP 7.2... those actually went really well, though the difference is that it was from the SCL repo (which is one of the few third party repos we support).
The problem you're seeing there is related to this error:
PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib64/php/modules/mysqli.so (/usr/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_global_stats),
I hadn't run into that before, which could mean it's related to the REMI repo.
Some Googling suggests that you might also look into loading the mysqlnd driver prior to the mysqli driver though.
Submitted by Haruyuki on Wed, 04/24/2019 - 06:23 Comment #2
I having trouble finding right php files centos-sclo-rh does not have all needed extensions (so I keep it disabled) and something is wrong with centos-release-scl, running "yum install centos-release-scl" it says I already have centos-release-scl-2-3.el7.centos.noarch installed, but I can't find "centos-release-scl" between disabled or enabled repolist. when I try to use command yum-config-manager --enable centos-release-scl it just say "Loaded plugins: fastestmirror" and thats all.
Submitted by andreychek on Wed, 04/24/2019 - 09:44 Comment #3
Well, we could help you get that enabled if you ever wanted, though if it doesn't have the PHP modules you need, I understand that's a problem.
Of of curiosity, may I ask for an example or two of a PHP module you'd like that isn't available at the SCL repo?
Submitted by Haruyuki on Thu, 04/25/2019 - 10:40 Comment #4
rh-php72-php-mcrypt missing (screenshot), but this module by Magento is Optional but recommended (installation script stops on it first) https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-... and by this page https://webtatic.com/packages/php72/ Mcrypt no longer provided in 7.2 php "PHP.net has decided to therefore move the extension from the core release to pecl.php.net."
Submitted by andreychek on Thu, 04/25/2019 - 14:24 Comment #5
Yeah, that is indeed correct -- mcrypt was deprecated in PHP 7.1, and removed altogether in PHP 7.2.
It doesn't appear to be a problem of any sort not to use that in Magento (as I use that on my own personal server without mcrypt).
However, due to a bug in our Install Script (we have an open bug report for that which Jamie will tweak when he has a moment), that does indeed cause Magento installs to fail when using PHP 7.2 or newer.
The workaround would be to perform the install on PHP 7.0 or 7.1, where I believe you could get mcrypt -- then later switch to PHP 7.2. Or, you could make a minor change to the install script to remove the reference to mcrypt. If you'd like a hand with that, let me know and I'll provide you with steps to do that.
Submitted by Haruyuki on Fri, 04/26/2019 - 06:29 Comment #6
I would love to learn making minor changes to the install script, it would help me in future too if there was any other minor problem like this. Thank you Andreychek
Submitted by andreychek on Fri, 04/26/2019 - 09:01 Comment #7
No problem!
I ended up needing to make this same change on my own personal server too for the very same reason. We will have a fix out for it soon, but I'll explain how to make the change so you can start using Magento with PHP 7.2 now.
I'll just use bullet points:
SSH into your server as root
Run this command: cd /etc/webmin/virtual-server/latest-scripts
Make a backup (you won't need the file in /tmp unless something doesn't go right): cp magento.pl /tmp
Open magento.pl in a text editor (vi, nano, etc). Ex, vi magento.pl
Jump down to line 362, where you'll see this:
return ( "mysql", "mcrypt", "xml", "curl", "pdo_mysql",
$ver >= 2 ? ( "intl", "gd", "soap", "zip" ) : ( ) );
That is where the Install Script lists it's dependencies. All we need to do is get rid of the "mcrypt" reference, so that it looks like this here:
return ( "mysql", "xml", "curl", "pdo_mysql",
$ver >= 2 ? ( "intl", "gd", "soap", "zip" ) : ( ) );
Save and exit out of your text editor
Restart Webmin: service webmin restart
Now try installing Magento again and see if that does the trick!
Submitted by JamieCameron on Sat, 04/27/2019 - 13:05 Comment #8
I'll also apply the same change in the next release of Virtualmin or the Magento installer.
Submitted by Haruyuki on Thu, 05/02/2019 - 19:05 Comment #9
Thank you Andrey and Jamie, now everything works fine.