Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cannot login after changing hosts
#1
We moved our get simple websites from one host to another. Everything on teh websites themselves appears to be working, but we can no longer log into the admin panel, using admin nor any other user. During login attempts something flashes briefly before returning to the login screen. When I set the site for no login, I can see this at the top of any admin page:

Warning: Cannot modify header information - headers already sent by (output started at /home/fnpschap/public_html/pawpaw/admin/inc/template_functions.php:2591) in /home/fnpschap/public_html/pawpaw/admin/inc/cookie_functions.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /home/fnpschap/public_html/pawpaw/admin/inc/template_functions.php:2591) in /home/fnpschap/public_html/pawpaw/admin/inc/cookie_functions.php on line 24

Any ideas?

Paul
Reply
#2
data/other/logs/error.txt
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(2014-05-30, 06:34:21)shawn_a Wrote: data/other/logs/error.txt

That file (actually data/other/logs/errorlog.txt) only has the same info I included in my original post.

paul

Lines 23 & 24 of cookie_functions.php are:

setcookie($saltCOOKIE, sha1($saltUSR), time() + $cookie_time,'/');
setcookie('GS_ADMIN_USERNAME', $USR, time() + $cookie_time,'/');

Paul
Reply
#4
No fatal errors?

hmm
edit gsconfig and turn debug mode on and try to login again perhaps and see if anything gets output.

What version ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2014-05-30, 06:54:17)shawn_a Wrote: No fatal errors?

hmm
edit gsconfig and turn debug mode on and try to login again perhaps and see if anything gets output.

What version ?

version 3.2.3
debug added 2 new lines to errorlog:

[30-May-2014 00:18:23 Europe/Moscow] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/fnpschap/public_html/pawpaw/admin/inc/template_functions.php:2591) in /home/fnpschap/public_html/pawpaw/index.php on line 179

... interesting index.php only has 115 lines

and

[30-May-2014 00:56:47 Europe/Moscow] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/fnpschap/public_html/pawpaw/admin/inc/template_functions.php:2591) in /home/fnpschap/public_html/pawpaw/admin/inc/login_functions.php on line 141

Paul
Reply
#6
template_functions.php:2591 ?

template_functions has half as many lines. Might be an anonymous function call.

Since you are getting no errors, something is outputing an error or whitespace before the cookie is set.
So you can either force output_buffering on in php to fix.

Or upgrade to the latest stable version and see if it fixes it.

another option would be to delete data other plugins.xml to disable all plugins that might be causing it.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
(2014-05-30, 07:02:38)WFPaul Wrote: [30-May-2014 00:18:23 Europe/Moscow] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/fnpschap/public_html/pawpaw/admin/inc/template_functions.php:2591) in /home/fnpschap/public_html/pawpaw/index.php on line 179

... interesting index.php only has 115 lines

and

[30-May-2014 00:56:47 Europe/Moscow] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/fnpschap/public_html/pawpaw/admin/inc/template_functions.php:2591) in /home/fnpschap/public_html/pawpaw/admin/inc/login_functions.php on line 141

GS 3.2.3's admin/inc/template_functions.php normally has 1296 lines. It seems that PHP is counting the lines twice--do the files have the proper line endings (should be LF for Linux servers)?
Reply
#8
I doubt thats it, It could be an anonymous function being called inflating the actual line count, all plugins and components are called via call_user_func

of course checking the actual file in question might be worth a peek, or reuploading the site.

Best option is to upgrade to a newer version, as there have been many fixes for stuff like this since 3.2.3
note that some plugins will have to be updated also.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
Well, some progress and some not.

Upgraded to v3.3.2

I can log in with one user, but not admin, still get the same errors at teh top of the admin screen.

When not in admin panel, the site is invisible (blank white page).
Reply
#10
deleting plugins.xml removed teh errors from the top of the page.

Still need to find out why the website cannot be seen after the upgrade.

Paul
Reply
#11
You will have to go plugins one by one.

keep debug mode on also to catch errors.

the culprit might be a php include that has whitespace or newline after the closing tag
"?>"

It probably was not an issue on old host becuase it had output_buffering=on
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#12
Not only plugins, it could also be a language file (if not en_US)
Reply
#13
Good thinking, lang file!
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#14
(2014-05-30, 07:46:30)shawn_a Wrote: I doubt thats it,

I have to admit that I never have heard of any problems regarding wrong line endings causing such issues, but the evidence is striking. template_functions.php has 1296 lines; +1295 additional line endings = 2591. The message says that is caused by index.php line 179. 179-89=90, where GS calls header().

I suggest to double-check that PHP files have been uploaded as text files and not as binary files. Alternatively, removing the ?> in the second but last line of the respective files could also help.
Reply
#15
(2014-05-30, 08:30:44)shawn_a Wrote: Good thinking, lang file!

I just remembered that long ago someone had issues with a lang file that had some empty line after the ?>
Reply
#16
So it appears that the login issue was that the salted passwords do not work after changing hosts. We were being able to log in my copying a working admin.xml file to each website, but then the third site I tried this with doesn't work. ??

The admin panel header errors are caused by the Multi-User plug in - fixed by disabling the plug-in after changing the passwords for the additional users.

Invisible website caused by getsimple upgrade fixed by adding a site php.ini file

Paul
Reply
#17
Did you have a custom salt in your gsconfig ? Did you copy the gsconfig ?
Curious how this would have broken.

if you have custom salt disabled you can use this user file to get in
https://github.com/GetSimpleCMS/GS_unit_...s/user.xml
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#18
Thanks. I tried the user.xml, still could not log in.

Copied entire admin folder from a working site to here and was able to login as admin, then checnge the user password.

Now getting "Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function...." errors on the main page.

Fix one thing, find another.

Paul
Reply
#19
set your timezone in gsconfig
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#20
I'm experiencing the same problems. Cannot login after changing passwords to salted as per the wiki. Tried the steps in the above posts without success. I don't have additional languages installed.

Debug only showed the error with the timezone. Removed the Page Edit plugin and that error went away. Debug showed no other errors. But login still not accepted.

It worked fine on my localhost, but not on two different web hosts.

Any other ideas?

Thanks in advance!
Reply




Users browsing this thread: 2 Guest(s)