gboudreau / Greyhole

Greyhole uses Samba to create a storage pool of all your available hard drives, and allows you to create redundant copies of the files you store.
http://www.greyhole.net
GNU General Public License v3.0
259 stars 34 forks source link

2 php warnings #96

Closed cptjhmiller closed 10 years ago

cptjhmiller commented 10 years ago

I have done a new install on OMV (Debian squeeze) and I thought all was working until I checked the logs, I keep getting

PHP Warning [2]: Invalid argument supplied for foreach() and PHP Warning [2]: mb_strpos(): Empty delimiter

No metadata is written for any new files nor is any exsisting file updated, I tried to change the tags on some mp3 files but the new tags never save.

Oct 28 09:49:11 HOMESERVER Greyhole[22567]: Oct 28 09:49:11 6 write: Now working on task ID 69468: write NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4160576]
Oct 28 09:49:11 HOMESERVER Greyhole[22567]: Oct 28 09:49:11 6 write: File changed: NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4161296]
Oct 28 09:49:11 HOMESERVER Greyhole[22567]: Oct 28 09:49:11 4 write: PHP Warning [2]: mb_strpos(): Empty delimiter in /usr/bin/greyhole on line 6257; BT: greyhole[L2886] execute_next_task() => greyhole[L3232] gh_write(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,69468) => greyhole[L3787] gh_write_process_metafiles(1,array (),NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,/media/ae17113f-d82f-4c67-9e59-5ea9fcb05f63/.greyhole/NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,123124329,69468) => greyhole[L3865] create_metafiles(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,1,123124329,array ()) => greyhole[L4158] order_target_drives(120238.60253906,,NAS,Videos/Tv/American Dad!/Season 08,  ) => greyhole[L4981] gh_wild_mb_strpos(NAS/Videos/Tv/American Dad!/Season 08,) => greyhole[L6257] mb_strpos(NAS/Videos/Tv/American Dad!/Season 08,) [4183088]
Oct 28 09:49:11 HOMESERVER Greyhole[22567]: Oct 28 09:49:11 6 write: Now working on task ID 69469: write NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4160576]
Oct 28 09:49:11 HOMESERVER Greyhole[22567]: Oct 28 09:49:11 6 write: File changed: NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4161304]

Oct 28 09:49:11 HOMESERVER Greyhole[22567]: Oct 28 09:49:11 4 write: PHP Warning [2]: mb_strpos(): Empty delimiter in /usr/bin/greyhole on line 6257; BT: greyhole[L2886] execute_next_task() => greyhole[L3232] gh_write(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,69469) => greyhole[L3787] gh_write_process_metafiles(1,array (),NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,/media/ae17113f-d82f-4c67-9e59-5ea9fcb05f63/.greyhole/NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,123124329,69469) => greyhole[L3865] create_metafiles(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,1,123124329,array ()) => greyhole[L4158] order_target_drives(120238.60253906,,NAS,Videos/Tv/American Dad!/Season 08,  ) => greyhole[L4981] gh_wild_mb_strpos(NAS/Videos/Tv/American Dad!/Season 08,) => greyhole[L6257] mb_strpos(NAS/Videos/Tv/American Dad!/Season 08,) [4182704]
Oct 28 09:49:14 HOMESERVER Greyhole[22567]: Oct 28 09:49:14 6 write: Now working on task ID 69470: write NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4160392]
Oct 28 09:49:14 HOMESERVER Greyhole[22567]: Oct 28 09:49:14 6 write: File changed: NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4161312]
Oct 28 09:49:14 HOMESERVER Greyhole[22567]: Oct 28 09:49:14 4 write: PHP Warning [2]: Invalid argument supplied for foreach() in /usr/bin/greyhole on line 3793; BT: greyhole[L2886] execute_next_task() => greyhole[L3232] gh_write(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,69470) [4176304]

Oct 28 09:59:14 HOMESERVER Greyhole[22567]: Oct 28 09:59:14 6 write: Now working on task ID 69472: write NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4160568]
Oct 28 09:59:14 HOMESERVER Greyhole[22567]: Oct 28 09:59:14 6 write: File changed: NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4161312]
Oct 28 09:59:14 HOMESERVER Greyhole[22567]: Oct 28 09:59:14 4 write: PHP Warning [2]: Invalid argument supplied for foreach() in /usr/bin/greyhole on line 3793; BT: greyhole[L2886] execute_next_task() => greyhole[L3232] gh_write(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,69472) [4176016]
Oct 28 09:59:14 HOMESERVER Greyhole[22567]: Oct 28 09:59:14 6 write: Now working on task ID 69471: write NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4160944]
Oct 28 09:59:14 HOMESERVER Greyhole[22567]: Oct 28 09:59:14 6 write: File changed: NAS/Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4 [4161872]
Oct 28 09:59:14 HOMESERVER Greyhole[22567]: Oct 28 09:59:14 4 write: PHP Warning [2]: Invalid argument supplied for foreach() in /usr/bin/greyhole on line 3793; BT: greyhole[L2886] execute_next_task() => greyhole[L3232] gh_write(NAS,Videos/Tv/American Dad!/Season 08/American Dad! - S08E18 - Toy Whorey.mp4,69471) [4176480]

Any thing you can think of that be be wrong?

Thanks Miller

gboudreau commented 10 years ago

Make sure the log level is set to DEBUG in greyhole.conf Restart the Greyhole service, try to edit a file, then see https://github.com/gboudreau/Greyhole/wiki/GetHelp > Gather system information.

cptjhmiller commented 10 years ago

Thanks for taking the time to help me out. I added in a

gh_log(DEBUG, "new_metafiles = $new_metafiles");

before the foreach call to see what was there but it always returns empty

In case its important, here are the permissions for a greyhole folder.

drwxrwxrwx 7 root     root   115 Oct 27 17:13 .
drwxrwxrwx 3 root     root    22 Feb 15  2012 ..
drwxrwxrwx 7 jhmiller users   77 Jan 19  2013 BACKUP
drwxrwxr-x 4 jhmiller users   29 Oct 27 17:19 .gh_metastore
drwxrwxrwx 4 root     root    29 Oct 27 17:19 .gh_metastore_backup
-rw-rw-rw- 1 root     root  1530 Oct 28 14:00 .gh_settings.bak
drwxrwxrwx 4 root     root    29 Oct 14 13:03 .gh_trash
drwxrwxrwx 6 jhmiller users   66 Nov  4  2012 NAS

http://sprunge.us/AbfY

gboudreau commented 10 years ago

Sorry, the system_info.sh script was missing the greyhole.err log output; can you re-run it? Make sure to change a file just before you do.

cptjhmiller commented 10 years ago

Sorry about that, i had changed various config options to see if i could find out what was going wrong.

http://sprunge.us/bZMh

gboudreau commented 10 years ago

OK. Can't see what would be wrong. If possible, I'd like to access your server remotely. If you can, remote SSH access with a sudo-enabled user would work, or we can do a TeamViewer session, or whatever your prefer. Contact me in private at guillaume@greyhole.net to continue. Thanks.

gboudreau commented 10 years ago

Warnings were due to an empty sticky_files = line in greyhole.conf, I think.