【问题标题】:Installing Yaml in xampp windows在 xampp 窗口中安装 Yaml
【发布时间】:2014-12-08 10:03:42
【问题描述】:

我正在尝试在 XAMPP windows 64 bit

中安装 YAML
  1. http://pecl.php.net/package/yaml/1.1.1/windows下载.dll文件

  2. 在php ini中启用扩展如下

    extension=php_yaml.dll

  3. 重启 Apache

  4. 得到以下错误php启动无法加载动态库

"\xampp\php\ext\php_yaml.dll"

这是正确的方法还是我遗漏了什么?请帮帮我

【问题讨论】:

    标签: php xampp yaml


    【解决方案1】:

    经过大量研究,我终于找到了解决方案

    1. 转到https://github.com/LegendOfMCPE/LoM-CMS/wiki/How-to-Install-LibYAML

    2. 查看以下链接适用于 Windows http://search.4shared.com/postDownload/ComqwjFvce/php_yaml-102-dev-54-vc9-x86.html

    3. 下载该压缩文件

    4. 解压并将yaml.dll放入xampp文件夹中

    5. xampp/php/ext/文件夹内的php_yaml.dll

    6. 在 php.ini 中添加 extension=php_yaml.dll 并重启 apache。可能的话重启系统

    7. 在 php 文件中执行以下行来检查是否加载了扩展

      if (extension_loaded(yaml)) echo "yaml 加载:)";其他
      echo "出了点问题:(";

    【讨论】:

    • 你的第二个链接坏了。
    • 问题是yaml扩展在web模式下加载成功,但是在cli中没有。
    【解决方案2】:

    虽然我检查了所有步骤,但还是有一点我遗漏了:将 PHP 添加到 PATH。因为在 php.ini 中,extension_dir 以相对路径的形式给出,例如 extension_dir=ext

    为了让操作系统找到那个路径,PHP的根路径必须给操作系统。在 Windows 中是通过Right click to This PC -> Features -> Advanced System Settings -> Enviroment Variables

    【讨论】:

      猜你喜欢
      • 2017-09-30
      • 1970-01-01
      • 2015-10-20
      • 1970-01-01
      • 2021-09-30
      • 2016-10-30
      • 2019-02-14
      • 2017-05-10
      • 1970-01-01
      相关资源
      最近更新 更多