Our website has one section which often changes to match the user. (examples are greatly simplified).
user:Mike
last visit:Yesterday
The method used to update the content [which I cannot now change] is that php searches the html webpage for the default content, and replaces it with new content before serving it to the user.
$stats = "user:Mike
last visit:Yesterday";
$defaults = "user:Guest
last visit:None";
$code = implode($stats, explode($defaults, $code));
All was fine till we started backing up the site with GIT [a glutton for punishment, we are].
It seems that GIT changes the newline character in the html page, and therefore php can no longer find the original text.
I do not understand how newlines are stored or changed, but occasionally I get an error from GIT during the submit, saying it must change the newline, and offering 'unlock' or 'continue'.
This is followed by the site not working, till I copy/paste the default text from an externally stored copy into that page - and don't do a commit.
I am aware that I can use regex to make the search/replace but the page sees enough usage for me to avoid unneeded expressions.
My local machine runs Windows. The server runs Unix.