Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Problems

Oof. I am having some sort of problem with my server. I was going to make a post on Monday, but something in my PHP and/or MySQL setup has changed in an odd way. (remember I reinstalled/upgraded pretty much everything on the system that is involved with serving web pages a couple of weeks ago)

If I try to post content that contains a single-quote character, I get a database error due to invalid syntax. The WordPress database driver is supposed to auto-escape the content to prevent this, but something seems to be causing that to fail. On the other hand, if I add code to escape the content just before it is saved into the table, then it winds up being double-escaped.

I’m running PHP 4.4.2, and MySQL 5.0.18. PHP reports that magic_quotes_gpc is on, and magic_quotes_runtime is off. I’ve tested on a clean install of WordPress with no plugins activated, and it exhibits the same behavior. Does anybody out there have any ideas on why this is happening?

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in WordPress and tagged , , , . Bookmark the permalink.

13 Responses to Problems

  1. Pingback: geek ramblings » Snow

Leave a Reply