Ambiente: Ubuntu 17.10 (GNU/Linux 4.13.0-43-generic x86_64)
Servidor: Apache/2.4.27 (Ubuntu)
PHP: Version 7.1.17
When you start the Magento 2.x platform installation process, an error known in Step 2 will make it impossible to move.
The reported error:
Notice: undefined property: domdocument :: $ documentelement in /var/www/html/sualoja/vendor/magento/framework/objectmanager/config/mapper/dom.php online 58
The reasons:
1 - Lack of permission on directories and installation files.
2 - dom.so
extension not enabled or double-enabled in php.ini
The solution:
First of all, make sure the php-xml
extension is installed. Use the command in the Ubuntu terminal to install:
sudo apt-get install php-xml
1 - Change the permissions of directories and files on your server
chmod 777, in the directories:
app/code
app/etc
pub/static
var/generation
var/di
var/view_preprocessed
2 - Search the php.ini files on your server with the command:
find / -name php.ini
It can be found at:
/etc/php/7.1/cli/php.ini
/etc/php/7.1/apache2/php.ini
Enable extension=dom.so
in only one of the php.ini files
You can do this using the command:
sudo nano /etc/php/7.1/apache2/php.ini
Use
CTRL+W
to find the line of codeextension=dom.so
. Enable the extension by removing the bullet point . Change% with% to;extension=dom.so
. Saveextension=dom.so
and closeCTRL+O
the file php.ini when done.
Restart the Apache server for the new changes to take effect:
sudo systemctl restart apache2
Resume the installation and verify that the problem has been fixed.