2017-10-05 10:46
浏览 180


in my PHP.ini file, I have this: allow_url_fopen = On

it appears that is how to enable fsockopen() But is that accurate?

Because my API is saying invalid key, when I have verified it is accurate, the people that gave me the key, said typically it is because the host has disabled fsockopen(), they also told me to whitelist some IP addresses of theirs for fsockopen(), how/where do I do that? is it in PHP.ini?

I have Cpanel which has the MultiPHP INI editor... so I checked in there and allow_url_fopen is set to On

But I don't see fsockopen() so I'm not sure if that is how to enable it or not.

Thanks, -Rich

图片转代码服务由CSDN问答提供 功能建议


我有: nallow_url_fopen = On < p>看起来是如何启用fsockopen() 但是这样准确吗?

因为我的API说无效密钥,当我验证它是准确的时,给我的人 关键,通常是因为主机已禁用fsockopen(),他们还告诉我将他们的一些IP地址列入白名单fsockopen(),我该怎么做/在哪里做? 它是在PHP.ini中吗?

我有Cpanel,它有MultiPHP INI编辑器......所以我在那里签到并且allow_url_fopen设置为On < p>但我没有看到fsockopen()所以我不确定这是否是如何启用它。

谢谢, -Rich

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongwubao4785 2017-10-05 11:08

    Yes that is the way to enable it but PHP config has various levels.

    If you are on shared hosting it is possible that you are using a php.ini in your user folder but this function has been disabled by the host at the core config level. If this is the case you need to speak with your hosting provider.

    You can easily check if it is enabled by viewing phpinfo

    <?php phpinfo();

    Put this in a file on your server and access the page in a browser.

    打赏 评论

相关推荐 更多相似问题