Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 22. Nov 2024, 00:17

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 30. Sep 2013, 22:07 
Offline

Joined: 27. Sep 2013, 23:01
Posts: 7
Hi there,

I have a new installation of TWG 1.9 where I moved the cache directory off the main directory (I do not want to backup the cache).

my_config.php therefore contains the entry
Code:
$cachedir="../cache";


and an
Code:
Alias /cache/ /srv/www/cache/

entry in the apache configuration.

However, I see error messages such as
Code:
[client aaa.bbb.ccc.ddd] File does not exist: /srv/www/cache/7e8f869c7f1565043222784344024ffc.css, referer: http://my.domain.tld



I assume there's a leftover piece of code that does not respect the cachedir setting? Where may I change this link?

Regards,
Arne


Top
 Profile  
 
PostPosted: 30. Sep 2013, 22:30 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
This is where I create the optimized css which is stored than in the cache dir.
Does the file exist and is not found or not created at all?

What is the setting of $optimize_css?
Try to set this to false and retry and tell me if the error is gone on your system.

Is the cahce and the twg dir than parallel to each other?
And the alias should not be needed.

Best, Michael


Top
 Profile  
 
PostPosted: 2. Oct 2013, 23:08 
Offline

Joined: 27. Sep 2013, 23:01
Posts: 7
Hi Michael,

I did not change $optimized_css - this is still set to "true" in config.php.

The cache directory is located outside the webserver root, i.e. the directory layout is as follows:
/srv/www/htdocs
/srv/www/htdocs/addons
/srv/www/htdocs/admin
[...]
and
/srv/www/cache

Since the new cache directory is outside the website tree (on the same level as "htdocs"), the alias is necessary so that apache finds the files. All thumbnails and some temporary PHP files are correctly generated there, and are found by the gallery. The .css file, however, is created in the old cache directory at /srv/www/htdocs/cache instead of /srv/www/cache - and therefore is not found, because the former is hidden by the Apache alias setting.
If I set $optimize_css to false, it works. It also works if I use another name for the new cache directory, e.g. /srv/www/newcache. In this case, there are effectively two cache directories in use, and it works because the old name is not hidden anymore by the new name. But the optimized css generation code should evaluate the $cachedir setting as the thumbnail generator already does.

BTW, the installation check seems to not respect the $cachedir setting as well. It only reads out the permissions of the "cache" subdirectory within the TWG tree, but not that of the directory referenced by $cachedir.


Regards, Arne


Top
 Profile  
 
PostPosted: 4. Oct 2013, 21:20 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
o.k. I'll try this setup and let you know...

Meanwhile I hope you can live with css not optimized.

Best, Michael


Top
 Profile  
 
PostPosted: 7. Oct 2013, 23:09 
Offline

Joined: 27. Sep 2013, 23:01
Posts: 7
Sure, no problem here. My website does not have that many visitors that I cannot live without optimization.

Thanks for great work!

Arne


Top
 Profile  
 
PostPosted: 19. Nov 2013, 11:53 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I have fixed this in TWG 2.0 which will be released soon...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy