PHP 7 simpleXML

前端 未结 9 1100
一整个雨季
一整个雨季 2020-12-14 05:19

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:

9条回答
  •  时光说笑
    2020-12-14 05:46

    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)

提交回复
热议问题