Bug 217225 - www/nextcloud shipping with config.php which causes certain httpd/fcgi confgurations to throw errors
Summary: www/nextcloud shipping with config.php which causes certain httpd/fcgi confgu...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-19 11:15 UTC by Daniel Ebdrup Jensen
Modified: 2017-03-05 13:47 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (loic.blot)


Attachments
pkg-plist: do not copy sample configuration (379 bytes, patch)
2017-02-19 17:44 UTC, Kalten
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Ebdrup Jensen freebsd_committer 2017-02-19 11:15:44 UTC
I'm filing this bug after a brief discussion with maintainer on IRC on the topic of nextcloud shipping with a config.php which throws the following error upon accessing index.php:

2017/02/18 23:56:08 [error] 82852#101771: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getLogger() on null in /usr/local/www/nextcloud/index.php:61
Stack trace:
#0 {main}
  thrown in /usr/local/www/nextcloud/index.php on line 61" while reading response header from upstream, client: 192.168.1.114, server: 192.168.1.53, request: "GET /index.php/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.53"

The issue is, however, fixed simply by deleting the included config.php file provided by upstream, which could be done for the port if the file matches the checksum from upstream (so as to avoid any issues with packaging). That way, whenever a user points a httpd to the nextcloud directory, they're presented with the nextcloud installation wizard.

I believe maintainer is already working on a fix, so this bug is just to serve as a reminder/reference for which bug it fixes.
Comment 1 Kalten 2017-02-19 17:44:36 UTC
Created attachment 180147 [details]
pkg-plist: do not copy sample configuration

If I understand that right:
Currently the port installs a sample configuration file by copying
config/config.sample.php to config/config.php

As you mentioned: that should not be the case (the last Parameter in the
sample even tells us not to do so).
> * This entry is just here to show a warning in case somebody copied the sample
> * configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION!
> […] 
> 'copied_sample_config' => true,
but no warning is shown on the website :-(
(You might want to mention this to the maintainer)

See patch on how to stop this the easiest way, I think.

Regards,
 Kalten
Comment 2 commit-hook freebsd_committer 2017-03-05 13:31:32 UTC
A commit references this bug:

Author: brnrd
Date: Sun Mar  5 13:30:32 UTC 2017
New revision: 435474
URL: https://svnweb.freebsd.org/changeset/ports/435474

Log:
  www/nextcloud: Update to 11.0.2

   - Update to 11.0.2
   - "Stability and security improvements"
   - Do not install config.php (as noted in config.php) [1]

  PR:		217225 [1], 217388
  Reported by:	"D. Ebdrup" <debdrup@gmail.com> [1]

Changes:
  head/www/nextcloud/Makefile
  head/www/nextcloud/distinfo
  head/www/nextcloud/pkg-plist