Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install YAML extension on WAMP?

Tags:

php

yaml

wamp

My environment is this:

Windows 7 64bit
Wamp 2.4
PHP 5.4.12

I have enabled the extension in the php.ini files at both locations viz. PHP and Apache:

extension=yaml.so

But yaml_parse is still shown as undefined.

Any advice on how to get YAML working on Wamp?

like image 732
Rutwick Gangurde Avatar asked Oct 20 '22 07:10

Rutwick Gangurde


1 Answers

I have managed to solve this by following some hints from @Loenix.

You have to do as follows:

  1. Download the corresponding php_yaml.dll from the official website. PHP under WAMP is threaded (https://pecl.php.net/package/yaml)

  2. Extract the php_yaml.dll file and copy it to the following directory:

C:\wamp64\bin\php\php\ext

  1. Add the following text (without quotes) "extension=php_yaml.dll" in (and this is important) phpForApache.ini located in the C:\wamp64\bin\php\php\ directory

  2. Right click on the WAMP tray icon and click Refresh

For me, step 3 was the trick since I was editing the php.ini file in the /bin/php/php directory, which seems to not be taken into consideration.

Hope this helps!

like image 71
Sun Avatar answered Oct 23 '22 02:10

Sun