This is often caused by an incorrect mod_rewrite rule in the VirtualHost
container or in the .htaccess file.

Something like this will cause it:

RewriteRule /([a-z0-9]+) /pastebin.php?show=$1

When it should be:

RewriteRule ^/([a-z0-9]+)$ /pastebin.php?show=$1

Turning on RewriteLog will help see the problem, which is that the fcgi
Alias is also matched by the RewriteRule and applied; the imprecise
regular-expression matches part of the fcgi path and corrupts it:

RewriteEngine on
RewriteLog /home/domain.net/logs/rewrite.log
RewriteLogLevel 9
RewriteRule /([a-z0-9]+) /pastebin.php?show=$1

logs/error.log shows:

[warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server 
error.
[error] [client 1.2.3.4] Premature end of script headers: pastebin.php

logs/rewrite.log shows:

(2) init rewrite engine with requested uri /info.php
(3) applying pattern '/([a-z0-9]+)' to uri '/info.php'
(2) rewrite '/info.php' -> '/pastebin.php?show=info'
(3) split uri=/pastebin.php?show=info -> uri=/pastebin.php, args=show=info
(2) local path result: /pastebin.php
(2) prefixed with document_root to 
/home/domain.net/domains/pastebin.domain.net/public_html/pastebin.php
(1) go-ahead with 
/home/domain.net/domains/pastebin.domain.net/public_html/pastebin.php [OK]
(2) init rewrite engine with requested uri /fcgi-bin/php-fcgi-wrapper/info.php
(3) applying pattern '/([a-z0-9]+)' to uri '/fcgi-bin/php-fcgi-wrapper/info.php'
(2) rewrite '/fcgi-bin/php-fcgi-wrapper/info.php' -> '/pastebin.php?show=fcgi'
(3) split uri=/pastebin.php?show=fcgi -> uri=/pastebin.php, args=show=fcgi
(2) local path result: /pastebin.php
(2) prefixed with document_root to 
/home/domain.net/domains/pastebin.domain.net/public_html/pastebin.php
(1) go-ahead with 
/home/domain.net/domains/pastebin.domain.net/public_html/pastebin.php [OK]

-- 
php5 5.2.3-1ubuntu6.2 causing problem
https://bugs.launchpad.net/bugs/173817
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to