Jump to content
yrglx

config.php dbPass in plain text?

Recommended Posts

Situtation: website has been running for years without problems. We are implementing changes and setup a "dev" subdomain to be able to compare old and new.

What went wrong: the hoster makes it possible to change the MySQL dbUser password. Which I accidentally did. Now the new password is not the same as the one defined in the config.php file under "$config->dbPass = ..." and the CMS cannot access the DB anymore. Nothing is working anymore!

Assumptions: in config.php under "$config->dbPass = " the string saved is the salted hashed password, i.e. "myFreaking$difficultPassword" would be saved as f.ex. "jfeime7??6$$3!2". Is that right?

What I need to be able to do: how can I generate that salted hashed password from the plain text password I entered on the host's webinterface for the dbUser?

Or: do I just need to set "$config->dbPass" to the plain text password I entered on the hoster's webinterface to change de dbUser Password?

Share this post


Link to post
Share on other sites
7 minutes ago, yrglx said:

Or: do I just need to set "$config->dbPass" to the plain text password I entered on the hoster's webinterface to change de dbUser Password?

Please give that a try.

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, cstevensjr said:

Please give that a try.

It worked, thanks!

But isn't that a security issue?

Share this post


Link to post
Share on other sites

You will need to work that situation out with your hosting provider.  Under normal circumstances, the application configuration file (config.php) is not accessible to the outside world.

Good luck.

  • Like 1

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 formmailer
      Hi all!
       
      I upgraded my site from version 2.x to 3.x. The process has been quite more difficult than it used to be (mainly because of some third party modules, but I finally managed it.
      One question I have is, the config.php file. Are there some recommended changes I should do in this file? The config.php file in the example sites do not help so much because the installer will complete the file on installation.
      Thanks in advance!
      /Jasper
       
    • By Emile
      Hello,
      I'm working on a processwire based website in my local webserver (I don't have a lot of experience in processwire).
      I linked a new CSS file but no update on the website. I read some posts on the forum and decided to add
      $config->templateCompile = false; to my config.php to see if it was a compiler/cache issue. Then, white screen for all the pages even the admin pages. The only information I get is [HTTP/1.0 500 Internal Server Error 19ms] in the inspector console. I already tried to change back the config.php file or to add
      $config->debug=true; but nothing in the errors.txt.
      Any ideas ?
      Thank you
    • By robinc
      I am using the Multisite.module to run several (similar/related) websites off a single PW-site and database.
      Adding new sites was as simple as adding the domain to the config box, and a top level page of the same name.
      However, since an upgrade of PW, I now also have to update my site/config.php file with each extra domain, i.e.
      $config->httpHosts = array(
        'mydomain.com', // our primary hostname
        'related.mydomain.com', // related website  
        );
       
      Otherwise the site will throw a 404 page not found.
      Leaving a blank httpHosts will allow all hostnames, but causes a warning in the back-end
      Unrecognized HTTP host:'mydomain.com' - Please update your $config->httpHosts setting in /site/config.php
      Can anyone advise how best to update Multisite.module?
×
×
  • Create New...