Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php run出错: Failed opening required '\/home\/xxx\/freenom\/resources\/lang\/zh_CN:zh.php' #34

Closed
hadwinwen opened this issue Jan 24, 2022 · 6 comments

Comments

@hadwinwen
Copy link

php run无法执行
php run程序无法顺利执行

重现步骤

  1. 不使用docker
  2. 按照README文档直接clone代码到本机
  3. 修改完.env配置文件
  4. 并添加进crontab中进行测试,出现程序出错

截图&日志

$cat freenom_crontab.log
[2022-01-24 21:58:22] {"type":64,"message":"require(): Failed opening required '\/home\/had\/freenom\/resources\/lang\/zh_CN:zh.php' (include_path='.:\/usr\/share\/php')","file":"\/home\/had\/freenom\/libs\/Lang.php","line":22}

你做了哪些尝试

  • 修改.env配置文件,将zh环境改成en,出错信息一样和上面一样.
$cat freenom_crontab.log
[2022-01-24 21:58:22] {"type":64,"message":"require(): Failed opening required '\/home\/had\/freenom\/resources\/lang\/zh_CN:zh.php' (include_path='.:\/usr\/share\/php')","file":"\/home\/had\/freenom\/libs\/Lang.php","line":22}
  • 进入目录, 手动执行php run, 出错信息依然一样
$ php run 
[2022-01-24 21:58:22] {"type":64,"message":"require(): Failed opening required '\/home\/had\/freenom\/resources\/lang\/zh_CN:zh.php' (include_path='.:\/usr\/share\/php')","file":"\/home\/had\/freenom\/libs\/Lang.php","line":22} 

环境信息

  • kali-rolling x64
  • 内核: Linux world 5.15.0-kali2-amd64 有没有批量改dns的脚本 #1 SMP Debian 5.15.5-2kali2 (2021-12-22) x86_64 GNU/Linux
  • PHP 7.4.26
  • freenom续期脚本版本 v0.2.2
@luolongfei
Copy link
Owner

程序版本是多少?

@hadwinwen
Copy link
Author

hadwinwen commented Jan 24, 2022

程序版本是多少?

今天晚上刚刚clone下来的,查看.env文件,为:
ENV_FILE_VERSION='v2.2'

@luolongfei
Copy link
Owner

程序版本是多少?

今天晚上刚刚clone下来的,查看.env文件,为: ENV_FILE_VERSION='v2.2'

这个是 .env 文件的版本。刚刚拉取的话,应该是最新版。你之前有成功跑起来过吗?另外,你的 .env 文件中,LANGUAGE的值设置的是“zh_CN:zh”?

@hadwinwen
Copy link
Author

hadwinwen commented Jan 25, 2022

程序版本是多少?

今天晚上刚刚clone下来的,查看.env文件,为: ENV_FILE_VERSION='v2.2'

这个是 .env 文件的版本。刚刚拉取的话,应该是最新版。你之前有成功跑起来过吗?另外,你的 .env 文件中,LANGUAGE的值设置的是“zh_CN:zh”?

我以前没使用过这个程序, 昨天第一次使用. .env文件中LANGUAGE的值是zh, 尝试过修改为en (不是en_US:en), 出错信息一样

$ grep LANGUAGE .env 
LANGUAGE=zh

这个配置是否需要修改成:zh_CN:zh?
尝试修改完后:

$ grep LANGUAGE .env                                                                                                                                     
LANGUAGE="zh_CN:zh"
$ php run                                                                                                                                             
[2022-01-25 13:57:57] {"type":64,"message":"require(): Failed opening required '\/home\/had\/freenom\/resources\/lang\/zh_CN:zh.php' (include_path='.:\/usr\/share\/php')","file":"\/home\/had\/freenom\/libs\/Lang.php","line":22}

由于在本机上无法正常运行,我把程序放到vps中运行,vps的系统为centos,倒是没问题.
centos没问题,于是我又尝试在debian 11中进行尝试,debian11中也是正常运行.
kali无法正常运行,我想是kali系统对于debian进行过优化导致? 其他系统可以正常运行,我close了吧

@luolongfei
Copy link
Owner

可能是 kali 系统路径问题或者文件夹权限问题。我手边没有 kali 系统,不方便重现,先直接部署到其它系统上或者直接通过 docker 吧

@luolongfei
Copy link
Owner

另外的用户出现了同样的问题,调查结果是这样的:#109 (comment)

刚刚更新的版本里对应了这种情况。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants