[wp-trac] [WordPress Trac] #7361: Fixes for wp-app with PHP-CGI

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 20 18:10:03 GMT 2008

#7361: Fixes for wp-app with PHP-CGI
 Reporter:  yonosoytu  |       Owner:  anonymous
     Type:  defect     |      Status:  new      
 Priority:  normal     |   Milestone:  2.7      
Component:  General    |     Version:  2.5.1    
 Severity:  normal     |    Keywords:  has-patch
 I was trying to use Atom Publishing Protocol with my blog I a have found
 some quirks and bugs.

 My blog is hosted at Dreamhost, and, as far as I know, is using Apache
 2.0.61 and PHP 5.2.6 as CGI. My first problem was, obviously, the
 authentication, but neither the solutions from
 [http://codex.wordpress.org/AtomPub the Codex] or
 authentication-a-tale-of-atompub-wordpress-php-apache-cgi-and-ssltls/ this
 other blog post] worked. Reserching seems like PHP5 as CGI doesn't forward
 HTTP_AUTHORIZATION header, and nothing seems to change its mind. But it
 seems to forward REMOTE_USER as REDIRECT_REMOTE_USER. With my patch and
 this code in the .htaccess the authorization seems to work:

 RewriteCond %{HTTP:Authorization} !^$
 RewriteRule wp-app.php wp-app.php

 The other patch is to fix a bug in the wp-app.php code. It seems that when
 working with PHP as CGI, the "Status:" header needs to follow a specific
 format, with the number, and then the reason. The actual code (from
 Subversion, but it's there at least from version 2.5.1) do not send the
 number, making CGI/PHP/Apache to return with a "500 Internal Server Error"
 instead the "401 Credentials Requiered", confusing Atom clients. My other
 patch fixes this.

Ticket URL: <http://trac.wordpress.org/ticket/7361>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list