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

openlog error after update to php 8.1 #5053

Closed
tobip opened this issue Jan 29, 2023 · 9 comments · Fixed by #5054
Closed

openlog error after update to php 8.1 #5053

tobip opened this issue Jan 29, 2023 · 9 comments · Fixed by #5054
Labels
Duplicate ‼ Support Support users to use FreshRSS
Milestone

Comments

@tobip
Copy link

tobip commented Jan 29, 2023

Describe the bug
I upgraded php version from 7.2 to 8.1. After this the freshrss page breaks, showing this error in my server log:

mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined function openlog() in freshrss/lib/lib_rss.php:23
mod_fcgid: stderr: Stack trace:
mod_fcgid: stderr: #0 freshrss/p/index.php(3): require()
mod_fcgid: stderr: #1 {main}
mod_fcgid: stderr:   thrown in freshrss/lib/lib_rss.php on line 23

Expected behavior

Environment information (please complete the following information):

  • Device: pc
  • OS: Manjaro
  • Browser: Chrome, Firefox
  • FreshRSS version: 1.20.2
  • Database version: mysql
  • PHP version: 7.2 / 8.1
  • Installation type: shared hosting

Additional context
Downgrade of php back to version 7.x solves the problem.

@Frenzie
Copy link
Member

Frenzie commented Jan 29, 2023 via email

@Alkarex
Copy link
Member

Alkarex commented Jan 29, 2023

Similar issue: #5027

@math-GH math-GH added Duplicate ‼ Support Support users to use FreshRSS labels Jan 29, 2023
@tobip
Copy link
Author

tobip commented Jan 29, 2023

True, openlog and syslog are disabled in my php.ini and as far as I can tell I am not allowed to enable them.
Is there a workaround from the freshrss side of view to get it running without the need of these functions?

@Alkarex
Copy link
Member

Alkarex commented Jan 29, 2023

It would require a patch to implement a workaround for systems without syslog, which we do not have at the moment

@Alkarex
Copy link
Member

Alkarex commented Jan 29, 2023

For PHP 8+, the workaround would be easy to implement https://php.watch/versions/8.0/disable_functions-redeclare

@Alkarex Alkarex added this to the 1.21.0 milestone Jan 29, 2023
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Jan 29, 2023
@Alkarex
Copy link
Member

Alkarex commented Jan 29, 2023

@tobip Could you please try this patch? #5054

@tobip
Copy link
Author

tobip commented Jan 30, 2023

Awesome! It works under php 8.1, although I get following message in my logs:

[fcgid:warn] mod_fcgid: stderr: PHP Warning:  syslog() has been disabled for security reasons in freshrss/lib/SimplePie/SimplePie.php on line 1727
[fcgid:warn] mod_fcgid: stderr: PHP Fatal error:  Cannot redeclare syslog() in freshrss/lib/lib_rss.php on line 24

@Alkarex
Copy link
Member

Alkarex commented Jan 30, 2023

@tobip Are you sure those warning/error logs are when running your PHP 8.1?

@tobip
Copy link
Author

tobip commented Jan 30, 2023

Whops sorry, I think those errors were still there from when I was running php 7.
Everything seems to be fine.

Alkarex added a commit that referenced this issue Jan 30, 2023
* Workaround disabled openlog syslog
#fix #5053
#fix #5027

* COPY_SYSLOG_TO_STDERR

* Better return

* Simplify openlog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate ‼ Support Support users to use FreshRSS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants