Hi everybody, I'm new to this, I did a research but couldn't find the solution to my problem. I installed amember and created a MySQL data base and everything is okay. But I installed wordpress 2.5.1 using fantastico therefore it created a different MySQL data base. Then I activated the wordpress plugin but when I try to configure the wordpress plugin it gives me an error. Wordpress plugin error. Cannot select MySQL database [kubu_wrdp2]. Error I have tried almost everything but nothing seems to work. I need help with this. Thanks in advance.
While I'm not sure if they *need* to live in the same DB (I don't use the plugin), if that is your goal (or just want to double check your configuration) take a look at your wordpress config: wp-config.php to get the db, username and password information that fantastico set everything up with.
What directory did the program get installed in? Look for the file wp-config.php, this will have your wordpress database info in it. Also make sure that your secret key is set, and that the $table_prefix is not blank- usually its $table_prefix = 'wp_'; If its blank amember will have a problem. David
Thanks Skippy and David. Amember is installed in the directory mydomain.com/amember And the blog in mydomain.com/blog David, what I am missing here is how I set up the secret key. When I go to my wp-config.php the db name is: define('DB_NAME', 'kubu_wrdp2'); // The name of the database Also, I see this: // You can have multiple installations in one database if you give each a unique prefix $table_prefix = 'wp_'; // Only numbers, letters, and underscores please! I am not sure if I have to set it up and how. Do you have any idea? Thanks
You should also have the line in wp-config.php define('SECRET_KEY', ''); // Change this to a unique phrase. This will be your secret key. David
Thank you David but In my wp-config.php I see this: // Change SECRET_KEY to a unique phrase. You won't have to remember it later, // so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/ // to get a secret key generated for you, or just make something up. define('SECRET_KEY', 'gijijicg2wq6guhruyuhiurhuucir3refd'); // Change this to a unique phrase. Then, I think that it is already set up. And the $table_prefix is not blank, it is $table_prefix = 'wp_'; But when I enter my DB name kubu_wrdp2 I get the same error: Wordpress plugin error. Cannot select MySQL database [kubu_wrdp2]. Error I have amember in mydamain.com/amember and my blog in mydomain.com/blog I don't know if the problem is that they are not in the same directory. I can't find the solution
I don't have the wordpress plugin but I use SMF plugin and when configuring this plugin it asks for both db name and prefix. Does the WP plugin ask for both db name and prefix? If so you should enter the following: kubu_wrdp2.wp_ I would think it would ask you for the prefix because amember would not know the name of prefix if you didn't use the default value of wp_ in order to modify records in the wordpress database. Next if you installed amember in a separate database with a different db user than the db user for the wordpress database then you will have to use something like phpmyadmin to give the amember db user privileges to modify your wordpress database. So check the files amember/config.inc.php for db name, and db user name for amember. And check wp-config.php for db name, and db user name for wordpress. If the db users are different then I would think you would have to give the amember db user privileges to modify the wordpress database. These are all steps I had to do to get the SMF plugin to work and I would think you would have to do something similiar for Wordpress plugin since conceptually you are doing the same thing in trying to give amember the ability to modify your wordpress database. Jimmy
Thank you Jimmy, Yes, I have to enter the DB name and prefix, but I think the problem could be that I have to give amember db user privileges to modify the wordpress database, just what you said... I checked it out and the amember DB name is kubu_amember while the wordpress DB name is kubu_wrdp2 they are different but the user names are the same. Now, how do I fix this?
If the database user name and password is the same for both databases then I would assume you would already have the privileges to modify both databases. I assume this because neither Amember by itself would work correctly nor would Wordpress by itself work correctly. This would suprise me because I thought when i used fantisco I thought it auto-generated a random password when I installed wordpress. When you installed amember did you tell it to use same db user name and password as wordpress. I guess what order did you install the products. Did you install amember first or wordpress first? Jimmy
The other thing to be careful is when you purchase plug-ins from Amember they don't always send you the latest plugin needed to work with the latest product. You should create a support ticket to make sure you have the right plug-in for the version of Wordpress you are using. My version of Wordpress does not require a secret key. Where the newer versions do. I don't know if you need to configure the secret key also in Amember. I'm sure I've seen other threads of people integrating wordpress plug-in using wordpress 2.5.1 if that is the version you are using. I would hope they would chime-in because it seems you have something not configured correctly but it should be simple to fix. Jimmy
Thank you Jimmy, I appreciate your answer and time. Well, I installed amember first and then wordpress maybe this could create a problem. Yes, fantastico auto-generated a random password when I installed wordpress 2.5.1. I have also tried to access with that password but nothing. I really don't know what to do, maybe I should remove amember and reinstall it in the same DB where I have wordpress but I am not sure how to do it. I'll see. Thanks again and if you have another idea please let me know.
Hello, I thought when you install amember (i.e. setup.php) you already have to have a database defined, and a db user/password defined. I thought that it asks you for this values during setup. So before installing amember did you create a database? and a user with privileges for that database? I would think based on what you have said so far that when you installed wordpress through fantisco that it would create db user kubu_wrdp2 automatically for you with auto generated password. I would not think this would match your db user name you initially used for amember when you installed it because why would you know to use kubu_wrdp2 as database username. I guess I'm confused on how the db users are the same. Because if they are not the same then it a priviledge issue. Are you on a shared web host using CPANEL? Jimmy
Yes Jimmy before installing amember I created the DB and then I used the DB name, user name and password I created in this DB to set up amember. Well, I went to wp-config.php and kubu_wrdp2 is the DB user name. Yes, my hosting has Cpanel which I used to install wordpress.
When you look at file amember/config.inc.php look for following line: pc['user'] = What is the value? Is it kubu_wrdp2? If it is not then we are making progress. In addition log into you CPANEL and click on the MySql Database icon. This will bring up a page that reports your databases. Under each database should be the db user configured to modify the database. Report the results for both of your databases here. If you indeed have 2 different users it is from this page where you will need to make modifications to give the amember user priviledges to modify wordpress database. There should be a section on this page titled "Add users to your database" You would hit dropdown arrow to select amember user name. You would hit dropdown arrow to select kubu_wrdp2 database, make sure Priveledges "All" checkbox is checked, and click "Add User To Database" button. This will fix the priviledge problem if you indeed have one. Jimmy
Hey Jimmy I did what you said and the error disappeared, I am assuming that it will work now, anyway I'll continue setting it up the other things to see what happens. Thank you very much Jimmy I really appreciate all your help.
Yes Skippy, Jimmy did a great job. I have another question. I want to have multiple membership levels with wordpress, I know I have to install the view level plugin but do I have to protect the whole blog? When I create my first product I have to enter the Product URL, I want to know if the URL is my blog URL, for example mydomain.com/blog
Congrats I'm glad its working for you. I went through the same process of having priviledge problems when configuring the SMF plug-in I purchased. By the time we are all done we are all going to be alot more knowledgeable using HTML/CSS/PHP/MYSQL/JAVASCRIPT. Amember, wordpress, and other scripts are great jumpstart programs, but I'm finding out more and more you gotta get your hands dirty because no solution fits a person's business model 100%. Everybody has a different eye for detail which is a good thing. I won't be of much help with your new questions since they are more Wordpress specific. I use Wordpress but I use it more for themes and content layout and management. I don't allow members to comment, login, or post directly into our Wordpress blog. You might want to start a new topic/thread with your new questions.
Ok Jimmy, thank you again. I agree with you, you learn by trial and error, it takes time but you won't forget what you learn.
Unfortunately there is another error, here it is: 3. Add this to "wp-config.php" in your WordPress installation before : require_once(ABSPATH.'wp-settings.php'); add : define('COOKIEPATH','/'); define('SITECOOKIEPATH', '/'); define('COOKIEHASH', md5($_SERVER[HTTP_HOST])); Then I open my wp-content.php and go to /* That's all, stop editing! Happy blogging. */ define('ABSPATH', dirname(__FILE__).'/'); I ADDED IT HERE require_once(ABSPATH.'wp-settings.php'); ?> Then my blog gives me this error: Warning: Cannot modify header information - headers already sent by (output started at /home/kubu/public_html/blog/wp-config.php:35) in /home/kubu/public_html/blog/wp-includes/pluggable.php on line 694 Any idea?