August 31, 2007 5:04pm
So, WordPress 2.3 beta adds support for AtomPub. All good. I installed it (separately to this blog, I'm just playing around), but all I could get out of the APE was a 401, even though I'd provided the correct authentication credentials. Looking at the code, with liberal use of the logging therein, I worked out that PHP_AUTH_* weren't being set, so I pulled out some auth code and tried it on it's own. No luck. Weird. I then grabbed a previously working snippet and tried that, but it was broken too. On both the servers to which I have easy access. I sent the snippet to Donal, and the snippet worked for him. WTF?
Turns out, that both the servers I was testing on are running PHP as a CGI, not using mod_php, and if PHP is being run as a CGI PHP_AUTH_* aren't available. Who knew? Well, someone, but not me. And they knew a workaround too.
Thanks for your help, Donal! And to all the cool people who are working on this (Elias Torres, Pete Lacey, Sam Ruby, Tim Bray get special mention).
The APE now exercises my beta blog. Now I have to work out why it can't delete stuff ...
August 31st, 2007 at 7:23pm
So, why install PHP using CGI? Is it using fast CGI perhaps?
September 5th, 2007 at 1:10pm
[...] a previous post I talked about getting HTTP authentication working when PHP is intalled as a CGI. That, however, [...]
September 7th, 2007 at 4:29am
This is something that we ran into and have been talking about. We haven't come to a conclusion on where to go with this yet. I'll have a blog post about this issue.
September 7th, 2007 at 10:21am
Looking forward to finding out what's going on. Let me know if you need data or eyes on the problem.
September 7th, 2007 at 12:52pm
Ah, you mean auth issue, not the PUT and DELETE issue ...
September 7th, 2007 at 3:38pm
Yes, the auth issue. Long story short, Apache doesn't pass HTTP basic auth headers to CGIs. Nothing specific to PHP.
September 7th, 2007 at 4:47pm
Thanks, Joseph.
September 19th, 2007 at 6:09pm
[...] mentioned previously that the AtomPub server in my WordPress installation wasn’t successfully deleting entries. [...]