ServerRoot must be a valid directory

Problems with the Windows version of XAMPP, questions, comments, and anything related.

ServerRoot must be a valid directory

Postby HalenM » 27. December 2011 02:42

I have placed Xampp (Lite) Portable on my usb (Does not work on windows7 either).

When I run apache_start I get the message:

Code: Select all
.. Some german stuff
Please close this command only for Shutdown
Apache 2 is starting ...
httpd.exe: Syntax error on line 35 of F:/Applications/Portable Applications/xamp
p/apache/conf/httpd.conf: ServerRoot must be a valid directory


Line 35 of httpd.conf is

Code: Select all
ServerRoot "/xampp/apache"


As far as I can see, that is correct (it should be with a new installation anyway -.-)

Also, when using Xampp control panel and pressing start. It says 'busy...' before saying 'whatever started' if that means anything.

--------------------------------------------------

Also when running MySQL I get

Code: Select all
MySQL is trying to start
Please wait  ...
MySQL is starting with mysql\bin\my.ini (console)
111227 11:48:59 [ERROR] Can't find messagefile 'F:\xampp\mysql\share\errmsg.sys'

111227 11:48:59 [Warning] Can't create test file \xampp\mysql\data\Hayden-PC.low
er-test
111227 11:48:59 [Warning] Can't create test file \xampp\mysql\data\Hayden-PC.low
er-test
mysql\bin\mysqld: Can't change dir to '\xampp\mysql\data\' (Errcode: 2)
111227 11:48:59 [ERROR] Aborting

111227 11:48:59 [Note]


--------

I have xampp in folder f:/applications/portable applications/xampp if it is not detecting that for some reason, in the last message is tries to find f:/xampp


Thanks
HalenM
 
Posts: 2
Joined: 27. December 2011 02:33
Operating System: Windows 7

Re: ServerRoot must be a valid directory

Postby Sharley » 27. December 2011 04:47

The recommended location for the xampp folder is to the root of the USB drive not to a folder tree especially one with a space or special character.

This from the readme_en.txt file found in the xampp folder
readme_en.txt file wrote:* QUICK INSTALLATION:

[NOTE: Unpack the package to your USB stick or a partition of your choice.
There it must be on the highest level like E:\ or W:\. It will
build E:\xampp or W:\xampp or something like this. Please do not use the "setup_xampp.bat" for an USB stick installation!]


Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: ServerRoot must be a valid directory

Postby HalenM » 27. December 2011 04:53

Thanks Sharley, is there anyway around that? I really want it in that directory :/ If not I'll just remove, I dont really need it anyway, would be nice to have just incase I do though

Edit: It seems if you run xampp_setup it will change everything to be suited to the current directory,
however you will need to run it every time the drive letter changes
HalenM
 
Posts: 2
Joined: 27. December 2011 02:33
Operating System: Windows 7

Re: ServerRoot must be a valid directory

Postby Sharley » 27. December 2011 05:06

You can run the setup_xampp.bat file which will set the paths but you loose the portability factor as that bat file only changes the paths in the XAMPP system files not in any of your own created or installed application files.

You could also use your text editor and find all the /xampp paths and add your preferred path
/Applications/Portable Applications/xampp
but then, as I pointed out about spaces in folder and or file names (a Windows thing not supported in the world of Apache/MySQL), this may result in errors in the future.

Even on a hard drive the preferred location is the root of the drive or partition.

BTW if you don't really need it then add it to the root of the drive only when and if you need it as it will work for you then.

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests