FWIW, the _
lexicon function comes from connectors/lang.js.php
, not modx.config.js.php
. Same dynamic javascript approach to load it but a different file.
content-type: text/html; charset=UTF-8
Not sure how this could execute as PHP. It should be application/x-httpd-php
or at least something that ends in “php”.
Bob, I think you’re misunderstanding the content type. Whatever is returned in the the Content-Type response header is very different from the mime type the server uses to process a PHP file as PHP.
That said - the modx.config.js.php
and lang.js.php
connectors are supposed to return application/x-javascript
; not text/html
. That suggests the regular processing of that file encounters some kind of error which prevents it from setting the content type header properly.
In an ideal world, it would be reproducible enough to encounter the error and look at those files to see if there may be some output at the top of the response that’s not supposed to be there. Probably some kind of PHP notice. But as it’s been so hard to debug this, perhaps the next question is how to prevent anything from messing that file up in the first place.
If it is a php notice as I suspect, that suggests display_errors
is enabled in the PHP configuration and at some random interval PHP encounters some issue it logs directly to the output, breaking the config loading.
@gerbenNL: can you check in the phpinfo (manage > reports > system info > click the phpinfo link) what the local values are for display_errors
and error_log
? If display_errors
is on, please disable that (in a server control panel, or ask the sysadmin/host), and if error_log
is empty please also have that changed to log all errors into a central place, which will help treat the problem instead of the symptom later.
This (from StackOverflow) has always been my understanding of the difference (or lack thereof) between ContentType and MimeType, though I don’t claim to be an expert on either:
I’ve always viewed contentType to be a superset of mimeType. The only difference being the optional character set encoding. If the contentType does not include an optional character set encoding then it is identical to a mimeType. Otherwise, the mimeType is the data prior to the character set encoding sequence.
error_log: no value
display_errors: Off
Anyone got a clue why MODX sites (not only this one) have a blank manager?
See:
filling up 20 characters