XAMPP / Apache doesn't like Polish language

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

XAMPP / Apache doesn't like Polish language

Postby trejder » 15. July 2013 14:22

I have run into very strange issue, when using Javascript-based translation of client-side libraries used in HTML/PHP project served by XAMPP 1.8.1 or Apache under it.

Though I have no idea, why this is happening, it clearly seems that server doesn't like Polish locale file (and only this one). Every time I switch to Polish language, I'm getting "500 Internal Server Error" reported by my browser. Only for this language!

It was confirmed in many separate projects.

For example, I'm using Twitter Bootstrap framework with date picker dropdown, which is localized. It has 38 language files in "js/locales/" folder, named "bootstrap-datepicker.LANGUAGECODE.js" and I can use this date picker with any of the 37 languages except for Polish. Whenever I select Polish, and browser is about to load "bootstrap-datepicker.pl.js" it returns 500.

The same for Redactor library, wysihtml5 editor and so on.

Finally, I have also my own, private project, which uses localization based on i18ltext.com library and it also fails only for Polish language. Up until now, I've added English, German, Chinese and Polish. I can see my application translated to any language, except Polish. Whenever I select it, and browser is about to load (via AJAX) file "c:\XAMPP\htdocs\mobile\public\pg-demo-bootstrap\locales\general.pl.json", it dies with 500. Rest three files in this folder are just fine.

I confirmed that this is XAMPP for Windows or Apache under XAMPP related issue. I have tested all these applications under two different servers (nginx under Linux and Mobile Chrome on my phone) and none of them has this issue -- user can select and use any language.

I also confirmed, that this is not related to contents of this file (some faulty encoding was my first suspicions). I have filled "general.pl.json" with competely different content (once, different language and once completely unrelated content) and XAMPP again failed to load this file. Then I took original, unmodified "general.pl.json" and renamed it to "general.de.json" and when I picked up "German" language in my app, I could see Polish translation, i.e. strings taken from that file.

For some unbelievable reason, XAMPP or Apache under it gets wako, when file name contains "pl.json", "pl.js" or similar. I know, that this is stupid assumption, but evidences can't be denied.

I tried to copy project a little bit up in folder structure (placed copy right below root "htdocs" folder), to test if path length isn't a case here. So faulty file become "http://127.0.0.1/test/locales/general.pl.json". Again, nothing. I can select any language except Polish. When selecting it, project fails with 500 Internal Server Error.

This is a very simple, pure HTML, CSS, JS and jQuery project, no PHP or other server-side library, so possible issues with some incorrect entries in .htaccess file are not the case here. I run it through XAMPP because it contains some AJAX loading, so it would fail, if "index.html" file would be browsed directly, as file:///.

I don't like chasing ghosts and I don't actually believe in them in IT, but it really seems, that XAMPP or Apache has something about Polish language. This is the strangest case I met in IT for past five years or so.

Can someone try to help me and shed some light, where can be possible source of this strange issue?
trejder
 
Posts: 42
Joined: 13. April 2008 06:45

Re: XAMPP / Apache doesn't like Polish language

Postby trejder » 16. July 2013 09:23

After checking Apache's error.log:

Code: Select all
[Tue Jul 16 10:02:31.127793 2013] [win32:error] [pid 5128:tid 1680] [client 127.0.0.1:53455] AH02102: C:/XAMPP/htdocs/mobile/public/pg-demo-bootstrap/locales/general.pl.json is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://127.0.0.1/mobile/public/pg-demo-bootstrap/
[Tue Jul 16 10:02:31.127793 2013] [cgi:error] [pid 5128:tid 1680] (9)Bad file descriptor: [client 127.0.0.1:53455] AH01222: don't know how to spawn child process: C:/XAMPP/htdocs/mobile/public/pg-demo-bootstrap/locales/general.pl.json, referer: http://127.0.0.1/mobile/public/pg-demo-bootstrap/

I'm more than convinced, that Apache is trying to execute this file, as executable and fails.

Good questions are:

1. Why it claims, this is script, though ".pl" (Perl?) part is in the middle and file actually ends with ".js" or ".json"?

2. How to fix this, so Apache would start treating this file as a simple Javascript, like other language files?
trejder
 
Posts: 42
Joined: 13. April 2008 06:45


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests