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

Public upload: Call to a member function getQuota() on null in lib/private/util.php on line 289 #24751

Closed
nightillusions opened this issue May 20, 2016 · 8 comments · Fixed by #25652

Comments

@nightillusions
Copy link

Steps to reproduce

  1. Allow public uploads in administrator options
  2. Share a folder as link with "Allow editing"
  3. Browse to shared link
  4. Try to upload a file

Expected behaviour

Files successfully uploaded.

Actual behaviour

Upload error message:
"Fehler beim Hochladen: "xyz.pdf": Internal Server Error

Server configuration

Operating system:
Debian Jessie
Web server:
nginx
Database:
mysql Ver 14.14 Distrib 5.5.49
PHP version:
PHP 5.6.20-0+deb8u1 (cli)
ownCloud version: (see ownCloud admin page)
ownCloud 9.0.2 (stable)
Updated from an older ownCloud or fresh install:
Updated from 9.0
Where did you install ownCloud from:
owncloud.org
Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - comments: 0.2
  - dav: 0.1.6
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - files_external
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "ocm7tfuygjh0",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.wdj.ac"
        ],
        "datadirectory": "\/media\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/cloud.wdj.ac",
        "dbtype": "mysql",
        "version": "9.0.2.2",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "quota_include_external_storage": true,
        "asset-pipeline.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_from_address": "hello",
        "mail_smtpmode": "php",
        "mail_domain": "wdj.ac",
        "loglevel": 1,
        "theme": "",
        "maintenance": false
    }
}

Are you using external storage, if yes which one:
cifs
Are you using encryption:
no
Are you using an external user-backend, if yes which one: no

Logs

Web server error log

2016/05/20 20:12:16 [error] 718#718: *20042 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to a member function getQuota() on null in /var/www/owncloud/lib/private/util.php on line 289" while reading response header from upstream, client: XXXXXX, server: cloud.wdj.ac, request: "POST /index.php/apps/files/ajax/upload.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/cloud.wdj.ac.sock:", host: "cloud.wdj.ac"

ownCloud log (data/owncloud.log)

nothing abut this

Browser log

console log
POST https://cloud.wdj.ac/index.php/apps/files/ajax/upload.php 500 (Internal Server Error)
@nickvergessen
Copy link
Contributor

I can see how the error could come up code-wise, but I can not reproduce the issue locally.

@nightillusions
Copy link
Author

@nickvergessen okay what informations do you need?
My first thought was the datadirectory, because its an external mounted storage ("Storage Box"). On the other hand there are no problems with permissions an ownership.

@tridoan
Copy link

tridoan commented Jul 14, 2016

I too am having this same issue, same reproduce steps as original post. Let me know if you need more info, but i think everything in the post is pretty much what i followed.

Edit: im not using external storage

@alcor231
Copy link

alcor231 commented Jul 27, 2016

I have not exactly the same, but I a very similar and (I believe) related issue.
I have shared folders and files between users, and while the original owner of a file/folder can upload files, the user that the files/folders have been shared with can't.
I am (seemingly randomly, but I'm not 100% sure on that yet) either an "Internal Server Error" or an error message saying "Insufficient Storage", with both users being far from their limit and more than 1 TB of HDD space available on the server.

I then tried to set the storage space limit of the original owner of a shared folder to unlimited, and now the user that the folder was shared to was suddenly able to upload files to that shared folder again.
As I'm just running a small server that is almost only for my personal use I can use this as a workaround, however this leads me to believe that there might be some sort of bug in the quota feature. (I tried re-setting a quota after setting it to unlimited and the bug re-appeared)

I have recently updated to OC 9.1, but I'm not sure if the problem started with the update (I suppose it could also be a database issue in that case?) or if it was unrelated to the update.

@nightillusions
Copy link
Author

I also recently updated to 9.1, but even with the "unlimited" workaround the same error occurs.

@alcor231
Copy link

alcor231 commented Jul 29, 2016

Do you get this issue with public uploads only or also with files and folders shared between users?

I noticed that I apparently only experience problems when uploading via webdav (including the sync client) - if I am uploading something to (publicly or between users) shared folders via the browser I have no problems.
So maybe these are two different (but maybe related?) issues after all.

DeepDiver1975 added a commit that referenced this issue Jul 29, 2016

Verified

This commit was signed with the committer’s verified signature.
DeepDiver1975 Thomas Müller
@DeepDiver1975 DeepDiver1975 added this to the 9.2 milestone Jul 29, 2016
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label needs info is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants