PHP 7 simpleXML












59















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:



enter image description here



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









share|improve this question


















  • 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











  • $ 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
















59















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:



enter image description here



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









share|improve this question


















  • 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











  • $ 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














59












59








59


8






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:



enter image description here



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









share|improve this question














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:



enter image description here



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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 24 '16 at 4:51









user101289user101289

4,13074483




4,13074483








  • 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











  • $ 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





    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













  • 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












8 Answers
8






active

oldest

votes


















83














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.






share|improve this answer





















  • 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



















55














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)






share|improve this answer


























  • 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



















14














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.






share|improve this answer































    11














    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





    share|improve this answer
























    • that did the trick.

      – Brad
      Jul 28 '17 at 17:06



















    10














    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.






    share|improve this answer


























    • 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











    • 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 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



















    8














    ------------------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





    share|improve this answer





















    • 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





















    2














    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.






    share|improve this answer
























    • @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



















    0














    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





    share|improve this answer























      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
      });


      }
      });














      draft saved

      draft discarded


















      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









      83














      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.






      share|improve this answer





















      • 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
















      83














      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.






      share|improve this answer





















      • 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














      83












      83








      83







      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.






      share|improve this answer















      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.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      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














      • 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













      55














      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)






      share|improve this answer


























      • 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
















      55














      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)






      share|improve this answer


























      • 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














      55












      55








      55







      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)






      share|improve this answer















      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)







      share|improve this answer














      share|improve this answer



      share|improve this answer








      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



















      • 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











      14














      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.






      share|improve this answer




























        14














        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.






        share|improve this answer


























          14












          14








          14







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 29 '16 at 5:11









          Deepak RDeepak R

          19029




          19029























              11














              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





              share|improve this answer
























              • that did the trick.

                – Brad
                Jul 28 '17 at 17:06
















              11














              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





              share|improve this answer
























              • that did the trick.

                – Brad
                Jul 28 '17 at 17:06














              11












              11








              11







              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





              share|improve this answer













              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






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 19 '17 at 19:43









              WebLukeWebLuke

              11113




              11113













              • 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





              that did the trick.

              – Brad
              Jul 28 '17 at 17:06











              10














              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.






              share|improve this answer


























              • 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











              • 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 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
















              10














              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.






              share|improve this answer


























              • 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











              • 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 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














              10












              10








              10







              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.






              share|improve this answer















              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.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              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 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






              • 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



















              • 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











              • 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 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

















              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











              8














              ------------------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





              share|improve this answer





















              • 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


















              8














              ------------------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





              share|improve this answer





















              • 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
















              8












              8








              8







              ------------------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





              share|improve this answer















              ------------------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






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 9 '17 at 8:21

























              answered Jan 9 '17 at 8:09









              terwxqianterwxqian

              14113




              14113








              • 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
















              • 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










              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













              2














              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.






              share|improve this answer
























              • @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
















              2














              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.






              share|improve this answer
























              • @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














              2












              2








              2







              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.






              share|improve this answer













              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.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              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



















              • @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











              0














              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





              share|improve this answer




























                0














                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





                share|improve this answer


























                  0












                  0








                  0







                  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





                  share|improve this answer













                  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






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 21 '18 at 12:01









                  BluePBlueP

                  5112




                  5112






























                      draft saved

                      draft discarded




















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      鏡平學校

                      ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

                      Why https connections are so slow when debugging (stepping over) in Java?