The most peculiar WordPress problem yet

I was beyond dismayed tonight to load up my browser and discover that my website, for whatever reason, just wasn’t working. Firefox would just bring up a completely blank screen. Safari returned a strange error:

Safari can’t open the page “http://room34.com/”. The error was: “Operation could not be completed. (kCFErrorDomainCFNetwork error 302.)” (kCFErrorDomainCFNetwork:302) Please choose Report Bugs to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.

Uhh… OK.

Needless to say, it’s not something I’ve ever seen before, and if Google is any indication, (almost) no one else has either.

After inspecting my files and my data tables to see if anything had been altered (i.e. hacked — and no, it hadn’t), and watching The Colbert Report, I decided I had no choice but to confront the rat king and start stepping through all of the nested include files that comprise the WordPress application, hoping to find the exact point at which the whole thing was going kerblooey.

Eventually I did manage to find the precise line in the precise file where the site ceased to return any output to the browser. It happens to be line 20 in wp-includes/taxonomy.php, which goes something like this (minus the insistent tendency of WordPress to automatically insert smart quotes everywhere):

$wp_taxonomies['link_category'] = (object) array(’name’ => ‘link_category’, ‘object_type’ => ‘link’, ‘hierarchical’ => false);

Having abandoned efforts to further dissect the innards of WordPress, I tried commenting out the line. No luck. Next I tried just sticking a return; at the top of the file, essentially scuttling everything it does. That did display the page, but without the functions in this file it was so riddled with error messages as to be unusable. Next, I returned to line 20 and emptied out that array it creates (commented it out, to be precise), leaving, in essence:

$wp_taxonomies['link_category'] = (object) array();

And, whaddayaknow… it freakin’ works! In fact, on cursory perusal of the site, I don’t even see any problems, so I’m not sure where this particular subarray gets used, or whether my own idiosyncratic taxonomic structure even needs it. And I’m sure within approximately 24 seconds of posting this entry, I’ll discover it. But for now, things seem good… although I hate having to settle for a “solution” like this, especially given the effort it took to pinpoint the problem.

Update, May 30, 2008: I was informed by my hosting provider that last night they performed a PHP upgrade, which seems to have been what precipitated this problem. So perhaps I have discovered a conflict between PHP 5.2.6 and WordPress 2.5.1.

Update, June 2, 2008: After working briefly with my ISP on this issue, they have modified a configuration setting on the server to solve this problem. Here’s what they had to say about the change: The server was previously configured to support PHP4 backwards compatibility via the following directive:

zend.ze1_compatibility_mode 1

They’ve removed that compatibility mode setting in the configuration for my virtual host, as such:

zend.ze1_compatibility_mode 0

This change on their part has solved my problem, as I have now reinstated the original WordPress code in taxonomy.php and the site is functioning properly.

And another thing...

Comments

ted serbinski said:

I’ve actually been seeing this problem too and I actually think it is because of Apple’s latest 10.5.3 fix they pushed out. I got the same error for a lot of my websites I run *locally* on my machine but worked fine on the web. Safari through this error and Firefox was blank. I think it’s a rendering issue within MacOS at the core level.

I’m now seeing this error on Facebook on every other page load too.

Glad I’m not the only one :)

June 1, 2008 7:46 pm

room34 said:

Thanks for this feedback. I saw some stuff about it being related to 10.5.3 — at least, the message I was getting in Safari, that is — but I don’t think the problem I was experiencing on my site was caused by my 10.5.3 upgrade. I observed the site not working in IE on Windows, as well. Granted, it was Windows running on Parallels Desktop on the same Mac, but I don’t think the Mac OS version would affect IE’s performance in a VM running Windows XP. (And the server the site is running on is FreeBSD, not Mac OS X.)

Anyway… as I noted my ISP had just upgraded PHP on the server, in the time frame of the hours between my observance of the site working, and then not working.

I still have no idea why the particular line in WordPress could cause/solve the problem though, nor especially why the problem still (apparently) occurred with that line commented out!

June 2, 2008 11:28 am

ted serbinski said:

I would still be in favor of a core networking issue within Mac OS 10.5.3 causing the error and then this filters up to Safari / Firefox or even over to Parallels networking interface. Mostly because I still have this issue for some of my sites running locally and nothing has changed besides 10.5.3 upgrade. And well, if I see this error on Facebook.com, I’m guessing my computer and not them :)

Hopefully we’ll figure out a resolution soon enough tho!

June 2, 2008 2:06 pm

room34 said:

I just got word back from my ISP that they located something in the Apache config that might be what was causing the problem. They’ve changed my site’s configuration and want me to test out the original WP code to see if it’s working now.

Again — I really do not believe this error was caused by anything with Mac OS X… it’s just the error Safari was displaying. But it’s always possible that the OS X update included modifications that mirrored the configuration problem on my ISP’s web server in some way. Are you serving your local pages through the OS X distribution of Apache or through something like MAMP?

June 2, 2008 2:45 pm

room34 said:

OK, I just changed the taxonomy.php code back to the standard WordPress value, and the site is loading just fine, so the configuration change my ISP made fixed the problem. I’ll check with them and see if they’re willing to share what exactly it was that they changed.

June 2, 2008 2:49 pm

room34 said:

Just got an answer back from the ISP on the change they made. I’m adding it in as an update in the main body of the post.

June 2, 2008 3:43 pm

Sapper21A said:

I was running Safari and Firefox this morning without an issue. Then decided to run Software Update and saw a new update. Since then I have had issues running both browsers. I have an iMac 10.5.3 running wirelessly with Airport Extreme .11n. I restart iMac and browsers work well for a short time (like a time out issue). Now i have learned to Turn AirPort off, wait a few, then turn it back on and that usually does the trick.
I searched this online w/ google, and this was the only site talking about it, and their are my 2 cents.

