These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Help! - Custom Joomla Installer on the new forum.
I have written a custom joomla installer it all works fine except for setting up the configuration.php file with the database information below is my code:
if (!-r $cfile) {
&run_as_domain_user($d, "cp ".quotemeta($cfileorig)." ".
quotemeta($cfile));
local $lref = &read_file_lines_as_domain_user($d, $cfile);
local $l;
foreach $l (@$lref) {
if ($l =~ /^define\('$db',/) {
$l = "define('$db', '$dbname');";
}
if ($l =~ /^define\('$user',/) {
$l = "define('$user', '$dbuser');";
}
if ($l =~ /^define\('$host',/) {
$l = "define('$host', '$dbhost');";
}
if ($l =~ /^define\('$password',/) {
$l = "define('$password', '".
&php_quotemeta($dbpass)."');";
}
}
&flush_file_lines_as_domain_user($d, $cfile);
}
The joomla configuration.php looks like this:
/* Database Settings */
public $dbtype = 'mysqli'; // Normally mysqli
public $host = 'localhost'; // This is normally set to localhost
public $user = ''; // DB username
public $password = ''; // DB password
public $db = ''; // DB database name
public $dbprefix = 'jos_'; // Do not change unless you need to!
Any help would be appreciated!