PHP 7 simpleXML fatal error
I'm not able to solve a problem with simplexml. I just set up an ec2 instance on aws linux/ubuntu with apache2 server and trying to install shopware. Problem: Fatal error: Call to undefined function XXX\Recovery\Install\simplexml_load_file() in /var/www/XXX/recovery/install/src/Requirements.php on line 104 Searching for known issues. I came up with manually installed packages for php. After checking phpinfo and php -m i asume that following modules are installed: [PHP Modules] calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring mcrypt mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zip zlib But I'm not sure if their enabled. Do I need to enable simplexml manually in my php.ini file? How to do this correctly? version info: PHP 7.0.12-1+deb.sury.org~xenial+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.12-1+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies Thanks for helping.
No you cannot enable it in php.ini You could check that it's enabled with phpinfo : <?php echo phpinfo(); ?> Or using command line : php -i | grep -i simplexml I would try to install it again as it should be enabled by default : sudo apt-get install php7.0-xml
Solution: I updated the missing package sudo apt-get install php7.0-xml (I also installed some related xml librarys. There are plenty of posts on google related to this). Afterwards this didn't solve my problem. The reason was I messed up my php installation. For any reason apache2 was configured with php5.6 so for me worked: sudo a2dismod php5.6 sudo a2enmod php7.0 sudo service apache2 restart Hope this saves somebody some time, in future.
SimpleXML (Zend_Config_Xml actually) and foreach : which tag am I iterating?
simplexml_load_file() error happening in only localhost/xampp
simplexml_load_file error in PHP 5.3
simplexml_load_file not a valid URI issue
Can't turn XML response into an simplexml object
Having trouble getting Fogbugz API response into a SimpleXML object
Upgraded to php 5.3.10 and simpleXMLelement is broken
Parsing RSS Feed with SimpleXML
php simplexml_load_file (script url) failed to open stream
PHP - SimpleXML not returning object
Having trouble processing XML with PHP SimpleXML
Simplexml How to access all element of the same node
simplexml_load_file failed to open stream Http request failed
Using XML node names with hyphens in PHP [duplicate]
SimpleXML Reading node with a hyphenated name