by Draven » 22. September 2007 22:05
Ok, I have an answer for you...after 2 hours of hard work...
I've realized that the error only occur when I use the XAMPP Control Panel, so, the problem should come from there. Fortunately, the source code of the Control Panel is available for download. So, I've checked the source code and it appears that there's two functions, one to get the current dir (where the Control Panel is running) and the other one to get the install dir. But the problem is that this last function (the one for the install dir) get his value from the registry!!! So, if you've installed XAMPP without the installer, this value is NOT in the registry. Just take a look at the code :
int GetInstallDirectory(int len, char *path)
{
HKEY XamppKey;
LONG Status;
DWORD RegType;
path[0] = 0;
Status = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
TEXT("Software\\xampp"),
0,
KEY_READ,
&XamppKey);
if (Status == ERROR_SUCCESS) {
RegQueryValueEx(XamppKey,
TEXT("Install_Dir"),
NULL,
&RegType,
(LPBYTE) path,
(LPDWORD)&len);
RegCloseKey(XamppKey);
}
return Status;
}
So, by looking at the code, you can see that this value is located at :
HKEY_LOCAL_MACHINE\SOFTWARE\XAMPP
Registry Key : Install_Dir
Value : your_current_xampp_directory (E:\xampp in your case)
All you have to do is open the registry editor (start ---> run ---> type regedit then enter). Navigate to HKEY_LOCAL_MACHINE\SOFTWARE. Right-click on SOFTWARE and Choose New ---> Key. Then, type XAMPP then, click OK. Navigate to the XAMPP Key you just created, then right click on the right column (anywhere in the big white space) then again, New ---> String Value. Name it Install_Dir (probably case sensitive!) then hit Enter. Double click this value and in the appropriate box, type the path of your current XAMPP installation (E:\xampp in your case). Close the registry and restart the Control Panel and you're ready to start.
Hope this help.
Draven