Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: HTML white tree!

17 Nov 2014, 13:14

mjau-mjau wrote:(...)
Basically your mod_rewrite is not setup or working correctly, and this would explain previous issues also ...
I have contacted my hosting provider.

Thanks Karl!
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: HTML white tree!

19 Nov 2014, 10:13

They answer to me this:
"FilesMatch" directive is not supported by ideaWebServer. Please use "Files" instead.

Example, block access to all files, except jpg | gif | png:

<Files ~ "\.*">
Order allow,deny
Deny from all
</Files>

AllowOverride All
<Files ~ "\.(jpg|gif|png)">
Order allow,deny
Allow from all
</Files>

We did not find any problems with the the mod_rewrite module.
I have changed all "FilesMatch" to "Files" in the .htaccess file, but the problem still exists.
I don't know what should I think about... :roll:

The one more thing is that the IE10 shows just a blank page (same with your demo)

The newest version of X3, with a "diag" folder is on my server right now.
http://phillip.com.pl/x3/

EDIT:

All the images renders just fine if I remove these lines from .htaccess:
Code
# Prevent access to various folders with exceptions
RewriteCond %{REQUEST_URI} !app/parsers/slir/ [NC]
RewriteRule (app|templates|extensions|scss|javascript-source) - [NC,F]
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

19 Nov 2014, 11:02

Arthur, we had another user @morgenius with seemingly an identical problem. He checked his server error logs and came across this:
Code
[Tue Nov 18 13:09:27 2014] [error] [client 37.60.208.56] SoftException in Application.cpp:249: File "/home/www/z101617/htdocs/app/parsers/slir/index.php" is writeable by group, referer: http://morgunov.ru/galleries/landscapes/
For some reason, his server refused to transact with the slir image resizer when it was writeable. He then proceeded to set permissions 755 on the app/ folder and specific file /app/parsers/slir/index.php, and it solved his problem entirely.
morgenius wrote:Karl. I've decided my problem by setting permissions of App folder to 755. It was 777
:)
Everything is fine now.
Try it?
Artur wrote:They answer to me this:
"FilesMatch" directive is not supported by ideaWebServer. Please use "Files" instead.
Ok, but that is not related to any problems. The "filesmatch" rules in the htaccess are only used for minor fixes that only apply for very specific scenarios, and can be removed entirely if you want to. Furthermore, these rules are from the famous html5-boilerplate htaccess, and I never heard of a platform that doesn't support them.
Artur wrote:I have changed all "FilesMatch" to "Files" in the .htaccess file, but the problem still exists.
The "FilesMatch" is not the problem.
Artur wrote:All the images renders just fine if I remove these lines from .htaccess:
Code
# Prevent access to various folders with exceptions
RewriteCond %{REQUEST_URI} !app/parsers/slir/ [NC]
RewriteRule (app|templates|extensions|scss|javascript-source) - [NC,F]
Hmmm ... I would like to see that ... But try my suggestion above first!
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: HTML white tree!

19 Nov 2014, 11:21

mjau-mjau wrote: Try it?
Checked. No difference (I've checked different combinations of permissions)
mjau-mjau wrote: The "FilesMatch" is not the problem.
I thought so. But I just wanted to make sure of everything :)
mjau-mjau wrote: Hmmm ... I would like to see that ... But try my suggestion above first!
So, I just commented out these lines in .htaccess, you can check it now.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

19 Nov 2014, 12:25

Artur wrote:So, I just commented out these lines in .htaccess, you can check it now.
Yep, works flawlessly it seems. The lines you commented out are basically just added security precautions, and could remain commented out without any problems. I am not quite sure why it breaks specifically on your server, but if you don't mind, can you try a few things for me:

First, try to change those two lines of code to the following:
Code
RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (app|templates|extensions) - [NC,F]
If the above fails, simply change the code to the following, which should work regardless:
Code
RewriteRule (templates|extensions) - [NC,F]
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

19 Nov 2014, 12:30

Sorry, I may have mixed things up ... Can you try these two combinations:
Code
RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (app|templates|extensions) - [NC,F]
Code
# RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (app|templates|extensions) - [NC,F]
If all above fails:
Code
# RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (templates|extensions) - [NC,F]
It looks like your server is choking on the %{REQUEST_FILENAME} and %{REQUEST_URI} for some reason ...
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: HTML white tree!

19 Nov 2014, 12:59

