What I was doing:
I just recently backed up a client's website using this excellent and handy module and aimed to recreate it on a local Debian server using the demonstration site install module. Upon replay of the SQL dump the PHP interpreter hit countless SQL errors which made me wonder what was broken with either the demo module or the demo install profile.

What made me suspicious:
I checked the SQL dump file in my files/demo folder using the vi editor and it showed something like that in the attached screenshot.

Workaround:
Before running the SQL dump using the install profile open up the SQL dump in a decent text editor (like Notepad++ for Windows) and perform a conversion of the EOL characters to UNIX format.

Issue:
The demonstration site module does not handle CRLF line endings correctly. I do not know if this is actually an issue or rather a user error (==me doing stupid stuff). I leave that to the module's maintainers to judge.

Probable fix:
I suppose an additional check for '\r' in the function _demo_reset in file demo.admin.inc should fix it, but I have not tested that.

Hope this helps anyone running into the same issue when incorporating Windows OS in daily tasks. I certainly will stick to UNIX-like OS for future migrations :)

When I backed up the website's files using ordinary FTP download the files got converted to use DOS/Windows end of line characters (CRLF).

CommentFileSizeAuthor
demo_eol_issue.jpg31.14 KBsebastian.klinge
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaurav.kapoor’s picture

Status: Active » Closed (outdated)