Install Dabr with MySQL

June 15th, 2011 at 11:34pm Jason 127 views

If you installed your Dabr in a subdirectory, Don’t forget add RewriteBase / in your .htaccess and changed RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] to RewriteRule ^(.*)$ twitter/index.php?q=$1 [L,QSA]

The codes in config.sample.php is the key point!

// MySQL storage of OAuth login details for users
define('MYSQL_USERS', 'OFF');
// mysql_connect('localhost', 'username', 'password');
// mysql_select_db('dabr');
 
/* The following table is needed to store user login details if you enable MYSQL_USERS:
 
CREATE TABLE IF NOT EXISTS `user` (
  `username` varchar(64) NOT NULL,
  `oauth_key` varchar(128) NOT NULL,
  `oauth_secret` varchar(128) NOT NULL,
  `password` varchar(32) NOT NULL,
  PRIMARY KEY (`username`)
)
 
*/

changed into:

// MySQL storage of OAuth login details for users
define('MYSQL_USERS', 'ON');
 mysql_connect('localhost', 'username', 'password');
 mysql_select_db('dabr');
 
/* The following table is needed to store user login details if you enable MYSQL_USERS:
 
CREATE TABLE IF NOT EXISTS `user` (
  `username` varchar(64) NOT NULL,
  `oauth_key` varchar(128) NOT NULL,
  `oauth_secret` varchar(128) NOT NULL,
  `password` varchar(32) NOT NULL,
  PRIMARY KEY (`username`)
)
 
*/

mysql_select_db(‘dabr‘); changed dabr into your MySQL Database Name.

and the codes:

CREATE TABLE IF NOT EXISTS `user` (
  `username` varchar(64) NOT NULL,
  `oauth_key` varchar(128) NOT NULL,
  `oauth_secret` varchar(128) NOT NULL,
  `password` varchar(32) NOT NULL,
  PRIMARY KEY (`username`)
)

just put them into MySQL and run them!

Done!

Entry Filed under: Internet Tagged with:

Share This Post Share This Post SubscribePrint This Post Print This PostSave As PDF Save As PDF

Related Posts Hot Posts Hot Comments Hot Tags

      1 Comment Add your own

      • 1. Prasanna SP  |  September 26th, 2011 at 12:30 pm

        Hi, I’ve installed the dabr in my host with MySQL enabled. But it is not storing the password. In the next login it says, Invalid username or password. Could you please help me to find a solution?

        In the last line you said, “just put them into MySQL and run them!”. Can you please tell me in detail how to put this into MySQL?

        Thanks in advance.

      Leave a Comment

      Required

      Required, hidden

      Some HTML allowed:
      <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

      Trackback this post  |  Subscribe to the comments via RSS Feed


      Calendar

      June 2011
      MTWTFSS
      « Apr Nov »
       12345
      6789101112
      13141516171819
      20212223242526
      27282930 

      Sponsors

      Most Recent Posts