View previous topic :: View next topic |
Author |
Message |
bluestreak101 -
Joined: 13 Mar 2008 Posts: 7
|
Posted: Fri Mar 14, 2008 9:33 am Post subject: PHP script File Thingie |
|
|
Hey guys,
I found this script called File Thingie some time again here:
http://www.solitude.dk/filethingie/
I was using the older version for sometime but when I upgraded Abyss and this script it now no longer functions the way it should.
When I try to log in, it takes the username and password ok, but returns page cannot be displayed, and i refresh it and its fine... I have spoken with the guy that made the script and as he has not used Abyss before he doesnt know what the problem is but thinks it something to do with the redirects
Quote: | Where I think it's failing is in the redirects. File Thingie makes
extensive use of HTTP redirects. Search the source for redirect() and you
can see all the times it's redirecting. Basically there's a redirect every
time an operation is finished. - Andreas |
Any ideas? |
|
Back to top |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Sat Mar 15, 2008 8:38 am Post subject: |
|
|
Usually, PHP redirects are done with a header command...
ex.
echo header("location:http://.com");
Issue here very well could be that you're having some output prior to this command.
For example:
echo "Wait while we redirect you";
echo header("location:lolol");
This won't work. Because the script is attempting to modify headers before they were closed, and the body portion was open. Make sure that there isn't anywhere like this, or replace it with a meta redirect. _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Sun Mar 16, 2008 7:21 pm Post subject: |
|
|
I tried this script out too.
What it does is redirect you to https://your-site.com
I don't have a https site, so I kept getting "server not found" messages.
So I edited the code and took out three or so lines.
But I log in with proper credentials, and it points me right back to the login page. No errors, just will never log in. Very strange! _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
bluestreak101 -
Joined: 13 Mar 2008 Posts: 7
|
Posted: Wed Mar 19, 2008 11:03 am Post subject: |
|
|
Ok, I looked in the code for references to https and found on lines 271 - 274 it points to https like you said, instead of deleting it I just changed it to http and now it appears to work fine :-)
So im happy!
Heres the piece of code I edited:
Code: | $protocol = 'http://';
if (!empty($_SERVER['HTTP'])) {
if (!empty($_SERVER['HTTP']) || strtolower($_SERVER['HTTP']) == 'off') {
$protocol = 'http://'; |
That seems to make it work, the other way i would assume to get this to work would be to get abyss to accept the HTTPS protocol incoming, would also make it a little more secure. |
|
Back to top |
|
|
|