latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Error cannot connect to DB localhostserver

Home Forums Community Forum Error cannot connect to DB localhostserver

This topic contains 1 reply, has 2 voices. Last updated by  Eduan 4 years ago.

Topic Author Topic
Posted: Wednesday Jan 2nd, 2013 at 4:50 am #35954

Hi
Yesterday I installed s2member free WP plugin on my test localhost site (IIS on Win7) and today I have tried opening the site but cannot due to “Error:cannot connect to database” message!
I think this must be due to an s2member plugin issue. I looked yesterday at the install notes & intro video and remember seeing somewhere to add some line to some file about localhost config (which I did not do at the time) but so far I cannot refind this info as I try to fix this! Please can someone remind me about what I need to do. I look forward to help – thanks

UPDATE
I found the info eg:
>>
Localhost WAMP/MAMP Installs ( are you a developer? )

If you’re developing your site in a localhost environment, running something like WAMP/MAMP, or EasyPHP, please add this line to your /wp-config.php file:
Localhost WAMP/MAMP Installs ( are you a developer? )

If you’re developing your site in a localhost environment, running something like WAMP/MAMP, or EasyPHP, please add this line to your /wp-config.php file: define(“LOCALHOST”, true);.

This lets s2Member know definitively that your site is in a localhost environment. s2Member will adjust itself accordingly, maximizing functionality during your developement. s2Member can usually auto-detect this, but in cases where your localhost installation runs on something other than 127.0.0.1/localhost, you need to tell s2Member definitively, by adding that line to your /wp-config.php file. For instance, s2Member needs to know when your server IP is the same as all User IPs.

Once your site goes live, please remove the line. If you’re already on a live server connected to the web, please ignore this section.
.
<<

But after adding define("LOCALHOST", true); to wp-config.php I still have database cannot connect error….

NEXT UPDATE

I had to delete my localhost wordpress setup (after file backup) & reinstall (using MS WEBPI) & I have now reinstalled s2member plugin (also added the edit to wp-cofig.php). Now I hope to try the plugin…..

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Wednesday Jan 2nd, 2013 at 10:16 am #35988
Eduan
Username: Eduan
Moderator

Glad you found that Richard. :)

I suspect however this is a WordPress error, for some reason your database was not configured correctly for WordPress and that’s why it’s giving you that error.

– Eduan

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.