Problem: some statuses showing as red and "deactivated" after changing the Apache documents directory.
* * *
After I got the XAMPP installation up and running (thanks for bundling all these things!) I wanted to change the Apache documents directory from [d:\bin\xampp\htdocs] to [d:\dev\websites].
This involved first changing the directory path two places in [D:\bin\xampp\apache\conf\httpd.conf].
For accessing the XAMPP status reporting etc. I created a subdirectory [d:\dev\websites\admin] containing a symbolic link called [d:\dev\websites\admin\xampp] pointing to the original [d:\bin\xampp\htdocs]. This should in theory allow me to browse to url [http://localhost/admin/xampp/] to access the XAMPP default page, and that worked. However, drilling down to [http://localhost/admin/xampp/status.php] now suddenly showed MySql, PHP and HTTPS as DEACTIVATED.
The cure I found was to fix a "bug" (?) in [D:\bin\xampp\htdocs\xampp\status.php], changing ...
- Code: Select all
$a = @file("$b/xampp/php.php");
$php = $a[0];
$a = @file("$b/xampp/mysql.php");
$mysql = $a[0];
$a = @file("$b/cgi-bin/cgi.cgi");
$cgi = $a[0];
$a = @file("$b/xampp/ssi.shtml");
$ssi = $a[0];
to
- Code: Select all
$dir = dirname( $_SERVER["REQUEST_URI"] );
$a = @file("$b/$dir/php.php");
$php = $a[0];
$a = @file("$b/$dir/mysql.php");
$mysql = $a[0];
$a = @file("$b/cgi-bin/cgi.cgi");
$cgi = $a[0];
$a = @file("$b/$dir/ssi.shtml");
$ssi = $a[0];
This seems to work fine for the displayed statuses, at least MySql, PHP and HTTPS are now listed as ACTIVATED and nicely green.
Cheers & hth.,
- Alf