Session verification failure, can't get in as admin

Started by MensaMod, January 10, 2018, 12:14:37 PM

Previous topic - Next topic

Arantor

Er, what?

First up, don't use session.auto_start. SMF deals with that itself, as it should. If anything this is more likely to be a problem if it is forced on.

Secondly, Apache has nothing to do with sessions whatsoever, that's all PHP and specifically SMF and it certainly isn't configured by default to use memcache, especially as you'd need to know where the memcache server was and what port it ran on. This is why it's off by default.

Are they using the same database or not? I'd make sure there is no reuse of the sessions table.

MensaMod

No, they're two separate databases, m2madmin_ipb and m2madmin_sandbox_ipb, as confirmed by repair_settings.php.

MensaMod

Is there a log somewhere that records more information on a "verification failure?"

Sir Osis of Liver

This a forum error, SMF will sometimes display an error that isn't what's actually happening, especially if there's a server glitch.  Have you tried overwriting the files with upgrade package?  That would at least eliminate a script error.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MensaMod

I'm boggling at that, because of not being able to log in and use good ol' Package Manager.  I've downloaded the upgrade_2-0-15.zip file and will try it out on Sunday if no-one comes up with something better before then.

MensaMod

This is not going well.  I used Win10 to extract everything from upgrade_2-0-15.zip to a fresh folder, then used cPanel's File Manager facility to upload the entire file structure to a fresh directory at /public_html/sandbox/public_html, which is where the sandbox SMF is rooted.  Double-checked each folder to be sure that the uploaded structure matches what's in the .zip file.

Next issue is how to get upgrade.php to execute.  File Manager doesn't have a Run option, although I can View it just fine.  Of course, double-clicking the file in File Manager presents me with options at my PC, not at the server.  I've tried invoking the code through FireFox, Edge and Chrome with the following variations
to no avail.  The https versions were generally blocked by the browser on security grounds.  #2 got me a blank white screen.  #4 on FireFox gives me a blank white screen; on Edge and Chrome I get Error 500 (first image).  The other two images show the top and bottom of the upgrade.php file.

How should I be doing this?

<edited to add...  Just saw this for resetting the Admin pswd ... Is this worth a try or would I just get myself deeper into a mess?>

Kindred

#26
You do not extract it to a separate directory. You OVERWRITE your existing smf installation....   and you do not need to run upgrade.pho to go from one 2.0.x version to another. There have been no database changes in 2.0.x
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

If you uploaded the 2.0.15 upgrade package to a new directory, you need to copy Settings.php and Settings_bak.php from old install to new, then run repair_settings to reset paths to new directory.  That should get you running with the existing database.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MensaMod

Ah.  Thanks for the clarification.  I'll try that in the morning.

Kindred

I really recommend not doing it the way Sir Osis suggests.

Take a backup of the files and the database
then overwrite the existing files with the upgrade archive/extract

putting it in a different directory and then resetting the URLs, etc just adds one more thing that COULD cause complications.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

But it also leaves the production install untouched, which can be a good thing based on some of the awful things I've seen done to forums.  Besides, OP has already done a new install in different directory, may as well give it a go.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MensaMod

To clarify -- I'm playing with the sandbox, which is only for pre-prod testing.  Basically, the production system is my backup because if the sandbox becomes totally unusable my recovery would be to recreate it by laying down prod system backups over what's in /public_html/sandbox/public_html and the .sandbox mySQL database.

Question -- I've finally figured out what the Attachments directory is for.  When I overlaid the sandbox database with a copy of the prod database, I didn't do anything to sync the respective Attachments directories.  Or any of the other directories in the sandbox file system.  Could that contribute to my problem?

Kindred

No. That will cause issues with attachments but has nothing at all to do with sessions.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MensaMod

Still no joy. In public_html/sandbox/public_html/Themes I deleted the subdirectories for Graystyle, Splat and Sunset (the three that had failed the upgrade's test).  Then I copied all the files from the following directories of smf_2-0-15_upgrade.zip onto the corresponding subdirectory of /public_html/sandbox/public_html

  • avatars
  • Smileys
  • Sources
  • Themes
  • plus the top-level files (agreement.txt, index.php, etc) onto /public_html/sandbox/public_html
I didn't copy the attachments, cache or Packages contents, all of which contained only the "protecting your directory" index.php files.
I checked the target directories and in each case there's a slew of files bearing today's date, plus (in many but not all cases) another file with the same name plus a trailing tilde (for instance, both index.php and index.php~ but only agreement.txt).  So I'm pretty sure that the copy operations worked.

But when I browse to http://agm2m.org/sandbox/public_html/ (and get a proper-looking logon panel), I still get the "Session verification failure" display (and no more informative error message).

Is there a log somewhere that provides more clues about what's going awry?

Sir Osis of Liver

Could be a problem with server config confusing forum by having two /public_html directories.  If you want to work with test install, why not just set it up in a different directory in main /public_html?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MensaMod

This setup has worked fine for us for several prior upgrade cycles.  Going over my notes, I see that the only new wrinkles were

  • restoring a cPanel "partial backup" of the live database on top of the old sandbox database (the prior sandbox database was a restore of a phpAdmin Export into a brand new declare -- our Messages table is now over the 50-MB limit for that process)
  • the code upgrade from 2.0.12 to 2.0.15

Aleksi "Lex" Kilpinen

Just a note, but I think cPanel allows you to duplicate a database without having to do the export/import routine yourself.
For a sandbox install that might be easier to do as well. Could be something to consider.

Also, I agree with Sir Osis on the path issue in part, it's probably not a good idea to have public_html/sandbox/public_html if you don't really have to. Makes it easier for you as well to spot wrong paths and urls. You could just run SMF in public_html/sandbox directly, or create another easy to remember folder like public_html/test :)
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

What is a "partial backup"?  What kind of host setup are you using?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MensaMod

What I'm working with is what cPanel exposes -- no command line interface that I'm aware of.  There's a "Backups" panel, which offers either a "Full backup"
QuoteA full backup creates an archive of all of your website's files and configuration. You can use this file to move your account to another server or to keep a local copy of your files.
or a selection of "Partial backup" operations

  • Download a Home Directory Backup
  • Download a mySQL Database Backup, with the option to select a database
  • Download Email Forwarders
  • Download Email Filters
  • Restore a Home Directory Backup
  • Restore a mySQL Database Backup, no selection option*
  • Restore Email Forwarders
  • Restore Email Filters
Documentation is here.  We're hosted by CyberLynk. 
* Their T/S person I spoke to is "pretty sure" that the cPanel Restore operation for a database is drop-and-replace of the source database, no option to lay it down somewhere else.  On my request they restored our production database on top of the sandbox one, but they did it outside of cPanel and I don't know the details.

Advertisement: