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

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]
SimpleXML Reading node with a hyphenated name

Categories

HOME
compiler-construction
image
jdo
listview
hook
stock
octobercms
google-oauth
youtube-api-v3
v8
binary-tree
google-project-tango
angular-ui-bootstrap
in-app-purchase
gorm
maude-system
usergrid
windows-7-x64
beyondcompare
google-cloud-speech
jprofiler
css-animations
angular2-aot
xpages-ssjs
tdd
fish
kannel
fopen
spring-mybatis
large-file-upload
file-rename
skia
r-raster
uisplitview
catel
noraui
stringtemplate
cloud-code
hexo
wpf-controls
sharefile
c11
jna
g-code
nomethoderror
estimote
password-encryption
websphere-mq-fte
revapi
python-c-api
clean-architecture
ionicons
datastax-startup
integrity
knockout-components
nsarray
memory-alignment
gcsfuse
titanium-android
cubes
static-ip-address
azure-sdk
file-writing
underscore.js-templating
py2app
etsy
fuzzy-search
lttng
moveit
yaws
tcpserver
ios8-today-widget
vhd
computer-algebra-systems
p2
proj4js
apache-commons-net
xc16
winddk
preferences
code-access-security
android-radiobutton
p4java
braille
picturefill
ember-charts
mbr
mcts
ivyde
factory-method
anonymous-methods
google-email-migration
cascalog
spring-portlet-mvc
hgsubversion
nsdatecomponents
mercurial-server
coercion
sproutcore-2
gamma
modelstate
preference
sustainable-pace
data-acquisition

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App