Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add yaml parser to php.ini file

Tags:

php

yaml

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?

like image 489
NewUser Avatar asked May 09 '12 15:05

NewUser


2 Answers

I got that.

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

like image 62
NewUser Avatar answered Sep 24 '22 01:09

NewUser


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
like image 34
Karl Krogmann Avatar answered Sep 25 '22 01:09

Karl Krogmann