core icon indicating copy to clipboard operation
core copied to clipboard

Upgrading filesystem cache AND PHP Fatal error: Call to a member function getId() on a non-object in

Open deplonix opened this issue 13 years ago • 14 comments

This message is endless after upgrade to 5.0. In addition apache2's error.log full of "PHP Fatal error: Call to a member function getId() on a non-object in ..." errors.

Can someone help how to solve it on Ubuntu server 12.04 x64?

deplonix avatar Mar 17 '13 20:03 deplonix

Please use the issue template. Attach the log so we can see what line number the error comes from.

MTGap avatar Mar 17 '13 20:03 MTGap

line number is 121. Sorry, I just clicked on a New Issue. Is it wrong?

deplonix avatar Mar 17 '13 20:03 deplonix

Record from apache error.log looks like:

[Sun Mar 17 20:31:47 2013] [error] [client 1.1.1.1] PHP Fatal error: Call to a member function getId() on a non-object in /.../owncloud/lib/files/cache/upgrade.php on line 121, referer: http://.../cloud/index.php/apps/files

ip number and server name are replaced and omitted.

deplonix avatar Mar 17 '13 20:03 deplonix

The contribution guidelines along with the template are at the top of new issue: https://github.com/owncloud/core/blob/master/issue_template.md

MTGap avatar Mar 17 '13 20:03 MTGap

Are you sure you don't have this same issue #2355

Do you have files_archives enabled?

MTGap avatar Mar 17 '13 20:03 MTGap

"Archive support" is disabled in Apps. But files_archive directory exists in owncloud/apps/files_archive.

deplonix avatar Mar 17 '13 20:03 deplonix

issue #2355 is about ubuntu 10.04 and I don't have any problem with "\OC\Files\Filesystem::resolvePath"

deplonix avatar Mar 17 '13 20:03 deplonix

If you read the comments there you'll realize the original poster's issue has nothing to do with Ubuntu 10.04. Your error is occurring at the same point, see the first line of the poster's log.

Since you don't have files_archives enabled, there might be another bad storage backend. Do you have external storage enabled?

MTGap avatar Mar 17 '13 21:03 MTGap

No, I don't have any external storage. The storage itself (owncloud/data) is on another hard drive mounted at /mnt/sdb1/owncloud/data (I am not sure if it is important). But I haven't had any problems with oc 4.x. Problem appeared only after upgrade to 5.0. I solved the first problem with "maintenance=true". But cannot find a solution for the current problem - I can see only "Upgrading filesystem cache ..." after logon and no files.

deplonix avatar Mar 17 '13 21:03 deplonix

Apply this pull request #2384 please and attach the owncloud log. There will be additional information about which files are failing.

MTGap avatar Mar 17 '13 21:03 MTGap

I did patch. But where is "owncloud log"?

deplonix avatar Mar 17 '13 21:03 deplonix

In the data directory.

MTGap avatar Mar 17 '13 21:03 MTGap

Thanks.

$ tail owncloud.log

{"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555248} {"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555248} {"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555248} {"app":"PHP","message":"Undefined index: size at /.../owncloud/lib/helper.php#804","level":2,"time":1363555248} {"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555248} {"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555248} {"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555248} {"app":"PHP","message":"call_user_func() expects parameter 1 to be a valid callback, class '\OC\Files\Storage\Shared' not found at /.../owncloud/lib/hook.php#72","level":2,"time":1363555249} {"app":"PHP","message":"call_user_func() expects parameter 1 to be a valid callback, class '\OC\Files\Storage\Shared' not found at /.../owncloud/lib/hook.php#72","level":2,"time":1363555249} {"app":"core","message":"storage backend \OC\Files\Storage\Local not found","level":3,"time":1363555249}

Does it help?

deplonix avatar Mar 17 '13 21:03 deplonix

Well then, it appears you have the same issue that users of Ubuntu 10.04 had: #2309 #2006

You'll need to upgrade PHP.

MTGap avatar Mar 17 '13 21:03 MTGap