core icon indicating copy to clipboard operation
core copied to clipboard

Undefined index: id and mimetype

Open andredasilvapinto opened this issue 14 years ago • 26 comments

I'm getting this on Apache's error.log (it's not shown on the browser):

PHP Notice:  Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373

I can use the webpage regardless.

Environment: HomeServer - Ubuntu 12.10 Server: Apache/2.2.22 (Ubuntu) Database: MySQL Ver 14.14 Distrib 5.5.28, for debian-linux-gnu Client: OwnCloud Sync Client 1.1.2 (Windows XP) OwnCloud: 4.5.3 PHP: 5.4.6-1ubuntu1

andredasilvapinto avatar Nov 28 '12 15:11 andredasilvapinto

Do you know what led to it? Does those messages always occur?

blizzz avatar Nov 28 '12 16:11 blizzz

I have just installed the 4.5.3 version from the opensuse repository yesterday and it's been reporting these errors since then.

And yes, it is printing those 3 messages (there is another mimetype error on line 359) every time:

[Wed Nov 28 16:25:57 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:25:57 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
[Wed Nov 28 16:25:59 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
[Wed Nov 28 16:25:59 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:25:59 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
[Wed Nov 28 16:26:23 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
[Wed Nov 28 16:26:23 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:26:23 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
[Wed Nov 28 16:26:25 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
[Wed Nov 28 16:26:26 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:26:26 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373

andredasilvapinto avatar Nov 28 '12 16:11 andredasilvapinto

Same problem here:

[Thu Nov 29 09:29:11 2012] [error] [client 79.7.229.94] PHP Notice:  Undefined index: mimetype in /var/www/cloud/lib/filecache.php on line 359

I have this error only opening a shared directory from the browser

Ubuntu 12.04 Postgresql 9.1 Client Sync 1.1.2 (Windows/Mac) OwnCloud: 4.5.3

cnccld avatar Nov 29 '12 08:11 cnccld

@MTGap @schiesbn might be related to files sharing, could you have a look?

blizzz avatar Nov 29 '12 18:11 blizzz

With owncloud 5 pre alpha there isn't the problem.

cnccld avatar Nov 29 '12 19:11 cnccld

Until now I'm not able to reproduce this errors. Did you upgrade ownCloud from a previous version or was it a fresh installation?

I just had a quick look at the code and it seems like all "undefined index" errors come from lines introduced by this commit: https://github.com/owncloud/core/commit/3e20032a322f4f97931eca7fbad3416d4b5fb6c4

@icewind1991 do you have any idea what could cause this errors?

schiessle avatar Nov 29 '12 20:11 schiessle

I had a prior version installed but I have removed the folders (web and data) and dropped the database (MySQL) before installing the new version from the opensuse repository:

http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud

andredasilvapinto avatar Nov 29 '12 20:11 andredasilvapinto

Here has the similar problem. Fresh installation on version 4.5.3 on centos 5 php: 5.3.17 mysql: 5.5.21

My scenario: user1 with folder: ProjectA shared to user2 with create permission

user2 logged in and try to upload file to Shared/ProjectA/ The upload progress bar is shown and file will be appeared, however, checking the web server log and following Error message was shown [Fri Nov 30 16:47:36 2012] [error] [client 192.168.1.81] PHP Notice: Undefined index: mimetype in /var/www/owncloud/apps/files/ajax/upload.php on line 56, referer: http://owncloud/?app=files&dir=%2FShared%2FProjectA [Fri Nov 30 16:47:36 2012] [error] [client 192.168.1.81] PHP Notice: Undefined index: size in /var/www/owncloud/apps/files/ajax/upload.php on line 56, referer: http://owncloud/?app=files&dir=%2FShared%2FProjectA

Once clicked the ProjectA folder, the uploaded file will be disappear. Also, there is no file created in data store.

Hope this information will help.

haluwong avatar Nov 30 '12 08:11 haluwong

I now tried it with a complete new 4.5.3 installation and still can't reproduce it (but I'm using the tar file provided at owncloud.org, not the opensuse packages) . Are you using the web interface or the sync client? Please make sure that the "create" permission is set on the shared folder.

schiessle avatar Nov 30 '12 11:11 schiessle

Finally I was able to reproduce at least some of the error messages, those in line 359.

The error in line 359 happen because the file versions are added to our file cache. If this is true than it might be fixed once https://github.com/owncloud/core/issues/327 is backported to stable45.

Can you disable the "Versions" app and check if the error messages still appear? Since I can't reproduce the other errors messages this would be helpful to isolate the problem.

schiessle avatar Nov 30 '12 14:11 schiessle

I'm still getting the errors on line 371 and 373, but it looks like the error on 359 disappears after disabling Versions:

[Fri Nov 30 21:47:13 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Fri Nov 30 21:47:13 2012] [error] [client x.x.x.x] PHP Notice:  Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373

andredasilvapinto avatar Nov 30 '12 21:11 andredasilvapinto

I just wanted to give a little background on a similar issue we are having. We were running into issues with a zip folder running on the client sync and kept getting PHP Warning: ZipArchive::locateName(): Invalid or unitialized Zip object in /var/www/html/owncloud/lib/archive/zip.php on line 141 log entries. We disabled the Archive support feature and immediately started getting the undefined mimetype and undefined id entries on lines 371, 373, and 359.

brandonmj avatar Dec 01 '12 00:12 brandonmj

this issue is duplicated as #661. We are using a clean install from gentoo, which downloads the tar directly from owncloud. For us it is causing #648, forever spinners on uploads. If I simply return from the increaseSize functions(increaseSize:355) the forever spinners go away.

mleklund avatar Dec 03 '12 15:12 mleklund

Please try ownCloud 4.5.4 and report back if the problem still exists

schiessle avatar Dec 04 '12 12:12 schiessle

At least the error on line 371 and 373 still happens (when uploading with the desktop client):

[Tue Dec 04 23:46:56 2012] [error] [client x.x.x.x] PHP Notice:  Undefined
 index: id in /var/www/owncloud/lib/filecache.php on line 371
[Tue Dec 04 23:46:56 2012] [error] [client x.x.x.x] PHP Notice:  Undefined
 index: mimetype in /var/www/owncloud/lib/filecache.php on line 373

It seems that I'm not getting the error on line 359 anymore though.

andredasilvapinto avatar Dec 04 '12 23:12 andredasilvapinto

fixed undefined indexes for me with 4.5.4 but I still have the forever spinning upload. #648

mleklund avatar Dec 04 '12 23:12 mleklund

Finally I was able to reproduce the other error messages too. All of them should be fixed once this pull request is merged: https://github.com/owncloud/core/pull/710

schiessle avatar Dec 05 '12 12:12 schiessle

reproduce thix bug too

PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359

owncloud version 4.5.4

Joni-Lover avatar Dec 07 '12 13:12 Joni-Lover

the bug fix is not yet released but prepared for the next bug fix release.

schiessle avatar Dec 07 '12 15:12 schiessle

Any update on this? I am running OC 4.5.6 and still see the dreaded "PHP Notice: Undefined index: mimetype in /var/www/html/discovirt/lib/filecache.php on line 362"

gufete avatar Feb 18 '13 09:02 gufete