Code
RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (app|templates|extensions) - [NC,F]
Code
# RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (templates|extensions) - [NC,F]
These above works. The one below doesn't:
Code
# RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (app|templates|extensions) - [NC,F]

Well... I've never had a single issue with that server (about 4 years), So it had to happen, a first issue.

Thanks Karl!

PS. As far as I know, there are folks using imagevue on that server. Home.pl is one of the best and most known hostings in Poland :wink: .
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

19 Nov 2014, 13:12

Artur wrote:
Code
RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (app|templates|extensions) - [NC,F]
...
These above works.
If that one above works, great! Keep that one then ... I will likely make it default. I was expecting only the one with BOTH top lines commented out to work, because it basically disables the feature. Strange how interchanging %{REQUEST_URI} with %{REQUEST_FILENAME} makes it work on your server!
Artur wrote:Well... I've never had a single issue with that server (about 4 years), So it had to happen, a first issue.
I am no expert with this stuff, and I wouldn't be able say anything negative about your server ... Could be these are smart and updated security implementations! What I don't like, is outdated servers running very old PHP versions, missing standard modules and deprecated safe_mode enabled.

Glad we solved it!
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: HTML white tree!

19 Nov 2014, 15:12

mjau-mjau wrote:Glad we solved it!
Too hurry :(

Any photo containing "app", "templates" or "extensions" in name, won't load :twisted:

I've uploaded file named "apple.jpg" and couldn't figure out why this one won't show up in the gallery.
The same with file named "mytemplatesphoto.jpg" and so on...

So, I guess we still need for the REQUEST_URI instead of REQUEST_FILENAME here.

I'll contact my hosting provider and figure out what's happened to this thing!
And for now I would just stick with this:
Code
# RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir [NC]
RewriteRule (templates|extensions) - [NC,F]
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

19 Nov 2014, 23:01

To be honest, it's not really worth the trouble ... These rules were made when I was trying to make a perfect htaccess file, although its not at the core of my expertise. The only thing these lines do, is prevent access from the web to folders in X3 that are only used natively by the PHP application. However, it does not really offer much security, as the PHP files within these folders can't run standalone anyway, and even if they could, it wouldn't be a problem.

I will ask around a bit, but technically you can just comment out the related lines.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

19 Nov 2014, 23:30

This should do the trick:
Code
RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
RewriteRule ^(app|templates|extensions)/ - [NC,F]
Now it only blocks access to paths that ^startwith, and are directories/ ....
 
User avatar
BjoernG
Posts: 21
Joined: 31 Mar 2014, 02:32

Re: HTML white tree!

20 Dec 2014, 11:29

I have the same white tree with beta 0.8 on a freebsd 9.2 with an apache 2.4 / php 5.5 :shock:


Just got all "green" on the check website http://x3.gosswiler.com/check/ but there is still an issue with mod_deflate.

I configured it as I found here http://www.freebsdmadeeasy.com/tutorial ... eflate.php

Im just wundering maybe there is an other problem because on the top of the check Site I got this two notice:
Code
Notice: Undefined index: HTTP_MOD_DEFLATE in /usr/local/www/x3/check/index.php on line 915

Notice: Undefined index: HTTP_MOD_DEFLATE in /usr/local/www/x3/check/index.php on line 916
any advice?


Regards Bjoern
Bjoern / gosswiler.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13399
Joined: 30 Sep 2006, 03:37

Re: HTML white tree!

20 Dec 2014, 11:58

The "notice" you are referring to in check-page is not important, but it does not seem your deflate is working ... Have you restarted apache?

Your CSS does not compress https://d.pr/i/189kK
http://x3.gosswiler.com/public/css/imag ... efault.css

If deflate was working, it would look like this: https://d.pr/i/kAzS
(see huge difference in compressed data size)

Furthermore, this would lead to the CSSGZ file to be corrupted ... In your case, the file starts to download as if its not recognized in MIME types. This is another not entirely related issue, so you should focus on getting compression working first.
https://www.photo.gallery/demo/x3/public/css ... ault.cssgz
http://x3.gosswiler.com/public/css/imag ... ault.cssgz

Unfortunately, our abilities of diagnosing private servers is a bit limited.

File compression is not strictly required to run X3, and we could have a setting to ignore compression. However, that would almost be like having an option "allow driving with brakes on". Compression makes the main CSS+JS X3 files load at 170kb instead of 660kb ... It will also compress all the html page outputs ...