Hi guys.
I'm creating a loginform, with an included DBconnector file that reads in it's parameters from an .ini file. I get the following error:
Fatal error: Call to undefined function: parse_ini_string() in /home/arioch/public_html/dbconnector.php on line 2
I have "php4-mysql" installed so that ain't it.
PHP Code:
<?php
$dbvalues = parse_ini_string('dbusers.ini') or die("Could not read config file");
$_SESSION();
If ($_SESSION['user'] == 1) {
$SQL = $dbconnector = @mysql_connect($dbvalues['hostname'],$dbvalues['databaseroot'],$dbvalues['databaserootpassword']) OR die('<h3 class="warning">Failure: Failed connecting to the database. Verify that the parameters you gave are correct, and that the database is running and accessible.</h3>');
}
else {
$SQL = $dbconnector = @mysql_connect($dbvalues['hostname'],$dbvalues['customer'],$dbvalues['customerpassword']) OR die('<h3 class="warning">Failure: Failed connecting to the database. Verify that the parameters you gave are correct, and that the database is running and accessible.</h3>');
}
$dbselector = @mysql_select_db($dbvalues['databasename']) OR die('<h3 class="warning">Failure: Failed selecting your database. Verify that the parameter you gave is correct, and that the database is running and accessible.</h3>');
?>
What am I missing?