Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP5 how to add simplexml?

Tags:

php

xml

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 ?

like image 732
user6618536 Avatar asked Dec 24 '22 19:12

user6618536


2 Answers

Install:

apt-get install php-xml

Check:

php -m | grep xml

Restart:

service php5-fpm restart
like image 133
Sahil Gulati Avatar answered Dec 26 '22 15:12

Sahil Gulati


Run this command in ubuntu.

sudo apt-get install php5.6-xml
like image 43
nipunasudha Avatar answered Dec 26 '22 16:12

nipunasudha