NewUser
NewUser

Reputation: 13323

Add yaml parser to php.ini file

I want to know how to add Yaml parser to php.ini in Ubuntu 12.04.I had made changes in the php.ini files like "extension=yaml.so" but still its not working.So can somebody help me here?

Upvotes: 8

Views: 31773

Answers (2)

Karl Krogmann
Karl Krogmann

Reputation: 41

Actually, what you have to do for PHP extension installation is something like the following:

$ sudo apt-get install php-dev php-pear libyaml-dev
$ sudo pecl install yamL
$ sudo sh -c "echo 'extension=yaml.so' >> /etc/php5/mods-available/yaml.ini"
$ sudo php5enmod yaml

Cheers, Karl at Phase3.io

Update

To install yaml by pecl for php7, do:

$ sudo pecl install yaml-2.0.0 && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini

Upvotes: 4

NewUser
NewUser

Reputation: 13323

I got that.

I had to write extension=yaml.so without any quotes in my php.ini files.

Upvotes: 5

Related Questions