PHP Login System Tutorial: After installation, we must do a little job, set configuration. There are many options in phpSecureSite, but in this post, we just do at database and authentication configuration.
Database configuration
- Open file named "database.php" within www/test/phpsecuresite/phpsecuresite/phpss/config.
- Make sure, that you choose mysql database in line 36:
$phpss_cfg["phpss"]["database_module"] = "mysql";
- Then, set in mysql configuration like this:
$phpss_cfg["database"]["mysql"] =
array(
"modulefile" =>
PHPSS_ROOT_FS . "/modules/database/mysql.php",
// database server address (fully-qualified domain name or ip address)
"hostname" => "localhost",
// tcp port number to connect to
//(mysql uses 3306 by default)
"port" => 3306,
// username and password to connect with
"username" => "root",
"password" => "secret",
// the database to use
"database" => "test"
);
Authentication Configuration
- Open authentication.php within www/phpsecuresite/phpsecuresite/phpss/config.
- Set module for authentication:
$phpss_cfg["phpss"]["auth_module"] = "database";
- Set password format:
$phpss_cfg["phpss"]["auth_pwtype"] = "md5";