Search…

X3 Photo Gallery Support Forums

Search…
 
mrSLK
Topic Author
Posts: 16
Joined: 10 Sep 2016, 00:25

User Access - Blank Page

13 Dec 2018, 23:18

Hi Mjau-mjau, 

I have an intranet web using photo.gallery for our internal use.

but I'm having issue with user access, the user i created only see Blank white page when login, the super admin user is working just fine
Any ideas why it's not working ? 
I'm link the diagnostic page print-out - https://ioo.ovh/rqE6a

Thank You
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: User Access - Blank Page

14 Dec 2018, 00:51

If I was able to test this from a website, I could probably diagnose the issue. Just seeing your server diagnostics doesn't help unfortunately.

You could open browser Developer Tools > Console, and see if you are getting any errors.

I did encounter an X3 user who's server did not support server vars $_SERVER['PHP_AUTH_USER'], which is required for HTTP authentication with PHP to work properly. Below is the email I forwarded to him after diagnosing:

--

Ok, here’s the deal. Your server simply isn’t setup correctly to support basic http-auth.
http://php.net/manual/en/features.http-auth.php

I added the default example, identical from the documentation page above:
[link removed]
Code
if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="My Realm"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Text to send if user hits Cancel button';
    exit;
} else {
    echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
    echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
Just for reference, what is happening, is that it is correctly opening the login prompt (first condition), but after it sends, the values are not saved. The value $_SERVER['PHP_AUTH_USER’] remains EMPTY, and therefore the login prompt LOOPS.

There are lots of reports about this issue on that happens on SOME servers. Below links are links to the suggested solutions.
https://stackoverflow.com/a/22554102/3040364
https://stackoverflow.com/a/20983271/3040364
https://stackoverflow.com/a/22554024/3040364
https://stackoverflow.com/a/19497858/3040364

However, X3 ALREADY has implemented all the above solutions into the .htaccess file AND the X3 auth PHP application, because we had a few users with this issue. However, on your server, nothing works.

Just for reference, in .htaccess we already have the following fixes (which solve the issue on other servers with the same problem, and which are mentioned in the support topics above):
Code
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
In the X3 auth.inc.php, we also have ALL recommended fixes in case of extreme scenarios:
https://d.pr/i/qhNrF4

Unfortunately, this server simply is not entirely setup to standards in regards to basic http auth. Unless some server admin or your hosting “support” can suggest how to get basic http authentication working. As is, this server simply does not support it, not in X3, not in another application that uses http-auth.

Unfortunately, I cannot offer any fix for this, or any more suggestions, as it is specifically related to your server only.

There is one suggestion in the link below you might try, if you can edit apache config file:
http://php.net/manual/en/features.http-auth.php#114877
 
mrSLK
Topic Author
Posts: 16
Joined: 10 Sep 2016, 00:25

Re: User Access - Blank Page

14 Dec 2018, 10:10

Wow Thanks Karl, I will start tinkering with the Apache settings, I admit my server deployment is bit unusual, but i'll figure it out and report back to you for the solution that works for me.

Thanks again for the support :)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: User Access - Blank Page

14 Dec 2018, 11:15

It's strange though if it works for "superuser", and if your user is getting a "blank" page, I'm not sure that's related to the explanations in my previous post. If $_SERVER['PHP_AUTH_USER'] was not working on your server, user would normally be caught in an endless login-loop, and it wouldn't work for super user either. Could be something cache-related? I would like to open browser Developer tools > Network tab and see the response headers of the blank page that loads after login.

Sorry, but it's difficult to diagnose with access.