June 2, 2008 3:47 pm

room34 said:

Well clearly there are some obscure networking issues happening out there with this 10.5.3 update. My own experience has probably been minor compared to those you and others are describing. My MacBook is accessing the Internet just fine other than this issue I was having with my own site (which, as I described above, doesn’t really seem to have anything to do with the Mac OS X update), and my iMac at work is also running just fine with the update.

June 2, 2008 4:00 pm

Sapper21A said:

Are you running Airport Extreme?

June 2, 2008 4:07 pm

John said:

I think it’s an OS X upgrade issue as well. I started having these same problems accessing all kinds of web sites (banking, Facebook, MacInTouch, etc.) after upgrading no matter which browser (OmniWeb, Firefox, or Safari) I am using. While it sucks we all have this problem, it’s nice to know it’s not just me.

June 3, 2008 3:26 pm

ted serbinski said:

Per this post on 10.5.4 it is said to fix “…sometimes missing HTTP headers.” — that might be what we’re experiencing :)

June 5, 2008 9:59 am

Justin said:

Well, I can tell you I don’t think its 10.5.3 related. Im having the same problem trying to post to a particular forum. http://www.actionscript.org. I have tried 4 different computer one pure windows machine (dell - IE & FF), PowerMac 10.4.11, Macmini 10.5.3, and Macbook Pro 10.5.2. Two completely different networks. All with the same results. I have tried everything to no avail. I tired FireFox and Safari on ever machine and get the same results. So if its an apple problem its infected my dell. My home network is a Airport Extreme and my work network is corporate Fiber Optic no problems there. So I think its server side.

June 5, 2008 11:16 pm

Justin said:

Well My problem seems to be related to subject line length any thing over 20char. I was trying to get the error for a repot you know the old “test test” and it posted soooooo… Im not sure what that means.

June 5, 2008 11:33 pm

David said:

At first: Thanks for opening this topic! It’s the only (potential) helpful one i could find.

Needless to say, I’m having the same problem with a fresh WP-installation. The same installation on my server works but on my clients server it doesnt and brings up this strange message above. So I guess it’s an server issue, as well.

Will try to walk through the ze1_compatibility_mode - method with my clients ISP and get back, when it’s done. it’s such a damn urgent project.. could scream about this bug!

June 23, 2008 4:48 pm

room34 said:

I would venture a guess that your server and the client’s server are running different versions of PHP. The best way to test this is to drop a little script onto the server containing the following code:

<?php phpinfo(); ?>

Load that up in a browser and it dumps tons of useful information about the current PHP installation. (Be sure not to keep it there after you need it though, as hackers can — potentially — make use of some of the information to exploit your server.)

June 23, 2008 8:46 pm

David said:

Already checked that. Both running PHP 4.3.10

Only (main) difference is that the clients server runs with register_globals = ON and safe_mode = ON which are both OFF on ours (safemode off because we use SSPDirector for some projects).

Does this have an influence on running wp - causing such a strange error message?
We’ll try to change that zend-directive today - though.. when I think about it..
it shouldnt be there, if it’s there to provide backwards comp. to PHP4, cause the server is running 4.3.10, right? …
let’s see what the ISP says..

Will get back with results soon, hopefully… Further ideas are more than welcome!

June 24, 2008 5:07 am

Edward said:

Apple have just released 10.5.4. it mentions, amongst other things, the following Safari improvement:

“Addresses a potential performance issue when loading secure web pages.”

Could this be what we’ve been waiting for?

Visit http://support.apple.com/kb/HT1994 for more info.

June 30, 2008 3:35 pm

room34 said:

I had heard somewhere else that issues similar to this (if not this exact problem) were going to be resolved in 10.5.4.

June 30, 2008 7:14 pm

David said:

Nope.. 10.5.4 installed but still the same error..

News from my clients ISP: The clients server is natively configured for PHP4, so the zend-directive isn’t there at all…

Any further ideas? It’s really really urgent..
By now to move to another ISP would be the faster way to solve the problem.

July 3, 2008 6:26 am

David said:

Problem solved (at least in my case):

The clients server memory-config was set to 8MB, but 2.5.1. needs more,
so we could solve the problem by setting it to 16MB.

Normally WP gives another error-message in this case, doesn’t it?

July 3, 2008 7:34 am

Jules said:

Interesting post.

I’m having trouble with this error, too. However, I’m not using PHP, but JSP on Vignette server. It’s an intranet site that renders correctly in all browsers but Safari. Each time I refresh the page, it renders differently. The Activity window shows that various elements are not being loaded due to the kCFErrorDomainCFNetwork at line 302 error. Sometimes CSS files are not downloaded and other times images are not (or random combinations).

The references I’ve found to this error are related to either PHP or the iPhone.

The search goes on.

Nice site!

August 21, 2008 3:25 pm

pepijn said:

I had the same problem to, using MAMP here.
I have multiple installations of Wordpress running here, so far only one(trunk version) gave this error. for me the solution was to disable zend optimizer in MAMP.

This is indeed the only useful site so far.
Is it the combination of Mac+MAMP+Wordpress, or does it happen to other systems as well?

October 10, 2008 8:39 am

room34 said:

Well I was actually seeing the error on a production server running OpenBSD, so it’s not MAMP- (or even Mac-) specific. The error message itself is Safari-specific, but the problem that was causing it, in my case at least, was not.

Incidentally I’ve had this error message crop up occasionally in Safari on my iPhone since this time (looking at other sites, not my own), but I don’t think I’ve ever seen it on the Mac again.

October 10, 2008 9:38 am

Post a Comment