PHP 7 simpleXML
I'm testing PHP7, and have a weird issue after a recent update. SimpleXML should be enabled by default, and my phpinfo
page shows that it is available:
However, the functions are not available:
<?php
if (function_exists('simplexml_load_file')) {
echo "simpleXML functions are available.<br />n";
} else {
echo "simpleXML functions are not available.<br />n";
}
// result-- NOT available
And the module isn't listed as loaded:
~ $ php -m
[PHP Modules]
calendar
Core
ctype
curl
...
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
Anyone know if there's a workaround for this?
Version info:
~ $ php -v
PHP 7.0.3-8+deb.sury.org~trusty+2 (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.6-dev, Copyright (c) 1999-2016, by Zend Technologies
php simplexml php-7
add a comment |
I'm testing PHP7, and have a weird issue after a recent update. SimpleXML should be enabled by default, and my phpinfo
page shows that it is available:
However, the functions are not available:
<?php
if (function_exists('simplexml_load_file')) {
echo "simpleXML functions are available.<br />n";
} else {
echo "simpleXML functions are not available.<br />n";
}
// result-- NOT available
And the module isn't listed as loaded:
~ $ php -m
[PHP Modules]
calendar
Core
ctype
curl
...
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
Anyone know if there's a workaround for this?
Version info:
~ $ php -v
PHP 7.0.3-8+deb.sury.org~trusty+2 (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.6-dev, Copyright (c) 1999-2016, by Zend Technologies
php simplexml php-7
3
From your screen capture of yourphpinfo()
page, it looks like SimpleXML is only in the "Module Authors" section. Which is only telling you who wrote it; that doesn't mean it's installed or loaded. In fact, if that's the only place it appears inphpinfo()
, I suspect that means it is not installed.
– Brendan White
Feb 10 '17 at 21:06
$ php -i | grep simplexml
– Ravshan Abdulaev
Sep 13 '17 at 22:33
use sudo apt-get dist-upgrade
– Bharat Parmar
Sep 28 '17 at 8:19
2
Try restarting php-fpm. sudo systemctl restart php-fpm
– phpd
Oct 18 '18 at 7:19
add a comment |
I'm testing PHP7, and have a weird issue after a recent update. SimpleXML should be enabled by default, and my phpinfo
page shows that it is available:
However, the functions are not available:
<?php
if (function_exists('simplexml_load_file')) {
echo "simpleXML functions are available.<br />n";
} else {
echo "simpleXML functions are not available.<br />n";
}
// result-- NOT available
And the module isn't listed as loaded:
~ $ php -m
[PHP Modules]
calendar
Core
ctype
curl
...
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
Anyone know if there's a workaround for this?
Version info:
~ $ php -v
PHP 7.0.3-8+deb.sury.org~trusty+2 (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.6-dev, Copyright (c) 1999-2016, by Zend Technologies
php simplexml php-7
I'm testing PHP7, and have a weird issue after a recent update. SimpleXML should be enabled by default, and my phpinfo
page shows that it is available:
However, the functions are not available:
<?php
if (function_exists('simplexml_load_file')) {
echo "simpleXML functions are available.<br />n";
} else {
echo "simpleXML functions are not available.<br />n";
}
// result-- NOT available
And the module isn't listed as loaded:
~ $ php -m
[PHP Modules]
calendar
Core
ctype
curl
...
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
Anyone know if there's a workaround for this?
Version info:
~ $ php -v
PHP 7.0.3-8+deb.sury.org~trusty+2 (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.6-dev, Copyright (c) 1999-2016, by Zend Technologies
php simplexml php-7
php simplexml php-7
asked Feb 24 '16 at 4:51
user101289user101289
4,13074483
4,13074483
3
From your screen capture of yourphpinfo()
page, it looks like SimpleXML is only in the "Module Authors" section. Which is only telling you who wrote it; that doesn't mean it's installed or loaded. In fact, if that's the only place it appears inphpinfo()
, I suspect that means it is not installed.
– Brendan White
Feb 10 '17 at 21:06
$ php -i | grep simplexml
– Ravshan Abdulaev
Sep 13 '17 at 22:33
use sudo apt-get dist-upgrade
– Bharat Parmar
Sep 28 '17 at 8:19
2
Try restarting php-fpm. sudo systemctl restart php-fpm
– phpd
Oct 18 '18 at 7:19
add a comment |
3
From your screen capture of yourphpinfo()
page, it looks like SimpleXML is only in the "Module Authors" section. Which is only telling you who wrote it; that doesn't mean it's installed or loaded. In fact, if that's the only place it appears inphpinfo()
, I suspect that means it is not installed.
– Brendan White
Feb 10 '17 at 21:06
$ php -i | grep simplexml
– Ravshan Abdulaev
Sep 13 '17 at 22:33
use sudo apt-get dist-upgrade
– Bharat Parmar
Sep 28 '17 at 8:19
2
Try restarting php-fpm. sudo systemctl restart php-fpm
– phpd
Oct 18 '18 at 7:19
3
3
From your screen capture of your
phpinfo()
page, it looks like SimpleXML is only in the "Module Authors" section. Which is only telling you who wrote it; that doesn't mean it's installed or loaded. In fact, if that's the only place it appears in phpinfo()
, I suspect that means it is not installed.– Brendan White
Feb 10 '17 at 21:06
From your screen capture of your
phpinfo()
page, it looks like SimpleXML is only in the "Module Authors" section. Which is only telling you who wrote it; that doesn't mean it's installed or loaded. In fact, if that's the only place it appears in phpinfo()
, I suspect that means it is not installed.– Brendan White
Feb 10 '17 at 21:06
$ php -i | grep simplexml
– Ravshan Abdulaev
Sep 13 '17 at 22:33
$ php -i | grep simplexml
– Ravshan Abdulaev
Sep 13 '17 at 22:33
use sudo apt-get dist-upgrade
– Bharat Parmar
Sep 28 '17 at 8:19
use sudo apt-get dist-upgrade
– Bharat Parmar
Sep 28 '17 at 8:19
2
2
Try restarting php-fpm. sudo systemctl restart php-fpm
– phpd
Oct 18 '18 at 7:19
Try restarting php-fpm. sudo systemctl restart php-fpm
– phpd
Oct 18 '18 at 7:19
add a comment |
8 Answers
8
active
oldest
votes
I had the same problem and I'm using Ubuntu 15.10.
In my case, to solve this issue, I installed the package php7.0-xml using the Synaptic package manager, which include SimpleXml. So, after restart my Apache server, my problem was solved. This package came in the Debian version and you can find it here: https://packages.debian.org/sid/php7.0-xml.
1
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
27
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
1
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
add a comment |
For all those using Ubuntu with ppa:ondrej/php
PPA this will fix the problem:
apt install php7.0-mbstring php7.0-zip php7.0-xml
(see https://launchpad.net/~ondrej/+archive/ubuntu/php)
Thanks @Alexandre Barbosa for pointing this out!
EDIT 20160423:
One-liner to fix this issue:
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && sudo apt install -y php7.0-mbstring php7.0-zip php7.0-xml
(this will add the ppa noted above and will also make sure you always have the latest php. We use Ondřej's PHP ppa for almost two years now and it's working like charm)
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
1
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
1
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
add a comment |
For Ubuntu 14.04 with
PHP 7.0.13-1+deb.sury.org~trusty+1 (cli) ( NTS )
sudo apt-get install php-xml
worked for me.
add a comment |
I'm using Bash on Windows (Ubuntu 16.04) and I just installed with php7.0-xml and all is working now for the Symfony 3.2.7 PHP requirements.
sudo apt-get install php7.0-xml
that did the trick.
– Brad
Jul 28 '17 at 17:06
add a comment |
For Alpine (in docker), you can use apk add php7-simplexml
.
If that doesn't work for you, you can run apk add --no-cache php7-simplexml
. This is in case you aren't updating the package index first.
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
It's important to make sure that after you install the package on the Alpine container, you should rundocker restart <container_name>
to make these changes work.
– cudacoder
Dec 20 '17 at 15:31
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
1
@ronit tryapk add --no-cache php7-simplexml
. You need the--no-cache
flag if you aren't runningapk update
first.
– brismuth
Mar 6 '18 at 18:22
add a comment |
------------------in centos-------------------------
find out which package provides php-xml:
yum provides php-xml
then from the output list,select the appropriate one, install
yum install php70u-xml-7.0.14-2.ius.centos7.x86_64
1
This is a good answer because theyum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in theyum install
command.
– Craig Finch
Jun 30 '18 at 19:21
add a comment |
Typically on Debian systems you have different PHP configuration for CLI and for PHP running as say an Apache module. Your phpinfo page may very well show simplexml as being enabled via web server, while it is not enabled via CLI.
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
add a comment |
Had the same problem on AWS Linux 2, phpinfo() shows SimpleXML installed but not working, below cmd solved my issue
sudo yum install php-xml
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35593521%2fphp-7-simplexml%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had the same problem and I'm using Ubuntu 15.10.
In my case, to solve this issue, I installed the package php7.0-xml using the Synaptic package manager, which include SimpleXml. So, after restart my Apache server, my problem was solved. This package came in the Debian version and you can find it here: https://packages.debian.org/sid/php7.0-xml.
1
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
27
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
1
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
add a comment |
I had the same problem and I'm using Ubuntu 15.10.
In my case, to solve this issue, I installed the package php7.0-xml using the Synaptic package manager, which include SimpleXml. So, after restart my Apache server, my problem was solved. This package came in the Debian version and you can find it here: https://packages.debian.org/sid/php7.0-xml.
1
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
27
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
1
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
add a comment |
I had the same problem and I'm using Ubuntu 15.10.
In my case, to solve this issue, I installed the package php7.0-xml using the Synaptic package manager, which include SimpleXml. So, after restart my Apache server, my problem was solved. This package came in the Debian version and you can find it here: https://packages.debian.org/sid/php7.0-xml.
I had the same problem and I'm using Ubuntu 15.10.
In my case, to solve this issue, I installed the package php7.0-xml using the Synaptic package manager, which include SimpleXml. So, after restart my Apache server, my problem was solved. This package came in the Debian version and you can find it here: https://packages.debian.org/sid/php7.0-xml.
edited Dec 1 '16 at 10:04
Tieme
40.5k1476125
40.5k1476125
answered Feb 24 '16 at 13:56
Alexandre BarbosaAlexandre Barbosa
94653
94653
1
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
27
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
1
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
add a comment |
1
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
27
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
1
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
1
1
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre-- thanks! That resolved it.
– user101289
Feb 24 '16 at 15:37
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
@Alexandre Wohoo got OwnCloud working again with that, perfect!
– Flatron
Feb 24 '16 at 22:31
27
27
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
Ubuntu 16.04: sudo apt-get install php-xml
– Sasha MaximAL
Apr 25 '16 at 8:59
1
1
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
It seems the issue is also present in Ubuntu Server 16.04. After a clean install I encountered the issue. "PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()" was being output to the PHP error log. Installing the package recommended by Alexandre fixed it.
– MikeyE
Jul 5 '16 at 19:33
add a comment |
For all those using Ubuntu with ppa:ondrej/php
PPA this will fix the problem:
apt install php7.0-mbstring php7.0-zip php7.0-xml
(see https://launchpad.net/~ondrej/+archive/ubuntu/php)
Thanks @Alexandre Barbosa for pointing this out!
EDIT 20160423:
One-liner to fix this issue:
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && sudo apt install -y php7.0-mbstring php7.0-zip php7.0-xml
(this will add the ppa noted above and will also make sure you always have the latest php. We use Ondřej's PHP ppa for almost two years now and it's working like charm)
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
1
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
1
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
add a comment |
For all those using Ubuntu with ppa:ondrej/php
PPA this will fix the problem:
apt install php7.0-mbstring php7.0-zip php7.0-xml
(see https://launchpad.net/~ondrej/+archive/ubuntu/php)
Thanks @Alexandre Barbosa for pointing this out!
EDIT 20160423:
One-liner to fix this issue:
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && sudo apt install -y php7.0-mbstring php7.0-zip php7.0-xml
(this will add the ppa noted above and will also make sure you always have the latest php. We use Ondřej's PHP ppa for almost two years now and it's working like charm)
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
1
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
1
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
add a comment |
For all those using Ubuntu with ppa:ondrej/php
PPA this will fix the problem:
apt install php7.0-mbstring php7.0-zip php7.0-xml
(see https://launchpad.net/~ondrej/+archive/ubuntu/php)
Thanks @Alexandre Barbosa for pointing this out!
EDIT 20160423:
One-liner to fix this issue:
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && sudo apt install -y php7.0-mbstring php7.0-zip php7.0-xml
(this will add the ppa noted above and will also make sure you always have the latest php. We use Ondřej's PHP ppa for almost two years now and it's working like charm)
For all those using Ubuntu with ppa:ondrej/php
PPA this will fix the problem:
apt install php7.0-mbstring php7.0-zip php7.0-xml
(see https://launchpad.net/~ondrej/+archive/ubuntu/php)
Thanks @Alexandre Barbosa for pointing this out!
EDIT 20160423:
One-liner to fix this issue:
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && sudo apt install -y php7.0-mbstring php7.0-zip php7.0-xml
(this will add the ppa noted above and will also make sure you always have the latest php. We use Ondřej's PHP ppa for almost two years now and it's working like charm)
edited Jun 25 '17 at 12:10
answered Feb 24 '16 at 22:34
FlatronFlatron
905828
905828
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
1
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
1
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
add a comment |
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
1
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
1
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
Maybe you should add sudo in apt install command aswell.
– nanocv
Feb 1 '17 at 11:26
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
changed first command @nanocv
– Flatron
Feb 1 '17 at 12:09
1
1
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
@nanocv fixed. Thanks for pointing this out.
– Flatron
Mar 20 '17 at 8:53
1
1
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
I'm running PHP 7.1, so I changed references of 7.0 to 7.1 and after a restart it worked.
– Mark Hewitt
Apr 13 '18 at 23:06
add a comment |
For Ubuntu 14.04 with
PHP 7.0.13-1+deb.sury.org~trusty+1 (cli) ( NTS )
sudo apt-get install php-xml
worked for me.
add a comment |
For Ubuntu 14.04 with
PHP 7.0.13-1+deb.sury.org~trusty+1 (cli) ( NTS )
sudo apt-get install php-xml
worked for me.
add a comment |
For Ubuntu 14.04 with
PHP 7.0.13-1+deb.sury.org~trusty+1 (cli) ( NTS )
sudo apt-get install php-xml
worked for me.
For Ubuntu 14.04 with
PHP 7.0.13-1+deb.sury.org~trusty+1 (cli) ( NTS )
sudo apt-get install php-xml
worked for me.
answered Nov 29 '16 at 5:11
Deepak RDeepak R
19029
19029
add a comment |
add a comment |
I'm using Bash on Windows (Ubuntu 16.04) and I just installed with php7.0-xml and all is working now for the Symfony 3.2.7 PHP requirements.
sudo apt-get install php7.0-xml
that did the trick.
– Brad
Jul 28 '17 at 17:06
add a comment |
I'm using Bash on Windows (Ubuntu 16.04) and I just installed with php7.0-xml and all is working now for the Symfony 3.2.7 PHP requirements.
sudo apt-get install php7.0-xml
that did the trick.
– Brad
Jul 28 '17 at 17:06
add a comment |
I'm using Bash on Windows (Ubuntu 16.04) and I just installed with php7.0-xml and all is working now for the Symfony 3.2.7 PHP requirements.
sudo apt-get install php7.0-xml
I'm using Bash on Windows (Ubuntu 16.04) and I just installed with php7.0-xml and all is working now for the Symfony 3.2.7 PHP requirements.
sudo apt-get install php7.0-xml
answered Apr 19 '17 at 19:43
WebLukeWebLuke
11113
11113
that did the trick.
– Brad
Jul 28 '17 at 17:06
add a comment |
that did the trick.
– Brad
Jul 28 '17 at 17:06
that did the trick.
– Brad
Jul 28 '17 at 17:06
that did the trick.
– Brad
Jul 28 '17 at 17:06
add a comment |
For Alpine (in docker), you can use apk add php7-simplexml
.
If that doesn't work for you, you can run apk add --no-cache php7-simplexml
. This is in case you aren't updating the package index first.
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
It's important to make sure that after you install the package on the Alpine container, you should rundocker restart <container_name>
to make these changes work.
– cudacoder
Dec 20 '17 at 15:31
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
1
@ronit tryapk add --no-cache php7-simplexml
. You need the--no-cache
flag if you aren't runningapk update
first.
– brismuth
Mar 6 '18 at 18:22
add a comment |
For Alpine (in docker), you can use apk add php7-simplexml
.
If that doesn't work for you, you can run apk add --no-cache php7-simplexml
. This is in case you aren't updating the package index first.
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
It's important to make sure that after you install the package on the Alpine container, you should rundocker restart <container_name>
to make these changes work.
– cudacoder
Dec 20 '17 at 15:31
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
1
@ronit tryapk add --no-cache php7-simplexml
. You need the--no-cache
flag if you aren't runningapk update
first.
– brismuth
Mar 6 '18 at 18:22
add a comment |
For Alpine (in docker), you can use apk add php7-simplexml
.
If that doesn't work for you, you can run apk add --no-cache php7-simplexml
. This is in case you aren't updating the package index first.
For Alpine (in docker), you can use apk add php7-simplexml
.
If that doesn't work for you, you can run apk add --no-cache php7-simplexml
. This is in case you aren't updating the package index first.
edited Mar 6 '18 at 18:25
answered Aug 8 '17 at 19:02
brismuthbrismuth
17k32336
17k32336
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
It's important to make sure that after you install the package on the Alpine container, you should rundocker restart <container_name>
to make these changes work.
– cudacoder
Dec 20 '17 at 15:31
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
1
@ronit tryapk add --no-cache php7-simplexml
. You need the--no-cache
flag if you aren't runningapk update
first.
– brismuth
Mar 6 '18 at 18:22
add a comment |
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
It's important to make sure that after you install the package on the Alpine container, you should rundocker restart <container_name>
to make these changes work.
– cudacoder
Dec 20 '17 at 15:31
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
1
@ronit tryapk add --no-cache php7-simplexml
. You need the--no-cache
flag if you aren't runningapk update
first.
– brismuth
Mar 6 '18 at 18:22
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
Thanks, this worked for me today! Can confirm this works on Alpine Linux 3.6.2 (Linux kernel 4.4.0-96-generic x86_64)
– eluong
Nov 8 '17 at 20:50
It's important to make sure that after you install the package on the Alpine container, you should run
docker restart <container_name>
to make these changes work.– cudacoder
Dec 20 '17 at 15:31
It's important to make sure that after you install the package on the Alpine container, you should run
docker restart <container_name>
to make these changes work.– cudacoder
Dec 20 '17 at 15:31
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
didnt worked for me...using alpine3.7 in docker...getting php7-simplexml (missing): required by: world[php7-simplexml]
– ronit
Mar 6 '18 at 7:11
1
1
@ronit try
apk add --no-cache php7-simplexml
. You need the --no-cache
flag if you aren't running apk update
first.– brismuth
Mar 6 '18 at 18:22
@ronit try
apk add --no-cache php7-simplexml
. You need the --no-cache
flag if you aren't running apk update
first.– brismuth
Mar 6 '18 at 18:22
add a comment |
------------------in centos-------------------------
find out which package provides php-xml:
yum provides php-xml
then from the output list,select the appropriate one, install
yum install php70u-xml-7.0.14-2.ius.centos7.x86_64
1
This is a good answer because theyum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in theyum install
command.
– Craig Finch
Jun 30 '18 at 19:21
add a comment |
------------------in centos-------------------------
find out which package provides php-xml:
yum provides php-xml
then from the output list,select the appropriate one, install
yum install php70u-xml-7.0.14-2.ius.centos7.x86_64
1
This is a good answer because theyum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in theyum install
command.
– Craig Finch
Jun 30 '18 at 19:21
add a comment |
------------------in centos-------------------------
find out which package provides php-xml:
yum provides php-xml
then from the output list,select the appropriate one, install
yum install php70u-xml-7.0.14-2.ius.centos7.x86_64
------------------in centos-------------------------
find out which package provides php-xml:
yum provides php-xml
then from the output list,select the appropriate one, install
yum install php70u-xml-7.0.14-2.ius.centos7.x86_64
edited Jan 9 '17 at 8:21
answered Jan 9 '17 at 8:09
terwxqianterwxqian
14113
14113
1
This is a good answer because theyum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in theyum install
command.
– Craig Finch
Jun 30 '18 at 19:21
add a comment |
1
This is a good answer because theyum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in theyum install
command.
– Craig Finch
Jun 30 '18 at 19:21
1
1
This is a good answer because the
yum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in the yum install
command.– Craig Finch
Jun 30 '18 at 19:21
This is a good answer because the
yum provides
command will help the user find the correct package for any version of PHP that is installed. It is not necessary to use the full package name in the yum install
command.– Craig Finch
Jun 30 '18 at 19:21
add a comment |
Typically on Debian systems you have different PHP configuration for CLI and for PHP running as say an Apache module. Your phpinfo page may very well show simplexml as being enabled via web server, while it is not enabled via CLI.
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
add a comment |
Typically on Debian systems you have different PHP configuration for CLI and for PHP running as say an Apache module. Your phpinfo page may very well show simplexml as being enabled via web server, while it is not enabled via CLI.
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
add a comment |
Typically on Debian systems you have different PHP configuration for CLI and for PHP running as say an Apache module. Your phpinfo page may very well show simplexml as being enabled via web server, while it is not enabled via CLI.
Typically on Debian systems you have different PHP configuration for CLI and for PHP running as say an Apache module. Your phpinfo page may very well show simplexml as being enabled via web server, while it is not enabled via CLI.
answered Feb 24 '16 at 5:12
Mike BrantMike Brant
60.5k87286
60.5k87286
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
add a comment |
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
@Mike-- thanks, that is true-- however, the module should be enabled by default. As far as I know, I'd need to recompile PHP to enable the module, since you can't enable it in php.ini.
– user101289
Feb 24 '16 at 5:21
add a comment |
Had the same problem on AWS Linux 2, phpinfo() shows SimpleXML installed but not working, below cmd solved my issue
sudo yum install php-xml
add a comment |
Had the same problem on AWS Linux 2, phpinfo() shows SimpleXML installed but not working, below cmd solved my issue
sudo yum install php-xml
add a comment |
Had the same problem on AWS Linux 2, phpinfo() shows SimpleXML installed but not working, below cmd solved my issue
sudo yum install php-xml
Had the same problem on AWS Linux 2, phpinfo() shows SimpleXML installed but not working, below cmd solved my issue
sudo yum install php-xml
answered Nov 21 '18 at 12:01
BluePBlueP
5112
5112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35593521%2fphp-7-simplexml%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
From your screen capture of your
phpinfo()
page, it looks like SimpleXML is only in the "Module Authors" section. Which is only telling you who wrote it; that doesn't mean it's installed or loaded. In fact, if that's the only place it appears inphpinfo()
, I suspect that means it is not installed.– Brendan White
Feb 10 '17 at 21:06
$ php -i | grep simplexml
– Ravshan Abdulaev
Sep 13 '17 at 22:33
use sudo apt-get dist-upgrade
– Bharat Parmar
Sep 28 '17 at 8:19
2
Try restarting php-fpm. sudo systemctl restart php-fpm
– phpd
Oct 18 '18 at 7:19