Comments (19)
Which version of the IFM do you use? The precompiled version, or do you compile it yourself?
from ifm.
Could this error be triggered by some unusual header or header value?
I guess not. The initialization process of the IFM follows four steps:
- load configuration
- load templates
- load i18n (translations)
- client-side application initialization
The first three steps trigger ajax requests which expect valid JSON answers. Additional headers in the HTTP response should be ignored.
You should be able to test this by opening the browser console and enter
ifm.config
This should display the configuration array.
from ifm.
Which version of the IFM do you use? The precompiled version, or do you compile it yourself?
The compiled one (from this site).
BTW how could I compile it? (I haven't seen information, or I didn't look at the right place).
from ifm.
The compiled one (from this site).
Hm, weird. Which file exactly do you use? I just tested ifm.php
and set auth => 1
and it works.
BTW how could I compile it? (I haven't seen information, or I didn't look at the right place).
You can compile the IFM this way:
$ git clone https://github.com/misterunknown/ifm
$ cd ifm
$ php ./compiler.php --lang=en
Afterwards you find the results in the dist
folder.
from ifm.
Which file exactly do you use?
ifm.php
But only this one! from a previous message, should I understand that I need other folders too? (templates, i18n,..)
To crypt the password I used
htpasswd -n -B admin
from ifm.
No, you only need this single file, and the password generation looks also good.
Can you force reloading the page while having the networking tab in the browser console open? You should see some XHR requests containing JSON objects. Could you validate these objects?
from ifm.
Another method you could use: Just open a browser and go to:
view-source:https://<your_domain_and_path>/ifm.php?api=getTemplates
For example:
view-source:https://ifmdemo.gitea.de/ifm.php?api=getTemplates
The copy the content and check, if this is a valid JSON file (e.g. here).
from ifm.
The XHR POSTs are valid JSONs, containing only
{"status":"ERROR","message":"not authenticated"}
view-source:
produced a HTML source code, not a JSON.
from ifm.
I wonder if it doesn't come from my PHP version, which is 7.4.3 (although that does not explain why without authentication it works smoothly).
Isn't any possibility to have a "debug" mode that writes to Apache's error log?
from ifm.
I have an "educated guess": Do you use an Basic Authentication with your web server additional to setting auth => 1
? This may interfere in 2.6.2. Can you test a self-compiled version?
from ifm.
(BTW: PHP 7.4 should work fine, I tested everything on 7.4.11)
from ifm.
- if I test with a local compiled version, I get the same thing,
- I don't use Basic Authentication here
However, adding some error_log
in the code I noticed that
- the return from
checkCredentials()
is 1, so there's no type error, - there's no HTTP_X_IFM_AUTH variable defined and
session_status()
returns 1
from ifm.
Hi, sorry for the late reply.
The function checkCredentials
should return a boolean value. session_status
should return 2 (which is equal to PHP_SESSION_ACTIVE
), if the session is active.
Could you test it with a private tab in your browser? If this IFM instance is public accessible, you can email me the URL and the credentials, maybe I can work out the problem.
from ifm.
you can email me the URL
What e-mail, please?
from ifm.
Thanks for your mail, I'll take a look at it on Monday.
from ifm.
Ok, I took a look, and I guess the problem is that your webserver sends a different set-cookie
header with every request. This is really weird, since it contains the path /myphp/
, which is not associated with the IFM.
Can you upload this little test script? It can be used to test if a session is persistent.
<?php
session_start();
if (!isset($_SESSION['session_created_at']))
$_SESSION['session_created_at'] = date('r');
echo "<pre>";
print_r($_SESSION);
if (isset($_REQUEST['logout']))
session_destroy();
If you call this script multiple times in your browser, it should initially set the session_created_at
field and echo the same timestamp in all subsequent requests. If that's not the case, then you likely have some webserver configuration you're not aware of.
from ifm.
Yes, it creates a new session each time; I shall look into that to see why.
from ifm.
Yes, that was the problem - you may close this issue now.
Thank you for your help!
from ifm.
Ok, glad you resolved it!
from ifm.
Related Issues (20)
- Drop-down menu empty HOT 1
- Double menus on small screen HOT 3
- Filenames with "#" are not handled correctly HOT 13
- Content-Security-Policy incompatibilities HOT 5
- Overwrite warning even when file doesn't exist HOT 1
- Some files cannot be edited HOT 8
- Picture previews wonβt close HOT 5
- File creation w/ exists filename HOT 1
- RemoteUpload & AjaxRequest HOT 2
- Feature request: custom colours HOT 2
- Doesn't work on raspberry pi HOT 2
- chdir(): No such file or directory (errno 2) in /app/public/files/index.php on line 5926" HOT 2
- Folder upload doesn't work HOT 1
- How to use a non-user owner:group to delete files in a folder HOT 3
- Discussion: Current state HOT 3
- Outdated release (Oct 2020) HOT 1
- Hint on where the configuration is contained HOT 2
- ZipArchive Class Not Found HOT 1
- Directory Access? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ifm.