php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34846 Related to a crash with mod_rewrite corrected earlier
Submitted: 2005-10-13 03:42 UTC Modified: 2005-10-14 04:21 UTC
From: jonathan dot semczyk at telecomlille dot net Assigned: tony2001 (profile)
Status: Closed Package: Apache2 related
PHP Version: 5CVS-2005-10-13 (snap) OS: Linux 2.4.26-grsec
Private report: No CVE-ID: None
 [2005-10-13 03:42 UTC] jonathan dot semczyk at telecomlille dot net
Description:
------------
hi,

I experienced the same behaviour as in the bug #34581 , 
sorry but when I answered I did not realized that it was for 
a FreeBSD, I was running on Linux. Anyway I had the segfault 
at the same time using mod_rewrite.

I applied the patch provided by Tony and it did run once, it 
was just too good to be true, now I have a blank page,

If I turn the rewrite engine off everything is fine, and if 
I replace the index.php by an index.html inside the htaccess 
it also works as expected.

As suggested in the other bug report it does the same if I 
put the rewrite code inside the httpd.conf

I have snapshot from Oct 12, 2005 22:30 GMT
I used the php.ini-recommanded
Apache 2.0.54


Reproduce code:
---------------
.htaccess code :

RewriteEngine On
RewriteRule ^.*$ index.php [L]


index.php :

anything, even only html.

Expected result:
----------------
see the text from the index.php for every URL

Actual result:
--------------
blank page. Apache gets the results from PHP as I get an entry 
in my logs :

 - - [13/Oct/2005:02:14:18 +0200] "GET /dsfsd,sdf HTTP/1.1" 
200 - "-" "Mozilla/5.0 ( .....

As you can see the rewrite works (I get a 200 return code) but 
the size of the returned page is 0.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-13 12:29 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

I can't reproduce it with Apache 2.0.54 on Linux.

 [2005-10-13 17:05 UTC] jonathan dot semczyk at telecomlille dot net
I tryied on an other environment. First I was on a Debian Sarge, now I am on an Ubuntu Breezy (also Apache 2.0.54).

php5-200510131230, latest at this time, gives me a blank page.

php5-200509011430 works, I know I had the segfault (bug #34581) with the version php5-200509221430 so I did my dev on an older one.

I have an Apache vhost, very simple configuration :

<VirtualHost *>
        ServerName karibou
        DocumentRoot /home/jon/karibou/public_html
        <Directory /home/jon/karibou/public_html>
                AllowOverride all
                order allow,deny
                allow from all
        </Directory>
</VirtualHost>

my configure line is :
./configure  --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php5/apache2 --disable-debug --with-pear=/usr/share/php --enable-calendar --with-gettext --enable-mbstring --with-mysql --with-pdo-mysql --enable-imap --enable-ldap --with-xmlrpc --with-pgsql --with-gmp --with-imap --with-imap-ssl --with-kerberos --with-gd --with-jpeg-dir=/usr --with-ttf --enable-gd-native-ttf --with-zlib --with-mcrypt
 [2005-10-13 17:30 UTC] tony2001@php.net
Well, that didn't help me in reproducing it.
Could you provide an account on one of those hosts?
 [2005-10-13 17:33 UTC] jonathan dot semczyk at telecomlille dot net
interesting,

my .htaccess is :

RewriteEngine On
RewriteRule ^.*$                test.php        [L]

my test.php contains :

jon<?php echo "jon"; ?>

The URL http://karibou/ and any other gives a blank page. The URL http://karibou/test.php displays "jonjon" (RewriteEngine is On).
 [2005-10-13 17:42 UTC] tony2001@php.net
Works perfectly with any URL here.
 [2005-10-13 17:44 UTC] jonathan dot semczyk at telecomlille dot net
Sure, what do you need ?
 [2005-10-13 17:56 UTC] tony2001@php.net
Well, root account would be great.
Or an unprivileged account with apache/php installed + all this .htaccess/rewrite stuff.
 [2005-10-14 04:21 UTC] jonathan dot semczyk at telecomlille dot net
thanks to tony, this is Debian package related. Compiled 
Apache Httpd from the source and did work.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 17:05:52 2022 UTC