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.

Options: ReplyQuote
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.

Options: ReplyQuote
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

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46a - PHP 8.0.0…5.6.40 - MySQL 5.7.32 - MariaDB 10.5.8
Wampserver 3.2.4 64 bit - Apache 2.4.46a - PHP 8.0.0…5.6.40 - MySQL 5.7.32/8.0.22 - MariaDB 10.5.8
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
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!!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.