SimplePortal

Support => English Support => Topic started by: ncoded on December 02, 2015, 09:15:36 PM

Title: login fails with incomplete login string
Post by: ncoded on December 02, 2015, 09:15:36 PM
My problem is extremely similar to the one posted here
http://simpleportal.net/index.php?topic=11813.msg60052#msg60052

My forum is set up with no Guest access, so initially everyone lands on the login page. Upon trying to log in, the URL is missing the index.php? part and a generic Not Found error is thrown. Funny now, if I go Back and hit the Login button again, I go in to the Forum page with flying colors!

So I unchecked the "Disable Portal Redirection" box and now the login seems to be OK.

While working on this issue, I looked at the parsing of the SP 2.3.6 for SMF 2.0.11 and found inconsistencies between the parsed code and what the code actually looks in the index.php. Could that be the cause of my troubles?

While for the time being the forum is set up to lead to the portal, eventually I need the other option functional (login take user to forum), too.

At this moment Coppermine is uninstalled and so is the SMF Responsive mod. Running as plain vanilla as I can.

Is there anything I can do on my end to repair this?
Title: Re: login fails with incomplete login string
Post by: ♦ Ninja ZX-10RR ♦ on December 03, 2015, 04:33:54 AM
Hi ncoded, thanks for supporting us in the first place, we greatly appreciate it!

While working on this issue, I looked at the parsing of the SP 2.3.6 for SMF 2.0.11 and found inconsistencies between the parsed code and what the code actually looks in the index.php. Could that be the cause of my troubles?
Yes, there are 99% chances that is being the problem. However, there are a few counter questions for you - Did you have any errors while installing the latest SimplePortal version? If so (which is most likely true), why did you carry on with the installation? :/ There should be errors in your error log, too.

As of now what you could do would be uninstalling SimplePortal and reinstalling it, however it probably won't work, so you will need to post what fails and most likely attach the files that have failed tests in them, so that we can have a look.

Regards
Title: Re: login fails with incomplete login string
Post by: ncoded on December 03, 2015, 11:11:15 AM
A little bit of background info:

(1) I am working on a custom theme, where 99.9% of the changes are to the looks (.css files) - I believe the only exception is that I replaced a titlebg with a catbg in search.template.php In its current state, my theme is ok-ish as long as I do not run it with the SMF Responsive mod.
(2) I uninstalled SP and suddenly my login went good, which is what made me think some issue with SP is my problem. Then I reinstalled SP and the login issue reappeared. The pre-installation for default theme showed steps 1-17 Test Successful, steps 18-50 Extract File (or Tree), and step 51 Adapt Database. For my custom theme1 the Display.template.php got a Test Successful, while ./scripts/script.js got a Test failed. I did not choose to install in theme1 (simply clicked Install Now at the bottom right).
(3) the forum logs show no errors whatsoever (other than my incorrect passwords at times) and I am the sole user right now.
(4) At some point I bridged Coppermine Gallery to the setup but early on I though that was the root of my issues, so I un-bridged it and even deleted the whole folder. Now I am left with the Gallery menu item in the main menu and can't find a way to get rid of it (searching for it as a keyword in all my files comes up empty). Don't know if this makes a difference or not.

I will follow your advice and uninstall, then reinstall SP and see what happens.

I have a backup of the db, so if need be I am ready to wipe it all out and start fresh.

Thanks for your help.

Edit: I thought that if tests failed there was a way to install manually, doing the edits listed in the parse. Now, after looking at some of these files and parses, I am not so sure, because for ex it did happen that it said Find: but the code to be found wasn't there actually.
Title: Re: login fails with incomplete login string
Post by: ♦ Ninja ZX-10RR ♦ on December 03, 2015, 11:47:53 AM
Hmm, I will follow your order.

(1) I am working on a custom theme, where 99.9% of the changes are to the looks (.css files) - I believe the only exception is that I replaced a titlebg with a catbg in search.template.php In its current state, my theme is ok-ish as long as I do not run it with the SMF Responsive mod.
Seems irrelevant, so, good ;)

(2) I uninstalled SP and suddenly my login went good, which is what made me think some issue with SP is my problem. Then I reinstalled SP and the login issue reappeared. The pre-installation for default theme showed steps 1-17 Test Successful, steps 18-50 Extract File (or Tree), and step 51 Adapt Database. For my custom theme1 the Display.template.php got a Test Successful, while ./scripts/script.js got a Test failed. I did not choose to install in theme1 (simply clicked Install Now at the bottom right).
Hmm, it's strange, there are no known issues as regards logging in.

(3) the forum logs show no errors whatsoever (other than my incorrect passwords at times) and I am the sole user right now.
Roger.

(4) At some point I bridged Coppermine Gallery to the setup but early on I though that was the root of my issues, so I un-bridged it and even deleted the whole folder. Now I am left with the Gallery menu item in the main menu and can't find a way to get rid of it (searching for it as a keyword in all my files comes up empty). Don't know if this makes a difference or not.
Not really sure about how it works, I downloaded it and it's way too big to figure out without spending hours on it :/ You are better off asking them. It's usually within /Sources/Subs.php around string 3600/4000 in the monstrous array button list (this info should help you with customizing your menu, too!).

