LLLLLLL Posted February 23, 2013 Share Posted February 23, 2013 A customer of mine has a database that is now filled with "rn" characters all over the place. These characters exist where the fields in question used to have blank lines. I'm assuming the customer did some sort of backup/restore or something. The problem isn't isolated to a single table or column; it is every text column in every table. At this point it's all fixup, but I'm wondering how this happened. The customer "has no idea" but I think they are afraid to admit the problem was self-inflicted. But out of my own curiosity, I'd like to know how this type of damage is even possible. Do you think there is some bad setting on the export or import that would have done this? Any other ideas how someone created this issue? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 23, 2013 Share Posted February 23, 2013 \r\n is a carriage return. Quote Link to comment Share on other sites More sharing options...
LLLLLLL Posted February 23, 2013 Author Share Posted February 23, 2013 Yes, Jessica. But that's not the question. And \r\n is not what's in the database. "rn" is in the database. I'm wondering how it got there. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 23, 2013 Share Posted February 23, 2013 (edited) What are you using to view the data? More importantly why does your customer have access to do a "restore" that they don't know how to do correctly? If the customer is messing with data and doesn't know what they're doing, you're going to have even bigger issues in the future. The fact that where you "used to" have blank lines (ie \r\n") and now claim to just have "rn" - it's relevant that \r\n is a carriage return. Your post makes it sound like you have absolutely no idea about that. Edited February 23, 2013 by Jessica Quote Link to comment Share on other sites More sharing options...
LLLLLLL Posted February 23, 2013 Author Share Posted February 23, 2013 The product is installed on the customer's server; I don't control the data. They can destroy the data in any way they please with standard cPanel tools. Apparently they did. I'm looking at their data with phpMyAdmin. Quote Link to comment Share on other sites More sharing options...
Psycho Posted February 23, 2013 Share Posted February 23, 2013 I'm guessing that somewhere in the code somebody inserted a stripslashes() on data before it was inserted into the database. So, what would have been "\r\n" would now be "rn". And, now that I think of it, maybe that stripslashes() was already there to workaround problems with having magic quotes turned on in the server. And, maybe that option has been turned off. Quote Link to comment Share on other sites More sharing options...
LLLLLLL Posted February 23, 2013 Author Share Posted February 23, 2013 I don't think magic_quotes was ever turned on because the customer is using HostGator and they generally have that ridiculous option turned off. There's not a chance it's a stripslashes coding issue because there's no code that changes every TEXT column in the entire database; the fact that everything changed at once seems to lead me to some sort of export/restore thing. Not sure what the guy did. I guess it is a mystery to us all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.