install php_yaml on wamp with php7.4
Posted by: webchris (---.2.247.pool.telefonica.de)
Date: November 15, 2020 09:37PM

I've installed php_yaml (https://pecl.php.net/package/yaml/2.1.0) in C:\wamp64\bin\php\php7.4.9\ext my

php.ini entry is: extension=php_yaml

The php error log is:
Failed to load c:/wamp64/bin/php/php7.4.9/ext/php_yaml

Why?

yaml works fine with the minor versions.

Re: install php_yaml on wamp with php7.4
Posted by: maximus23 (---.dynamic.voo.be)
Date: November 16, 2020 10:48AM

Hi,

For WampServer the yaml is a PHP extension, so should be referenced with
a extension line in a php.ini file.

The yaml must be for the correct operating system, match the
PHP version, and for whether PHP is built as Thread-Safe (TS).

Important: respect the dll versions for php.

Download yaml for Windows php_yaml-2.1.0-7.4-ts-vc15-x64.zip (64 bits) or php_yaml-2.1.0-7.4-ts-vc15-x32.zip(32 Bits).

Exemple for PHP 7.4.11 :

Unpack "php_yaml.dll" to C:\wamp64\bin\php\php7.4.11\ext\php_yaml.dll

Go phpForApache.ini:

Add At the End:

[yaml]
extension ="C:/wamp64/bin/php/php7.4.11/ext/php_yaml.dll"
;for no timestamp parsing
;yaml.decode_timestamp=0
;for strtotime parsing
;yaml.decode_timestamp=1
;for date_create parsing
yaml.decode_timestamp=2

;for no binary decoding
;yaml.decode_binary=0
;for base64 binary decoding
yaml.decode_binary=1

;for no serialized object parsing
;yaml.decode_php=0
;for no serialized object parsing
yaml.decode_php=1

Restart wampServer.

Check a phpinfo page Section "yaml".



Edited 3 time(s). Last edit at 11/16/2020 10:51AM by maximus23.

Re: install php_yaml on wamp with php7.4
Posted by: Otomatic (Moderator)
Date: November 16, 2020 01:52PM

Hi,

@maximus23

Thanks but...

> extension ="C:/wamp64/bin/php/php7.4.11/ext/php_yaml.dll"

In order for this extension to be managed in the same way as the other extensions, it is highly preferable not to put this line but to add the line:
extension=yaml
under the line
extension=xml
of the phpForApache.ini file of the PHP version used.

And, instead of restarting Wampserver, we can use:
Right-Click -> Refresh

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: install php_yaml on wamp with php7.4
Posted by: webchris (---.2.247.pool.telefonica.de)
Date: November 16, 2020 04:09PM

Thanks, i've put the code you provided and it works now, Yeah!!!

Sorry, only registered users may post in this forum.