I will follow your advice and uninstall, then reinstall SP and see what happens.
Yep, have a look and see if there are failed tests.

I have a backup of the db, so if need be I am ready to wipe it all out and start fresh.
However, this would wipe all existing mods and customization, and it's the "I don't bother fixing the problem, let's just tell him to wipe it out" answer, which I won't suggest unless there is something seriously broken.

Thanks for your help.
You're welcome :)

Edit: I thought that if tests failed there was a way to install manually, doing the edits listed in the parse. Now, after looking at some of these files and parses, I am not so sure, because for ex it did happen that it said Find: but the code to be found wasn't there actually.
I know what you mean, sometimes you have to parse the mod manually, if it's an official mod you can do it on the official site, otherwise this link will help a lot ;) http://www.tytyweb.net/projects/smf/package-parser/

A quick note: what are your permission settings on files/folders and what is your php version?

Regards
Title: Re: login fails with incomplete login string
Post by: ncoded on December 03, 2015, 10:00:52 PM
I see the folders are 705 or 755, and whichever random files I checked were 604. I do not know if there is a way to retrieve these properties without checking each one individually.

The online forum uses PHP 5.4.19, and I also have an off-line replica that uses PHP 5.3.15. By the way, when the online version login malfunctions, if I add manually the missing part to the URL string, then the login works as expected.

Interestingly, if I run the localhost forum, they log in just fine, regardless of the SP Disable Redirect choice. Which means that either some file is corrupt online or PHP versions are causing me problems.

Next I will remove and reinstall SP, let's see what happens; then do some checking and come back with updates.
Title: Re: login fails with incomplete login string
Post by: ♦ Ninja ZX-10RR ♦ on December 04, 2015, 03:26:36 AM
Those permissions are most likely one of the problems, it should be 755 for folders and 644 for files ;)
I see you are using GoDaddy as host, while they are awesome for domains (my own domain is there), they are seriously bad at configuring servers, so it can also be related to that, since they have an extremely bad reputation for servers (experienced it myself several times, people using GD with problems, switching host, problems gone).
Title: Re: login fails with incomplete login string
Post by: ncoded on December 04, 2015, 08:08:14 AM
I will change the permissions, but here's more drama: the offline version of the forum (on localhost) was a few weeks behind the online version, and it worked fine both on the laptop and when connecting to it from the mobiles. Last night I imported a backup db from online onto the laptop, and I am now having this login issue off of the laptop, too. I will revert to an earlier version of the db on the laptop, curious if the problem goes away.

As for GoDaddy, so far so good for me, but I am rather ignorant in server matters to the point I can't tell right off the bat if the server is misconfigured (I switched though to Unix hosting after having issues with a web.config file).

Work in progress...
Title: Re: login fails with incomplete login string
Post by: emanuele on December 04, 2015, 08:18:28 AM
Upon trying to log in, the URL is missing the index.php? part and a generic Not Found error is thrown.
Smells like Apache's mod_security.
Title: Re: login fails with incomplete login string
Post by: ♦ Ninja ZX-10RR ♦ on December 04, 2015, 08:52:31 AM
Missed that line, yes, ask GoDaddy to disable mod_security, although they will most likely throw some pathetic excuse to say no :/ Insist until you find one of their few guys that know something in support, it has been reported that most of them are complete newbies but some others know stuff, and they *will* actually disable it.
You can also try this: http://www.simplemachines.org/community/index.php?topic=34270.0 although it doesn't always work.

P.S.: thanks ema for pointing that one out, completely missed that line :angel:
Title: Re: login fails with incomplete login string
Post by: ncoded on December 04, 2015, 12:48:42 PM
I have yet to talk to GoDaddy support. In the meantime, it bugs me that seemingly this problem started at some point - it was ok even on my laptop until I imported the freshest db from online, and now the problem is on the laptop as well (in ALL instances, it only happens when accessing from mobile!)

Note to self: from now on keep all backups, not just the latest.

I use GoDaddy's backup utility to back up the db and then download it with FileZilla. A short while ago though, while the backup routine looked good, the backup db date and size stayed the same and the data was stale. This lasted for about a day. I can not tell if my problem started precisely then or not, but the question begs: could there be a code/db corruption be the case here?

I ran the SMF db repair routine and went without finding errors.

@Ninja: I see no .htaccess in my directory tree, except one in the folder where GoDaddy puts the db backups (so it's not in root or even the forum folder, obviously). Will call tech support.

I am putting this extended info out there in case it might just shed more light on the issue, hopefully a solution will emerge soon.

Thank you all for helping out so far.
Title: Re: login fails with incomplete login string
Post by: emanuele on December 04, 2015, 02:54:39 PM
A link to your forum would be nice to see.
Title: Re: login fails with incomplete login string
Post by: ncoded on December 06, 2015, 11:47:51 PM
The forum was initially set up so that no one could browse without first logging in (Guests would see only the login page). At some point I decided to allow Guests to see the Portal and some blocks on each side.

Surprisingly, upon login the URL string is complete and the user is taken to the forum (as should, per my settings)! I ran this setup from ipad and iphone dozens of times, clearing the cache and website data every now and then, even with the Responsive theme on, and it worked flawlessly every time.

Is this making sense?
SimplePortal 2.3.8 © 2008-2024, SimplePortal