douque9815 2018-01-16 16:54
浏览 95

getenv(“ANYSTRING”)导致内部服务器错误

For some reason getenv("ANYSTRING") is causing an internal server error. getenv() without any arguments returns an array of environment variables as expected. I am running PHP 7.1.13 x86 Thread Safe using mod_fcgid on Apache Lounge VC15 2.4.27 (Win32) in Windows 10 x64.

I cannot simply use getenv() as this code is part of the composer framework and therefore I would rather not modify it (in EventDispatcher.php).

It appears that this is related to Bug #75794 and #75761, as adding the second parameter (local_only) to true resolves the crash, whereas setting this parameter to false or omitting it entirely causes the crash to reoccur.

Anyone have any thoughts on how to get around this issue?

  • 写回答

1条回答 默认 最新

  • duanluwei9374 2018-01-16 18:35
    关注

    It appears that this is related to Bug #75794 and #75761, as adding the second parameter (local_only) to true resolves the crash, whereas setting this parameter to false or omitting it entirely causes the crash to reoccur.

    To fix the issue, use the patch here and rebuild your version of php, or use a different version of PHP altogether (7.0.x or 7.2.x).

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起