[Owncloud] Gallery lighttpd

Victor Dubiniuk victor.dubiniuk at gmail.com
Fri May 25 16:41:48 UTC 2012


I've just realized that it wouldn't work for windows environment anyway.
In order to work everywhere the regular expression should be

  $thumbnail = preg_replace('/[^\\'. DIRECTORY_SEPARATOR .']*$/', '',
OC::$CONFIG_DATADIRECTORY) . 'gallery'. DIRECTORY_SEPARATOR
 .urldecode($albumname).'.png';

---
Victor Dubiniuk

El 25/05/2012 18:15, "Victor Dubiniuk" <victor.dubiniuk at gmail.com> escribió:

>
> Hi Christophe,
>>
>> please change the file  *apps/gallery/ajax/galleryOp.php*
>> You need to replace the line #45
>>   $thumbnail =
>> OC::$CONFIG_DATADIRECTORY.'/../gallery/'.urldecode($albumname).'.png';
>>
>> with
>>
>>   $thumbnail = preg_replace('|[^/]*$|', '', OC::$CONFIG_DATADIRECTORY) .
>> 'gallery'. DIRECTORY_SEPARATOR  . urldecode($albumname).'.png';
>>
>>
>> It would be nice if you open a bug on this issue since this line affects
>> Windows ownCloud installations as well.
>>
>>
>> ----
>> Victor Dubiniuk
>>
>>
>> On Fri, May 25, 2012 at 5:55 PM, Christophe M <meumeu1402 at gmail.com>wrote:
>>
>>> Using owncloud 4 with lighttpd has an issue with gallery :
>>>
>>> Thumbnails are empty ...
>>>
>>> Lighttpd logs give me that :
>>>
>>> *2012-05-24 21:47:43: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Warning:
>>>  exif_imagetype(/var/www/owncloud/data/test/files/../gallery/Photos.png):
>>> failed to open stream: No such file or directory in
>>> /var/www/owncloud/lib/image.php on line 57*
>>> *
>>> *
>>> *PHP Warning:
>>>  fopen(/var/www/owncloud/data/test/files/../gallery/Photos.png): failed to
>>> open stream: No such file or directory in
>>> /var/www/owncloud/lib/response.php on line 150*
>>>
>>> File is present :
>>>
>>> *-rw-r--r-- 1 www-data www-data 246614 May 25 15:45
>>> /var/www/owncloud/data/test/files/../gallery/Photos.png*
>>> *
>>> *
>>> *Ideas ?*
>>>
>>> --
>>> ----------------------------------------------------
>>>
>>> Un poing levé, une main tendue
>>>
>>>
>>> _______________________________________________
>>> Owncloud mailing list
>>> Owncloud at kde.org
>>> https://mail.kde.org/mailman/listinfo/owncloud
>>>
>>>
>>
>> _______________________________________________
>> Owncloud mailing list
>> Owncloud at kde.org
>> https://mail.kde.org/mailman/listinfo/owncloud
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20120525/99b65d38/attachment.html>


More information about the Owncloud mailing list