PHP & MYSQL Beginner : Need Helps.

A place to discuss and receive support for the Library DB application.

PHP & MYSQL Beginner : Need Helps.

Postby xfcd » Sun Oct 31, 2010 9:49 am

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:
xfcd
 
Posts: 1
Joined: Sun Oct 31, 2010 8:29 am

Re: PHP & MYSQL Beginner : Need Helps.

Postby shannah » Wed Nov 03, 2010 11:53 am

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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Library DB Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved