#35096 [Com]: using mod_rewrite with apache2 crashes

2005-11-08 Thread scott at whitetigerphotography dot com
 ID:   35096
 Comment by:   scott at whitetigerphotography dot com
 Reported By:  rob at burningsoda dot com
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-11-04) (snap)
 New Comment:

PHP isn't actually crashing with this bug. The original report doesn't
seem to suggest it's crashing either, I'm not sure why the report title
is as it is. This bug is very easily reproducable (on FreeBSD/PHP 4.4.1
at least) with default installs

The bug simply causes PHP not to output anything in most cases, or
output part of a page in others then stop


Previous Comments:


[2005-11-08 17:49:05] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2005-11-08 17:47:38] [EMAIL PROTECTED]

 --enable-versioning <-- Do you know what that does?

(this has nothing to do with the bug, just note that you're using
configure options you should not use)




[2005-11-08 15:13:58] rob at burningsoda dot com

sniper,

To quickly reproduce the bug on FreeBSD 6.0, I do the following:

1. Install Apache 2.0.55 using FreeBSD ports

2. Install PHP 5.0.5 using FreeBSD ports
--> The bug does _not_ show up. (If I had installed 4.4.1 from ports,
it would)

4. Get a 5-dev snapshot (the last one I got is of 2005-11-06) and do
this:

./configure\
  --enable-versioning\
  --enable-memory-limit\
  --with-layout=GNU\
  --with-config-file-scan-dir=/usr/local/etc/php\
  --disable-all\
  --enable-libxml --with-libxml-dir=/usr/local\
  --enable-spl\
  --with-apxs2=/usr/local/sbin/apxs\
  --prefix=/usr/local\
  i386-portbld-freebsd6.0 &&\
make clean &&\
make &&\
cp libs/libphp5.so /usr/local/libexec/apache2 &&\
/usr/local/etc/rc.d/apache2.sh restart

--> there it is.

The configure arguments are the standard arguments of the FreeBSD build
system, but I do _not_ apply any of the FreeBSD-specific patches, they
deliver (and which got included in the build in step 2).

So, either the bug was introduced after 5.0.5 or one of the patches
(have a look at them here:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/files/) fixes it
(which I personally don't think).

Cheers, Rob.



[2005-11-08 01:26:50] Chris at Epler dot net

FreeBSD 4.11, Apache 2.0.55

Immediately after upgrading the PHP package from ports I get 
blank pages from Gallery integrated into Drupal which is using 
mod_rewrite.  4.4.0 did not have this issue and no other 
config file changes were made.



[2005-11-07 20:17:13] free4cd at yahoo dot de

Same problem on SuSE 9.3 and Apache 2.0.55 and 4.x and 5.x snapshots on
i386.
I've compiled Apache by hand and used the SuSE rpm's but I get the same
error (blank page). I've also tried the php.ini-recommended and
php.ini-dist without changes and it don't work.

With 4.4.0 all works fine but since release of 4.4.1 and later
snapshots (4.x and 5.x) mod_rewrite fails.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35096

-- 
Edit this bug report at http://bugs.php.net/?id=35096&edit=1


#35096 [Com]: still trouble with mod_rewrite/apache2

2005-11-06 Thread scott at whitetigerphotography dot com
 ID:   35096
 Comment by:   scott at whitetigerphotography dot com
 Reported By:  rob at burningsoda dot com
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-11-04) (snap)
 New Comment:

Having an identical problem on FreeBSD 4.11-release-p13 with the latest
version from ports (PHP 4.4.1 (cli) (built: Nov  6 2005 23:03:29))
(patched with the original CVS fix for this bug but that doesn't fix
it)

This too happens for any rewrite rule used for PHP. I use rewrite rules
for almost all of my production sites and they have all stopped working,
except for one which uses a CGI script instead. Affects software like
Mambo (Joomla) with SEF enabled and Gallery

Examples for rewrite reproduce code (from gallery):

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$ 
/view_photo.php?set_albumName=$1&index=$2   [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$
/view_photo.php?set_albumName=$1&id=$2  [QSA]

Result:
Blank pages most of the time but in the case of gallery... occasional
parts of pages for some reason. No errors found in PHP or Apache logs


Previous Comments:


[2005-11-07 07:30:34] tmelzer at tomesoft dot de

On SuSE 9.1 
with apache 2.0.55
and php-4.4.x-dev with shared modules in this order
- cryptopp
- bz2
- imap
- exif
- mime_magic
- dba
- zlib
- gd
- sockets
- curl
- iconv
- xslt
- mysql
- interbase
- session 

.htaccess
RewriteEngine On
RewriteBase /shop/
RewriteRule ^irw_(.*)\.html index.php?param=$1



[2005-11-06 22:41:36] free4cd at yahoo dot de

Same Problem with PHP 4.4.1 and 5.1 snapshots.
If rewrite is enabled you get a blank page. No error in log file or
else.

Problem with Joomla and vBulletin/vBSEO if rewrite engine is turned on.
If rewrite is disabled all works fine.

My .htaccess for Joomla:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php



[2005-11-06 19:47:49] remko at elvandar dot org

I had similiar problems with apache2+mod_rewrite and php 
4.4.1. All sites that made use of mod_rewrite broke and gave 
a white page (nothing in the error log though), all other 
sites that use php but not mod_rewrite were working 
perfectly.

my .htaccess:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php



[2005-11-06 16:29:08] brian dot white at foxfire74 dot com

I have a WordPress powerered blog and get it for ANY rewrite rule.

Here is a stripped down version of my .htaccess:
---
# BEGIN WordPress

RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=75]
RewriteRule ^search/(.+)/?$ /blog/index.php?s=$1 [QSA,L]
RewriteRule ^category/(.+)/?$ /blog/index.php?category_name=$1 [QSA,L]
RewriteRule ^author/([^/]+)/?$ /blog/index.php?author_name=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$
/blog/index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$
/blog/index.php?year=$1&monthnum=$2 [QSA,L]
RewriteRule ^([0-9]{4})/?$ /blog/index.php?year=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$
/blog/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,L]


# END WordPress

Here what was requested in the browser:
--
http://.../blog/2005/10/31/happy-halloween/

Here is what shows up in the logs:
-
[Mon Oct 31 23:25:42 2005] [error] PHP Warning: 
main(./wp-blog-header.php): failed to open stream: No such file or
directory in C:\\...\\wordpress\\index.php on line 4
[Mon Oct 31 23:25:42 2005] [error] PHP Fatal error:  main(): Failed
opening required './wp-blog-header.php'
(include_path='.;c:\\php4\\pear') in C:\\...\\wordpress\\index.php on
line 4

Result:
--
The browser displays a blank page since PHP blows up.

Using:
-
PHP 4.4.1
Windows XP SP2
Apache/2.0.55 (Win32) PHP/4.4.1 
php4apache2.dll



[2005-11-06 15:52:48] [EMAIL PROTECTED]

Exactly how can we reproduce this? It works just fine for me when I
have this .htaccess file:

RewriteEngine on
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

So what else do we need?




The remainder of the comments for this report are too long. To view
the rest o