simplexml


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.

Related Links

Save formatted xml
SimpleXML (Zend_Config_Xml actually) and foreach : which tag am I iterating?
simplexml_load_file() error happening in only localhost/xampp
SimpleXml tar.gz
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]

Categories

HOME
xamarin
gerrit
openmp
urbancode
c#-4.0
server
raspberry-pi
fme
spring-cloud-stream
graphql
echarts
qt-creator
n-gram
static-libraries
circuit
after-effects
graphlab
google-static-maps
reactcsstransitiongroup
immutable.js
physics-engine
microsoft-sync-framework
vision
subdomains
flink-streaming
socialengine
media-queries
http-digest
plsql-psp
appfabric
vxworks
web-mining
webdriver-manager
elasticsearch-plugin
mapzen
gzipstream
jvm-languages
qwt
fault
atomicity
zip4j
theming
blogengine.net
winscp-net
np-complete
media-player
dtexec
capacity
cudafy.net
color-picker
multi-level
ctest
bstr
multiple-regression
moveit
packagist
captivenetwork
rhino-servicebus
phpcas
natvis
mutation-observers
varargs
processmodel
nsight
facebook-graph-api-v2.4
wordpress-theme-customize
ceil
heisenbug
htmlcleaner
picturefill
hyprlinkr
cloud-connect
java.nio.file
centos5
mysqltuner
sitemesh
eclipse-memory-analyzer
django-nonrel
free-variable
distutils
dice
runas
onsubmit
gnu-prolog
qt-jambi
xtype
rfc1123
iphone-web-app
dmx512
compiler-specific
temporal-database

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App