Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-20 11:31:02

nyctxtpttrn
New Member
Registered: 2009-08-20
Posts: 1

How do I hide the MySQL password in config file

I did a search for this and can’t find anything helpful, though I know it was brought up a few years ago.

How do I hide or remove the MySQL password from my config file. I know it is very insecure.

Please note I am not a developer so although ALL help is appreciated, it would be great if it is in layman’s terms or a step by step kinda thing.

Thanks

Offline

#2 2009-08-20 15:17:47

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: How do I hide the MySQL password in config file

It’s only viewable if you have access to the server via ssh and (s)ftp – it’s not viewable over HTTP (http://example.com/textpattern/config.php) unless your server is misconfigured (in which case, Textpattern would likely not work).

Offline

#3 2009-08-20 16:20:52

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: How do I hide the MySQL password in config file

You can change the permissions on the file after it’s created.

Depending on how your hosting provider has their server configured, you should make the config.php file only readable by your user account and/or your group. At the very least remove read access to others in case a hacker breaks into a neighboring user’s account and starts roaming the file system.

Here’s a good tutorial on permissions.

Offline

Board footer

Powered by FluxBB