user6618536
user6618536

Reputation: 207

PHP5 how to add simplexml?

When i check my phpinfo , it displays like below and i have to use simplexml, but getting ;

"Fatal error: Call to undefined function simplexml_load_file() in..."

message.

disable-xml' '--disable-simplexml' '--disable-dom' '--disable-libxml' '--disable-xmlreader' '--disable-xmlwriter' '--disable-debug'

How can i enable simplexml ?

Upvotes: 4

Views: 14363

Answers (3)

nipunasudha
nipunasudha

Reputation: 2607

Run this command in ubuntu.

sudo apt-get install php5.6-xml

Upvotes: 2

ferry
ferry

Reputation: 64

You must recompile your php source code and enable all of the related XML plugin.

Like this:

./configure --prefix=/usr/local/php --enable-xml --enable-simplexm --enable-libxml  //and so on...

Upvotes: 1

Sahil Gulati
Sahil Gulati

Reputation: 15141

Install:

apt-get install php-xml

Check:

php -m | grep xml

Restart:

service php5-fpm restart

Upvotes: 7

Related Questions