Search code examples
phpyaml

Error - Call to undefined function yaml_parse_file()


My friend has used yaml in a shared project. I tried to follow her instructions but got stuck at:

Fatal error: Call to undefined function yaml_parse_file() in /var/www/html/cdn/map_of_site.php on line 8

So I thought that I should install the Yaml library (which I think I did correctly). I also added the Yaml parser in the php.ini But the error continues to appear.

The worst part is that I won't be able to get in touch with her for a couple of days (and I kind of dislike telling her that I don't know how to make her code work).

Could you please tell me in general what is required to make a project that uses yaml_parse_file() function work? Like what should I install or where to install it ...

PS: I work with Linux mint and the project is PHP


Solution

  • It turned out I hadn't installed yaml correctly. This article and the instructions that linux itself gives (<3) helped me solve it:

    https://code.google.com/p/php-yaml/wiki/InstallingWithPecl