I use the install.php script to setup xampp lite 1.7.0 on my usb key.
But the script did not change the alias path in the http.conf file.
The reason is that I setup my alias not in the htdocs directory but somewhere else on my usb key more accessible for me :
N:\Apps\xampplite\ => xampp install directory
N:\MyFiles\website1\ => files for website 1
N:\MyFiles\website2\ => files for website 2
Ok, not really a problem, I know PHP, I could do the changes by myself in the script !
Well, in fact the script is wierd and very complicated.
Why did you use awk to do the job ? PHP alone should do the trick, isn't it ?
In the script you play with a lot of \\\\\\ and //. Just in order to call awk.
I spent hours to play with \ and \\ to call awk corectly and at the end I gave up.
Instead, to do what I needed, I added those lines in the script :
- Code: Select all
if (($xamppinstaller == "newpath") || ($BS == 1)) {
$httpConf = file_get_contents($confhttpdroot);
$tmpA = $oldPartition.'MyFiles/';
$tmpB = $newPartition.'MyFiles/';
$httpConf = str_replace($tmpA, $tmpB, $httpConf);
file_put_contents($confhttpdroot, $httpConf);
}
In my point of view, you could re-write the entire script with such method, and stop using awk. The advantage of this method is that you use only PHP and simplify the code a lot and stop using all the \ stuff.
Did I miss something in the use of awk that explain why you use it ?
Thanks a lot for xampp lite, I use it all the time.
Fluminis