Jump to content

Recommended Posts

Hi there,

I'm developing locally on my laptop and we have a testing server where I deploy via rsynch + running a DB Dump script.

(Exported via MySQLWorkbench)

I've noticed that the admin password becomes invalid every time a DB Dump script is run on the server.

Is this possibly because there's a hash and/or salt stored alongside the password and my local one is not valid on the server?

Are there better practices of synching between my local Processwire and the server instance to prevent the admin password being invalidated?

Share this post


Link to post
Share on other sites

This should normally work ok, but to answer the question, the password salt is in the site/config.php and nowhere else.

Share this post


Link to post
Share on other sites

I have the same issue after DB syncing, i got it that salt in the config is the issue but as said several times its known that passwords will not work anymore after site migration. As far as i can say its not about the salt because nobody changes the salt for the migration. It wouldnt even be that bad if the user account data wouldnt be in the page table which of course has to be deployed if i add changes to the page. I deploy sometimes 10 times a day at least to staging areas and i am tired of reseting the passwords again and again. Isnt there any way to disable this? If a user changes his password by himself i will never be able to deploy without knowing his password?

Share this post


Link to post
Share on other sites

If the user salt is correctly deployed and your fields_pass table is also correctly moved there should be no problems. The only issue I can imagine is that one of your environments might support blowfish encryption and the other one doesn't, which would result in different hashing behaviors.

A few words about your rant about users being part of the pages table: If you have just about any amount of user-generated / user-changeable content you cannot overwrite the db just with a sql dump. You'll need to go different ways if you need to deploy (possibly automatically) your database changes with a staging/live environment. Therefore it shouldn't matter that much if users are pages as well or not.

  • Like 1

Share this post


Link to post
Share on other sites

The Blowfish encryption is an interesting detail, will check that. Would make sense.

Of course i need to sync in both directions but if it would be a separate table i would simply exclude them. 

Share this post


Link to post
Share on other sites

Migrated my dev environment from MAMP to vagrant box and the issue doesnt happen anymore. So you are right that the reason is an environment detail, in my case of MAMP.

Share this post


Link to post
Share on other sites

I have the same problem with Mamp.

Has someone already a solution to make it work with mamp ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By iipa
      Hi everybody!
      I have been reading about Multisite, but it kinda bugs me that every topic talks about having both admin and database same for multiple sites.
      I have a project where customer tests it by adding content to the site, while I still need to do some changes here and there in code, maybe some in database. If something crashes for a while, customer can't keep testing, which is a bit problematic.
      Is there any way that I could have two separate versions of one site ("production" and development) that share the same database, but are otherwise independent? Just the thought of having to migrate database every time I want to show client something new gives me anxiety 😁
    • By BitPoet
      Inspired by this thread with a little nugget based on AOS by @benbyf to visually distinguish development systems from production ones, I wrote a small module that does the same and lets you adapt colors and text.
      Link to the github repo:
      AdminDevModeColors
      Version 0.0.1 is still very alpha and only tested on PW 3.0.124.
      Description
      This module lets you change the color for the top toolbar and add a small piece of text for development systems, so you are immediately you aren't working on production (and vice versa). The adaptions are made through pure CSS and applied if either the "Enable DEV mode" checkbox in the module's configuration is checked or the property $config->devMode is set to true in site/config.php.
      Works with Default, Reno and Uikit admin themes (though probably needs a lot of testing with different versions still).
      Since a screenshot says more than thousand words...
      Production system (unchanged):

      Dev system (Default admin theme):

      Dev system (Reno admin theme):

      Dev system (Uikit admin theme):

      Feel free to leave any feedback here and report any problems either in this thread or the github issue tracker.
       
    • By SwimToWin
      The basic Processwire workflow assumes that I (as an Editor) want to save new Pages in draft mode - and therefore new pages are always set to unpublished by default. To publish the page, it is necessary to actively press "Publish", otherwise the Page will not be visible.
      The workflow is:
      Add new Page Status is now "Unpublished: Not visible on site." Press Publish - the page is now visible on site I want to publish pages right away (without having to press Publish).
      Where is that configured?
      ProcessWire 3.0.123
      Uikit v3 admin theme (0.3.0)
    • By Falk
      Hi!
      After temporarily using Module Image Extra, which I completely removed, I had some troubles with my imagefield (unused table columns).
      So I just imported a previous version of this column via PHPmyAdmin, which worked pretty well.
      Anyways, in Processwire Backend all image tags are gone, although they are OK in the database.
      Other image related things work (thumbnail, title etc are OK).
      Is there any way to recreate all the images or something? Or may this be an cache-related issue?
       
      Thanks in advance 😃
       
    • By SwimToWin
      I have a website that allows users to create their personal "website" (a page with sub-pages).
      Users shall be able to:
      Log in (frontend and/or admin), Edit "their" page(s) - I am using the "Page Edit Per User"-module (https://modules.processwire.com/modules/page-edit-per-user/) to grant access to the relevant pages Create child pages - possible? Users shall not be able to see other pages in the admin interface - "Admin Restrict Page Tree" may do the trick (https://modules.processwire.com/modules/admin-restrict-page-tree/)? Frontend editing shall be possible - I am considering "Fredi" (https://modules.processwire.com/modules/fredi/) for this. The challenge is that it takes a lot of modules and configuration.
      Is there a way to set this up that doesn't require a lot of configuration for each new user?
×
×
  • Create New...