Page 1 of 1

PHP & MYSQL Beginner : Need Helps.

PostPosted: Sun Oct 31, 2010 9:49 am
by xfcd
Good Day, Steve.

I'm beginner php and mysql.

I quite not understand this below statement:
Step 3: Update conf.ini file
Please update the [_database] section of the conf.ini file so that it reflects the connection information to the database that you just created for LibrarianDB.




i using localhost from Xampp.


In index.php:
Code: Select all
<?php
$install = false;
if ( !file_exists('conf.ini') ){
   $install = true;

} else {

   $conf = parse_ini_file('conf.ini', true);
   if ( $conf['_database']['user'] == 'root' ){  // Should only change in the username, as root?
   //if ( $conf['_database']['user'] == 'Your Username Here' ){
      $install = true;
   }
}

if ( $install ){
   header("Location: install.php");
   exit;
}
require_once 'config.inc.php';
require_once CONF_DATAFACE_PATH.'/dataface-public-api.php';
df_init(__FILE__,CONF_DATAFACE_URL);
$app =& Dataface_Application::getInstance();
$app->display();
?>


Thanks You for your helps and guiding.
Steven. :idea:

Re: PHP & MYSQL Beginner : Need Helps.

PostPosted: Wed Nov 03, 2010 11:53 am
by shannah
there is a file called conf.ini
In it there is a section called [_database] that stores the mysql connection information. (user/host/password etc..).
This is the file you need to update to reflect the connection to your mysql database.

You may want to check out the xataface getting started tutorial for details on the conf.ini file to give you a bit of background.