Page 1 of 2

Warning : Directory mismatch when I lauch xampp-control.exe

PostPosted: 01. August 2007 22:20
by dnaton
Hello,

I use Xampp 1.6.3a (installed with the zip package) without Windows service.

I lauch Xampp with xampp-control.exe.

In the windows, see the screeshot here : http://www.naton.fr/download/xampp-control.jpg

I've a warning message : xampp-control don't find the install directory :cry:
(the directory exist and is at the right place in the xampp directory).

How can i repair the problem ?

Thanks

PostPosted: 01. August 2007 22:45
by glitzi85
Hello,

do you start the Control Panel directly or over an Shortcut? If you do it with Shortcut delete the Shortcut and create a new one. I also had this Problem when updating from an older XAMPP-Version. I manually changed the Shortcut-Target and discovered this Error.

glitzi

PostPosted: 01. August 2007 23:21
by dnaton
I use it directly, without a shortcut.

Question : Where is the configuration file who xampp-control.exe find his informations ?

PostPosted: 02. August 2007 01:02
by lyntuan
The directory of XAMPP and corresponding directories in configuration files do not match.
Try to use AMPstart to start XAMPP. It can omits this bug.

PostPosted: 02. August 2007 10:39
by dnaton
Hi,

Do you know where are theses configuration files you tell ? and their name ?

PostPosted: 03. August 2007 13:56
by dnaton
up :)

Nobody has an idea about my question ?

PostPosted: 03. August 2007 18:38
by lyntuan
dnaton wrote:up :)

Nobody has an idea about my question ?

Xampp\apache\conf
Xampp\apache\bin\php.ini
Xampp\mysql\bin\my.cnf

PostPosted: 02. September 2007 02:10
by Izzy
=================================================
Take a look at the new DeskTopXampp launch control posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967

The DeskTopXampp launch control for XAMPP and XAMPPlite (DTX.exe)
is available here:
http://zedfiles.com/DTX/

I highly recommend DTX.
=================================================

PostPosted: 22. September 2007 22:05
by Draven
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

PostPosted: 29. September 2007 20:15
by wyth
Draven, just wanted to say this worked a treat. Thanks for working this out -- I can stop fretting about it now.

PostPosted: 03. October 2007 01:59
by lyntuan
AMPstart launchs XAMPP without reading registry. XAMPP can starts from anywhere.

PostPosted: 25. October 2007 05:09
by skeezix
Draven wrote: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.


Hey that helped me out as well! Many thanks for your work!!!!!
:D :D :D
Skeezix

PostPosted: 21. June 2008 18:28
by zoia
Opening the registry i found that the key and value were ok but i take the same error

PostPosted: 21. July 2008 06:17
by Create Sean
Thank you - this worked perfectly for me.

PostPosted: 10. August 2008 01:39
by dallen
Do I need the 'install directory' in the registry? In other words, can I use the control panel even though I get this error? I'm trying to keep out any xampp entries in my registry.