My cms site (using fckeditor) has suddenly started behaving very erratically.
Edit window works perfectly (as normal) but when I come to Save Changes, which instructs mySQL to save the edited content to the database table, then loads the respective page, there is no change to the content.
Sometimes it works, sometimes it does not - depending largely on how much text content is on the editpage window. i.e. if I just put 2 or 3 words, it will save it to the database, but if I put several lines or more - no change to database.
Anybody else experienced this kind of problem?
I think it may be something within the text that mySQL does not like, and causes it to ignore the UPDATE command, but I cannot narrow it down.
Anyone who can shed some light, I'd be very thankful.
Edit window works perfectly (as normal) but when I come to Save Changes, which instructs mySQL to save the edited content to the database table, then loads the respective page, there is no change to the content.
Sometimes it works, sometimes it does not - depending largely on how much text content is on the editpage window. i.e. if I just put 2 or 3 words, it will save it to the database, but if I put several lines or more - no change to database.
Anybody else experienced this kind of problem?
I think it may be something within the text that mySQL does not like, and causes it to ignore the UPDATE command, but I cannot narrow it down.
Anyone who can shed some light, I'd be very thankful.
Re: Page content not writing to database
Re: Page content not writing to database
It doesn't like them in the source code either (as used in the pop-up scripts etc).
Funny thing is, we've been using them without a problem up-to a few days ago when the problems started. And I hadn't made any changes to the code etc.
BTW, I use fckeditor on two different sites (both on same server) and the problem started on both simultaneously. It also has started on a news editor, unrelated to fckeditor. It therefore appears to be a serverside problem rather than a fckeditor problem per-se.
So is there a solution?
Re: Page content not writing to database
Andre
Re: Page content not writing to database
I did add a para to my last post, but I think you were replying at same time so may not have read:
"BTW, I use fckeditor on two different sites (both on same server) and the problem started on both simultaneously. It also has started on a news editor, unrelated to fckeditor. It therefore appears to be a serverside problem rather than a fckeditor problem per-se."
Could the problem be caused by someone serverside (not me) switching off magic quotes in php?
Re: Page content not writing to database
Andre
Re: Page content not writing to database
I agree with what you are saying about this being a bad idea, but should the facility for addbackslashes etc not be hardwired into the fckeditor, rather than expecting the fckeditor user to code it in at installation. I don't know, I am no expert, hence why it has taken me all day to track down the magic quotes setting.
Re: Page content not writing to database
FCKeditor is a client-side application and any security built into it can be easily bypassed. For example, if you configured the editor or added custom code to escape quotes as HTML references, a malicious visitor could submit malformed text and will be able to inject SQL into your queries. The rule of thumb is very simple - handle your own SQL escaping. It's a bit more work, but you will sleep better knowing your database isn't going anywhere.
Andre