VPS侦探论坛

 找回密码
 注册
查看: 1528|回复: 5

freshrss 安装在 lnmp 环境出错

[复制链接]
发表于 2023-1-21 22:13:23 | 显示全部楼层 |阅读模式

首先祝大家新年好!本人在使用lnmp 1.9配置的环境,安装 freshrss 中遇到了问题不知道如何解决。我使用的是 php 8.1.7 版本,freshrss 1.20.2 。
nignx 配置信息:文件
安装参考文章: https://blog.nicky1605.com/install-lnmp-for-freshrss.html 安装了 fileinfo 模块。
目前进入网址: FreshRSS 会跳转 /i 文件夹(仅如下两个文件),理论上会进入初始化设置 freshrss,但是返回 HTTP ERROR 500 错误。

请教解决办法!谢谢

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-1-21 22:14:37 | 显示全部楼层


nignx 配置信息:[文件](https://raw.githubusercontent.com/SkysCrystal/Figurebed/master/files/freshrss.conf)
安装参考文章: https://blog.nicky1605.com/install-lnmp-for-freshrss.html 安装了 fileinfo 模块。
目前进入网址: [FreshRss](https://rss.swin.tk) 会跳转 `/i` (仅如下两个文件),理论上会进入初始化设置 freshrss,但是返回 `HTTP ERROR 500` 错误。
![i文件夹目录]()
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2023-1-22 19:01:48 | 显示全部楼层

php error

  1. [22-Jan-2023 18:59:28] WARNING: [pool www] child 594248 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function openlog() in /home/wwwroot/rss.swin.tk/lib/lib_rss.php:23"
  2. [22-Jan-2023 18:59:28] WARNING: [pool www] child 594248 said into stderr: "Stack trace:"
  3. [22-Jan-2023 18:59:28] WARNING: [pool www] child 594248 said into stderr: "#0 /home/wwwroot/rss.swin.tk/p/i/index.php(24): require()"
  4. [22-Jan-2023 18:59:28] WARNING: [pool www] child 594248 said into stderr: "#1 {main}"
  5. [22-Jan-2023 18:59:28] WARNING: [pool www] child 594248 said into stderr: "  thrown in /home/wwwroot/rss.swin.tk/lib/lib_rss.php on line 23"
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-1-22 21:10:56 | 显示全部楼层




openlog()函数被禁用了,需要解除禁用。
问题已解决
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-1-23 09:24:42 | 显示全部楼层

如果大于1GB内存的话lnmp 1.9上会自动安装fileinfo模块,没安装的 ./addons.sh install fileinfo 安装就可以
500错误的话需要按常见问题开启php错误日志才能获得具体原因

可能原因:
1、如果你是用lnmp vhost add 创建的话肯定会产生防跨目录设置,p结尾的目录如果是添加域名时添加的,你这个p目录相当于其他框架类的public目录,是需要禁用掉fastcgi.conf部分的防跨目录设置并修改.user.ini或完全禁用掉
另外如果p结尾的目录后修改的除了防跨目录设置的问题后期ssl续期还会无法续期

2、
NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function openlog() in /home/wwwroot/rss.swin.tk/lib/lib_rss.php:23

FreshRSS需要使用openlog 和 syslog 函数,需要将禁用函数里面的openlog 和 syslog 删除掉,常见问题里面有教程

以上操作完成均需要重启nginx\php-fpm

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2023-1-24 22:05:25 | 显示全部楼层

licess 发表于 2023-1-23 09:24
如果大于1GB内存的话lnmp 1.9上会自动安装fileinfo模块,没安装的 ./addons.sh install fileinfo 安装就可 ...

感谢您的回复!
我使用 lnmp1.9/tools/remove_open_basedir_restriction.sh 删除了对应域名的防跨(此操作不知道会不会影响其他vhost的防跨,我对防跨没有啥概念
并在  /usr/local/php/etc/php.ini 文件中取消了 两个函数的禁用
关于 ssl ,我是后修改的 server root, 现在重新添加 ssl。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-7-27 08:08 , Processed in 0.026971 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表