<?php
$gapsIni = realpath(dirname(__FILE__) . "/../../GAPS.ini");
$config = parse_ini_file($gapsIni);

$phpIni = $config['PHP'] . "\\php.ini";

$confFile = file_get_contents($phpIni);

if (preg_match('/\nextension=php_pdo.dll/im', $confFile)) {
	echo "Aenderungen bereits vorgenommen!";
} else {
	$confFile .= "\r\nextension=php_pdo.dll\r\nextension=php_pdo_mssql.dll\r\nextension=php_pdo_mysql.dll\r\nextension=php_pdo_odbc.dll\r\nextension=php_pdo_sqlite.dll";
	file_put_contents($phpIni, $confFile);

	// GCStarter.xml ergänzen
	$confFile = file_get_contents($starterConf);
	$confFile = str_replace('<Pfad>http://pcvisit.global-cube.de</Pfad>', '<Pfad>.\pcvisit\pcvisit.exe</Pfad>', $confFile);
	file_put_contents($starterConf, $confFile);


	// GAPS.Apache.info ergänzen


	echo "Remote-Umstellung erfolgreich.";
}
