Note that there are some explanatory texts on larger screens.

plurals
  1. POApache / XAMPP for Windows incorrectly treats file as executable
    primarykey
    data
    text
    <p>I'm running <code>XAMPP 1.8.1</code> with <code>Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7</code> on my dev machine to test my projects. In both my private project and in well known Bootstrap Datepicker component I can choose any language (one of 38 in case of datepicker) <strong>but not Polish</strong>.</p> <p>Upon deeper investigation, I found out that this is caused, because when browser tries to load locale file (<code>general.pl.json</code>, in case of my project and <code>bootstrap-datepicker.pl.js</code>, in case of Bootstrap Datepicker), server (Apache) fails with <code>500 Internal Server Error</code>.</p> <p>After analyzing Apache <code>error.log</code> file, I found out, that this is happening, because Apache somehow is trying to execute this file as (probably Perl) executable script: </p> <pre><code>[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/ [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/ [win32:error] [pid 5128:tid 1644] [client 127.0.0.1:53465] AH02102: C:/XAMPP/htdocs/us/ustv/assets/6dafd2fe/js/locales/bootstrap-datepicker.pl.js is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://127.0.0.1/us/ustv/content/manage/update.html?id=4 [cgi:error] [pid 5128:tid 1644] (9)Bad file descriptor: [client 127.0.0.1:53465] AH01222: don't know how to spawn child process: C:/XAMPP/htdocs/us/ustv/assets/6dafd2fe/js/locales/bootstrap-datepicker.pl.js, referer: http://127.0.0.1/us/ustv/content/manage/update.html?id=4 </code></pre> <p>I did a lot of tests with changing contents and file names, using many fake files to pretend this file (Polish locale) and it all brought conlusion, that content is not a problem, only <code>.pl</code> in filename makes trouble.</p> <p>Good questions are:</p> <ol> <li><p>Why Apache claims, this is script, though <code>.pl</code> (Perl?) part of filename is in the middle and filename actually ends with <code>.js</code> or <code>.json</code>?</p></li> <li><p>Why Apache <strong>for Windows</strong> is trying to execute Linux/Unix/Bash scripts and is looking for <code>#!</code> or <code>'!</code> characters in the first line of it?</p></li> </ol> <p>Even better question is, how to fix this, so Apache would start treating this file as a simple Javascript, like all other locale files? And would not attempt to execute it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload