Apache won't start in folders with UTF-8 paths [Answered]

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

Apache won't start in folders with UTF-8 paths [Answered]

Postby edwinbradford » 18. February 2013 18:14

Hi, I've been running XAMPP fine for a couple of years on an English version of Windows and have just installed it on a PC running a Japanese version of Windows Professional 32 bit. Apache works fine if I install it to any directory with a latin path but if I move it to any directory with a Japanese UTF-8 path it fails to run. Is there a solution to this? I'm running XAMPP 1.8.1. I did not install Tomcat, Mercury or Filezilla, I assume that's okay.

Here's the log file in case it helps:

Code: Select all
[Tue Feb 19 01:32:54.493825 2013] [ssl:warn] [pid 2072:tid 216] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 19 01:32:54.666835 2013] [mpm_winnt:notice] [pid 2072:tid 216] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue Feb 19 01:32:54.676836 2013] [mpm_winnt:notice] [pid 2072:tid 216] AH00456: Server built: Aug 18 2012 12:41:37
[Tue Feb 19 01:32:54.677836 2013] [core:notice] [pid 2072:tid 216] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Feb 19 01:32:54.692837 2013] [mpm_winnt:notice] [pid 2072:tid 216] AH00418: Parent: Created child process 376
[Tue Feb 19 01:32:55.952909 2013] [ssl:warn] [pid 376:tid 228] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 19 01:32:56.035913 2013] [mpm_winnt:notice] [pid 376:tid 228] AH00354: Child: Starting 150 worker threads.
edwinbradford
 
Posts: 6
Joined: 18. February 2013 17:56
Operating System: Windows 7 Professional 32 bit

Re: Apache won't start in folders with UTF-8 paths

Postby JonB » 20. February 2013 18:04

Did you look in the Windows event viewer for errors?

My 'guess' is that the batch files are ISO format.

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache won't start in folders with UTF-8 paths

Postby edwinbradford » 21. February 2013 02:47

I tried looking at the event viewer but I couldn't find anything relating to XAMPP. I wasn't sure where exactly I should be looking to be honest. The .bat files relating to starting Apache and MySQL within the root directory of XAMPP are both in ANSI format, at least that's what Notepad++ is telling me. Is that what you're referring to? MySQL starts, its only Apache that won't run if that's any help.
edwinbradford
 
Posts: 6
Joined: 18. February 2013 17:56
Operating System: Windows 7 Professional 32 bit

Re: Apache won't start in folders with UTF-8 paths

Postby JonB » 21. February 2013 18:20

I tried looking at the event viewer but I couldn't find anything relating to XAMPP. I wasn't sure where exactly I should be looking to be honest


A possible fault probably involving httpd.exe

B. What does the Control Panel Dialog box say is going on?

I am presuming you meant moving the actual XAMPP folder hierarchy - including executables - into a non-latinate UTF path, not just the DocumentRoot

You might try running httpd.exe from the Command Line - that will result in any Apache start errors being written to the Command Window session.

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache won't start in folders with UTF-8 paths

Postby edwinbradford » 22. February 2013 06:52

Hi, thanks for the suggestion. I ran httpd.exe from the command line and got the following message. The \x00 type digits are where the Japanese UTF8 characters should be.

Code: Select all
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

httpd.exe: Syntax error on line 35 of C:/Users/\xe3\x82\xa8\xe3\x83\x89\xe3\x82\
xa6\xe3\x82\xa3\xe3\x83\xb3\xe3\x83\xbb\xe3\x83\x96\xe3\x83\xa9\xe3\x83\x83\xe3\
x83\x89\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xbc\xe3\x83\x89/\xef\xbc\x92\xef\xbc\x93
\xef\xbc\x90GB/\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x90/xampp/apache/conf/httpd.conf
: ServerRoot must be a valid directory


The XAMPP control panel dialog box says:

Code: Select all
Error: Apache shutdown unexpectedly.
14:30:31  [Apache]    This may be due to a blocked port, missing dependencies,
14:30:31  [Apache]    improper privileges, a crash, or a shutdown by another method.
14:30:31  [Apache]    Check the "/xampp/apache/logs/error.log" file
14:30:31  [Apache]    and the Windows Event Viewer for more clues


And yes I meant the whole XAMPP directory and not any one part of it. After moving it I run setup_xampp.bat as instructed. It just looks like something is incompatible with Unicode somewhere?
edwinbradford
 
Posts: 6
Joined: 18. February 2013 17:56
Operating System: Windows 7 Professional 32 bit

Re: Apache won't start in folders with UTF-8 paths

Postby edwinbradford » 22. February 2013 07:14

Solved. The conf files in xampp\apache\conf were in ANSI format. I changed httpd.conf to UTF8 first then got a series of warning messages and converted each referred conf file to UTF8 within Notepad++. Eventually it stopped complaining. I used UTF8 without a BOM. So I take it that XAMPP in its current form is not Unicode compatible then? Is that a bug or by design?

Thanks everyone for the help, very much appreciated.
edwinbradford
 
Posts: 6
Joined: 18. February 2013 17:56
Operating System: Windows 7 Professional 32 bit

Re: Apache won't start in folders with UTF-8 paths

Postby JonB » 22. February 2013 21:16

So is it working?

