[wp-trac] [WordPress Trac] #45138: mixed line endings: wp-config-sample.php uses CRLF (windows) line endings
WordPress Trac
noreply at wordpress.org
Sat Oct 20 15:08:25 UTC 2018
#45138: mixed line endings: wp-config-sample.php uses CRLF (windows) line endings
-----------------------------+------------------------------
Reporter: mattpr | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: trivial | Resolution:
Keywords: close | Focuses:
-----------------------------+------------------------------
Changes (by SergeyBiryukov):
* component: General => Upgrade/Install
Comment:
Hi @mattpr, welcome WordPress Trac! Thanks for the report.
> Not sure if this is on purpose?
It is, see #12775 (also #20890 and #28187).
That said, I think being able to edit the file in Windows Notepad is
actually a disservice to most Windows users, as it inserts the
[https://en.wikipedia.org/wiki/Byte_order_mark UTF-8 byte order mark],
causing the
[https://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F
Headers already sent] PHP warning (as seen in #27373, #27974, #28490,
#32575, #33626, #36213, #37036, and some other tickets).
The issue mostly happens in non-Latin locales, where `wp-config-
sample.php` is translated and includes non-ASCII characters. The solution
is then to re-save the file in UTF-8 without BOM using Notepad++ or other
editor.
`Warning: Cannot modify header information - headers already sent by
(output started at .../public_html/wp-config.php:1)` has been the
[https://codex.wordpress.org/%D0%A7%D0%90%D0%92%D0%9E/Cannot_modify_header_information
top FAQ entry] on https://ru.wordpress.org/support/ for almost 10 years
now. The page specifically advises against using Notepad for editing `wp-
config.php`.
So, while the original intention was to make it easier to edit the file in
Notepad, maybe we could reconsider that?
On the other hand, more and more people these days get WordPress from
their hosting provider without manually editing files, so perhaps making
the change now is not worth it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45138#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list