[Owncloud] Gallery app not working in 4.5.1 ?

peter at chubb.wattle.id.au peter at chubb.wattle.id.au
Fri Oct 26 10:38:26 UTC 2012




I can see all my pictures as thumbnails, but clicking on one to see it
larger says `The requested content cannot be loaded. Please try again
later.

The apache error log says:

[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/owncloud/apps/gallery/lib/photo.php:105) in /var/www/owncloud/lib/image.php on line 164, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP Stack trace:, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP   1. {main}() /var/www/owncloud/index.php:0, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP   2. OC::handleRequest() /var/www/owncloud/index.php:28, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP   3. OC::loadAppScriptFile() /var/www/owncloud/lib/base.php:458, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP   4. require_once() /var/www/owncloud/lib/base.php:473, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP   5. OC_Image->show() /var/www/owncloud/apps/gallery/ajax/viewImage.php:31, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F
[Fri Oct 26 21:13:25 2012] [error] [client 2001:388:d000:800:224:d7ff:feaf:390] PHP   6. header() /var/www/owncloud/lib/image.php:164, referer: https://my.domain.name/owncloud/?app=gallery&root=%2FPhotos%2F2012-1020%2F


This patch fixes things.  I don;t think you need save_dir when you're
not making thumbnails.





--- owncloud/apps/gallery/lib/photo.php~	2012-10-24 16:29:16.000000000 +0000
++
+ owncloud/apps/gallery/lib/photo.php	2012-10-26 10:24:37.750140033 +0000
@@ -101,9 +101,9 @@
 	public static function getViewImage($image_name, $owner = null) {
 		if (!$owner) $owner = OCP\USER::getUser();
 		$view_file = OC_Filesystem::getLocalFile($image_name);
-		if (!is_dir($save_dir)) {
-			mkdir($save_dir, 0777, true);
-		}
+//		if (!is_dir($save_dir)) {
+//			mkdir($save_dir, 0777, true);
+//		}
 		if (file_exists($view_file)) {
 			$image = new OC_Image($view_file);
 		} else {



More information about the Owncloud mailing list