Do those same .conf files work if you use them in a ISO folder path? (sans the japanese characters) They should - as ASCII and ANSI character sets are subsets of UTF-8.

So I take it that XAMPP in its current form is not Unicode compatible then? Is that a bug or by design?


There is a third possibility you know - omission - no one expected an English distribution to be used on a non-latinate filesystem when they were writing the configuration files :shock:

What is UTF-8, exactly? OK, you don't have to know this to get CityDesk to work, but you may be wondering, so we'll try to explain it here.

In the olden days computers used 8 bits to store a letter. There are 256 possible combinations of 8 bits. That's enough for many languages, but not enough for Asian languages like Chinese which have thousands of different "letters." There were many different incompatible encoding schemes for jamming different alphabets into the same 256 combinations. The most common format, ASCII, defined what would happen in the first 127 combinations, but it was only good enough for English.

To simplify the problem a consortium of computer makers came up with an international standard called Unicode. Under Unicode, you would use 16 bits to store a letter. That gives you room for 65,536 different letters, which is enough for just about every known alphabet all at once, making multilingual text on computers possible.

The trouble is that all the people who spoke English were distracted that they would have to "waste" an extra 8 bits on each letter even when they were just writing in English. And besides, there were already a lot of existing computer systems that assumed 8 bits = 1 letter. So the Unicode Consortium came up with a scheme called UTF-8. In this scheme, all English language letters (and indeed, all characters below 128 from the old fashioned ASCII character set) would be written out exactly the same way as before. Only non-English letters would be encoded using between 2 and 6 bytes. This scheme is the most popular method of encoding Unicode on the Internet.

The details, of course, are somewhat more complicated than this, and in fact, this is a rather grotesque oversimplification, but we've probably already bored you to tears so we'll move on now.


http://www.fogcreek.com/citydesk/2.0/he ... etiss.html

http://stackoverflow.com/questions/7018 ... nsi-format

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache won't start in folders with UTF-8 paths

Postby edwinbradford » 25. February 2013 07:43

MySQL and Apache both launch and run correctly, however since posting the last post I found that I couldn't access either the XAMPP index page nor my site via localhost. I'm sorry, I don't have the bug to hand as I moved XAMPP to a latin only directory structure at that point.

If I understand your second question then the answer is the same .conf files work if the folder path has only ANSI characters but stop working when the folder path contains Japanese characters. Interestingly, if I move the XAMPP install folder and run the XAMPP setup .bat file again it overwrites the .conf files in ANSI format and Apache won't run again.

Thanks for posting that info for me, the only distribution I've seen is the one at apachefriends.org, so when you say English Distribution I think I'm right in saying its the only distribution? Please correct me if I'm wrong. I'm not sure how Japanese developers are installing XAMPP but my guess is they install it to the default root directory of their C drive in which case there are no problems. If they try to install it elsewhere they will probably hit the same problems as me.

Anyway, thanks for helping out. Maybe this thread will be of some help to other people.
edwinbradford
 
Posts: 6
Joined: 18. February 2013 17:56
Operating System: Windows 7 Professional 32 bit

Re: Apache won't start in folders with UTF-8 paths

Postby JonB » 25. February 2013 08:10

I'm not sure how Japanese developers are installing XAMPP but my guess is they install it to the default root directory of their C drive in which case there are no problems.


I'd agree with that assessment - we always suggest installing XAMPP in the root of a drive.

'English distribution' was a poor choice of words. I should have said German and English (Latinate) I have done some research, there was a Japanese XAMPP at some point. All the 'work' nowadays is done in German and English. The XAMPP installer still includes some .jp files, but I don't think there's a complete locale setup for anything other than German or English.

http://www.apachefriends.org/en/partner-friends.html

On the guess that you may be functional in Japanese I suggest you check out these sites. I think the first is no longer maintained actively.

http://exxaxon.co.jp/

XAMPP is only one of many variants of Apache. Its one of two very popular 'suites' that include Apache, MySQL and other programs. The other is WAMP.

Beyond that you can always install Apache and MySQL standalone, and I am sure there's full localization in that application route.

http://www.apache.jp/

BTW - I'm a specialist in multi-lingual development (part of the reason I am so interested). I can empathize with how complex all this appears (because it is). For one team I am on, our next huge task is moving a whole ten-year old Internet project off ISO to UTF-8, its daunting. Separately, I personally develop and maintain a portal and database system in four languages (using a framework). Fortunately for me, they are all European tongues which simplifies things a bit.

Good Luck

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache won't start in folders with UTF-8 paths

Postby edwinbradford » 25. February 2013 08:45

Thanks Jon. There's some great information there. I can generally read Japanese sites but its painfully slow for me. I'll take a look at WAMP and see what the status is. It looks like I got Apache and MySQL working by changing the format of the files to UTF8 but I decided to give up when I hit what I think was a PHP problem although I don't have the error any more.

I also did a quick bit of research, I checked through a couple of Japanese sites with guides for XAMPP installation but they were both installing to the default directory in which case as I mentioned they would not encounter a problem. For the time being its probably too time consuming for me to be worth the results but I'll bookmark the thread and come back to it if I get more time.

Thanks again.
edwinbradford
 
Posts: 6
Joined: 18. February 2013 17:56
Operating System: Windows 7 Professional 32 bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 108 guests