cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 and PHP load errors

Magento 2 and PHP load errors

I have set folder ownership and file permissions. I am at the point of running the Magento 2 install, using command line.

I receive the following error message:

 

Failed loading /usr/lib64/php/modules/:  /usr/lib64/php/modules/: cannot read file data: Is a directory
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.4.so:  /usr/lib64/php/modules/ioncube_loader_lin_5.4.so: undefined symbol: execute
PHP Fatal error:  Class 'DOMDocument' not found in /var/www/vhosts/artofintimacy.ru/magento2/vendor/magento/framework/Config/Dom.php on line 364

 

My server is Centos 6, and I followed the instructions to upgrade the php_cli to php 5.6. I modified the php.ini file. I don't understand why the install command is still pulling a load of php 5.4. In fact, when I check the php version running, I get this response:

 

Failed loading /usr/lib64/php/modules/:  /usr/lib64/php/modules/: cannot read file data: Is a directory
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.4.so:  /usr/lib64/php/modules/ioncube_loader_lin_5.4.so: undefined symbol: execute
PHP 5.6.18 (cli) (built: Feb  4 2016 22:33:15)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

 

Anyone with ideas on what is happening?

13 REPLIES 13

Re: Magento 2 and PHP load errors

Your version of the ionCube Loader (ioncube_loader_lin_5.4.so) is incompatible with your PHP version (5.6).

You should upgrade the ionCube Loader (install the version for PHP  5.6): https://www.ioncube.com/loaders.php

Re: Magento 2 and PHP load errors

I thought that I properly updated the ioncube. Now, I did a search for the packages:

 

[root@d7w2-g8zq ~]# php -i | grep extension_dir
Failed loading /usr/lib64/php/modules/:  /usr/lib64/php/modules/: cannot read file data: Is a directory
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.4.so:  /usr/lib64/php/modules/ioncube_loader_lin_5.4.so: undefined symbol: execute

extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules

 

When I go to the folder with the extensions, I see that the full range is included:

[root@d7w2-g8zq modules]# dir
bz2.so       exif.so      gmp.so                     ioncube_loader_lin_5.3.so  json.so     pdo_mysql.so   shmop.so      sw-engine
calendar.so  fileinfo.so  iconv.so                   ioncube_loader_lin_5.4.so  mysqli.so   pdo.so         simplexml.so  tokenizer.so
ctype.so     ftp.so       ioncube_loader_lin_5.1.so  ioncube_loader_lin_5.5.so  mysql.so    pdo_sqlite.so  sockets.so    xml.so
curl.so      gettext.so   ioncube_loader_lin_5.2.so  ioncube_loader_lin_5.6.so  opcache.so  phar.so        sqlite3.so    zip.so
[root@d7w2-g8zq modules]#

 

I also added the following line to beginning of my php.ini file:

 

zend_extension= /usr/lib64/php/modules/

 

I don't understand why the 5.6 extension is not pulled by the php 5.6 installation.

 

Re: Magento 2 and PHP load errors

I got the ioncube to load - I needed to put the full loader name (and path) into the php.ini file - not simply the path.

 

I still have one php load error that remains:

 

PHP Fatal error:  Class 'DOMDocument' not found in /var/www/vhosts/artofintimacy.ru/magento2/vendor/m​agento/framework/Config/Dom.php on line 364

 

Do I need to add something more to the php.ini file, or do I need to modify the Dom.php file - or, am I missing a php extension that provides this Class? 

 

Please advise.

Re: Magento 2 and PHP load errors

Run the phpinfo() function from the site's root and publish the result here.

Re: Magento 2 and PHP load errors

It is a considerable amount of info. It begins:

 

PHP Version => 5.6.18

 

System => Linux d7w2-g8zq.accessdomain.com 2.6.32-042stab113.11 #1 SMP Fri Dec 18 17:32:04 MSK 2015 x86_64
Build Date => Feb  4 2016 22:32:50
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/00-ioncube-loader.ini,
/etc/php.d/bz2.ini,
/etc/php.d/calendar.ini,
/etc/php.d/ctype.ini,
/etc/php.d/curl.ini,
/etc/php.d/exif.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/ftp.ini,
/etc/php.d/gettext.ini,
/etc/php.d/gmp.ini,
/etc/php.d/iconv.ini,
/etc/php.d/json.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/opcache.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/shmop.ini,
/etc/php.d/simplexml.ini,
/etc/php.d/sockets.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/tokenizer.ini,
/etc/php.d/xml.ini,
/etc/php.d/zend_extensions_psa.ini,
/etc/php.d/zip.ini

PHP API => 20131106
PHP Extension => 20131226
Zend Extension => 220131226
Zend Extension Build => API220131226,NTS
PHP Extension Build => API20131226,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => enabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*,
convert.iconv.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCub
e Ltd.
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

 

It continues with Configuration information. As I look at the repository list, I have both "plesk-php-5.6" and "webtatic el6". I was unable to wget the iuscommunity repository - something recommended by many people for use with Centos. Name resolution for that repository kept timing out.

Re: Magento 2 and PHP load errors

Is the --disable-dom PHP compilation key present?

Re: Magento 2 and PHP load errors

No. I don't see anything in the Configuration that reports this. Is it best to disable, or to implement? I assume the Magento install is checking for this because it needs it. I need to update the phpmysql, or to modify the php.ini??

Re: Magento 2 and PHP load errors

I am concerned that I made a mistake by upgrading with webtatic instead of iuscommunity. How do I remove the webtatic? Maybe using the iuscommunity package will fix this problem.

Re: Magento 2 and PHP load errors

I got an automated email today that warned me that Plesk was not updating. I expect that it is because I replaced the plesk-php package with the webtatic. Do I need to modify my remi.repo file?