New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot log into backend in PHP 7.0 #2869

Closed
timokleemann opened this Issue Sep 24, 2018 · 10 comments

Comments

Projects
None yet
3 participants
@timokleemann

timokleemann commented Sep 24, 2018

I recently upgraded my (shared) webspace at HostEurope from PHP 5.6 to PHP 7.0.

For some reason, I can no longer log into my site. When I enter my user name and password, the page gets reloaded but nothing happens, not even an error message gets thrown.

This happened first in Symphony 2.6.X, then I upgraded to the latest version (2.7.7) because I thought that would solve it. But it didn't.

I've already cleared all my browser cashes and cookies and tried various browsers, but to no avail.

I've also tried PHP 7.1 and 7.2 but that doesn't change anything.

I am running more than a dozen Symphony websites. This is the first one on PHP 7.

Can anybody help?

Affected Symphony version(s) : 2.6.X to 2.7.7
PHP version(s) : 7.X
OS(es) : Mac OS 10.13.6
Browsers: Safari, Chrome, Firefox

@twiro

This comment has been minimized.

Contributor

twiro commented Sep 24, 2018

PHP 7.X support started with Symphony 2.7.X, so you won't be able to run Symphony 2.6.X on PHP 7.X.

Your scenario sounds like you only updated the Symphony core and not the extensions (as you couldn't access the backend after having already caused the backend crash after upgrading to PHP 7.X), so I guess you are using one ore more extensions that aren't compatible with PHP 7.X.

Your Host Europe PHP error logs should be able to tell you which extension(s) might cause trouble.

I also run lots of Symphony websites on Host Europe and sucessfully updated most of them to Symphony 2.7.7 + PHP 7.1, but this process involved carefully checking all extensions for PHP 7.X-support and replacing them (or updating them by myself) if they're outdated or no more supported.

If you're able to post a list of your installed extensions and their version numbers we might be able to give you some more useful hints which ones might cause problems…

@nitriques

This comment has been minimized.

Member

nitriques commented Sep 25, 2018

Yeah please post an error message from either error_log or manifest/logs/main. Thanks

@timokleemann

This comment has been minimized.

timokleemann commented Sep 25, 2018

Thanks for your support, guys!

Actually, the backend never crashed as you describe it. Everything works perfectly under PHP 5.6. Luckily, I can switch between PHP 5.6 and 7.0 at Host Europe. So when I noticed that I can no longer log in to Symphony, I simply switched back to 5.6 and it all worked again.

I just double checked all my extensions as you recommended. They're all up to date.

sh_extensions

(The SASS Compiler is notoriously troublesome, so I completely deinstalled it which works fine under PHP 5.6.)

Symphony's update log looks good too:

============================
Log Created: 2018-09-23T19:37:02+02:00

Symphony Log
Opened: 2018-09-23T19:37:02+02:00
Version: 2.6.6
Domain: xxxxxxxxxxxxx.de

23.09.2018 7:37 pm > Notice: Updater - Migration to 2.6.7 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.6.8 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.6.9 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.6.10 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.6.11 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.0 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.1 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.2 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.3 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.4 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.5 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.6 was successful
23.09.2018 7:37 pm > Notice: Updater - Migration to 2.7.7 was successful

The only errors I could find in Host Europe's error logs are these two:

[ssl:warn] [pid 24354] [client [host AH01909: xxxxxxxxxxx.de:443:0 server certificate does NOT include an ID which matches the server name

and

[negotiation:error] [pid 32289] [client 2.242.6.230, 66.249.93.83] [host xxxxxxxxxxx.de] AH00690: no acceptable variant: /usr/share/apache2/error/HTTP_NOT_FOUND.html.var

So why can't I log into the Symphony backend? Any ideas?

@twiro

This comment has been minimized.

Contributor

twiro commented Sep 25, 2018

> I just double checked all my extensions as you recommended. They're all up to date.

Thanks – looks like a pretty basic (and therefore rather unproblematic) setup.

> The only errors I could find in Host Europe's error logs are these two:

As Host Europe has separate error logs for each PHP-version… are these the errors shown in Host Europes error log for PHP 7.0? And they are the only ones?

If so this doesn't look like any of the extensions-compatibility-issues I faced while updating – and if it's not an extension that's not ready for PHP7 I have to admit that I have no idea what might cause your backend-login-troubles…

@timokleemann

This comment has been minimized.

timokleemann commented Sep 25, 2018

Yes, I checked the error logs for all PHP versions (5.6, 7.0, 7.1 and 7.2). I could only find the two errors above in there.

@nitriques

This comment has been minimized.

Member

nitriques commented Sep 26, 2018

@timokleemann What about main under manifest/logs ? Nothing in there ?

Also, try to

  1. switch to PHP 7.1
  2. delete all your cookies
  3. delete all rows in the sym_sessions tables
  4. log in

If log in still does not work:

  1. Try to see if the xsrf token on the login page changes each time you refresh the page (it is in a hidden field).
  2. If so, please tell us !
@timokleemann

This comment has been minimized.

timokleemann commented Sep 27, 2018

Hi,

I just realized that there is no hidden field for any xsrf token in my login form! It's just not there!

(Since I run a number of other Symphony websites, I checked some of those too, and all of them do have an xsrf token in their login forms.)

The only relevant error I could find in manifest/log/main is:

Warning: GenericErrorHandler 2: session_decode(): Session is not active. You cannot decode session data on line 198 of file /is/htdocs/wp1138379_3WGLF7BD3N/www/symphony/lib/core/class.session.php

The others are probably not relevant:

User Notice: FrontendPageNotFoundException 1024 - The page you requested, <code>/apple-touch-icon-precomposed.png/</code>, does not exist. on line 328 of /is/htdocs/wp1138379_3WGLF7BD3N/www/symphony/lib/toolkit/class.frontendpage.php

User Notice: FrontendPageNotFoundException 1024 - The page you requested, <code>/apple-touch-icon-precomposed.png/</code>, does not exist. on line 328 of /is/htdocs/wp1105399_3WHLF6BD4N/www/symphony/lib/toolkit/class.frontendpage.php

And by the way:

I deleted all my cookies and all rows from the sym_sessions tables (there were two).

@nitriques

This comment has been minimized.

Member

nitriques commented Oct 1, 2018

I just realized that there is no hidden field for any xsrf token in my login form! It's just not there!

Is is enabled in config.php ?

Session is not active. You cannot decode session

We have a fix for PHP 7.0 which is in 2.7.7. Did you make sure it is up to date ?

@timokleemann

This comment has been minimized.

timokleemann commented Oct 2, 2018

No, it wasn't enabled. I just enabled it and got the missing cross site request token error.

I fixed it by applying the fix for PHP 7.0 which you mentioned.

(Sorry, but I was under the impression that it's already part of Symphony 2.7.7)

It's all fixed now. I am closing this. Thanks a lot for your help.

@nitriques nitriques added the PHP 7 label Oct 3, 2018

@nitriques

This comment has been minimized.

Member

nitriques commented Oct 3, 2018

Sorry, but I was under the impression that it's already part of Symphony 2.7.7

It is! Maybe the file was not up to date on your server. Anyhow, glad it is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment