Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 8th June 11:50
php-bugs@lists.php.net (rob at burningsoda dot
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


From: rob at burningsoda dot com
Operating system: FreeBSD 6.0RC1
PHP version: 4CVS-2005-11-04 (snap)
PHP Bug Type: Apache2 related
Bug description: php 4.4.2-dev has still trouble with mod_rewrite/apache2

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.

--
Edit bug report at http://bugs.php.net/?id=35096&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35096&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35096&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35096&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35096&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35096&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35096&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35096&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35096&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35096&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35096&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35096&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35096&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35096&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35096&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35096&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35096&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35096&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35096&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35096&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35096&r=mysqlcfg
  Reply With Quote


  sponsored links


2 8th June 12:30
sniper
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
Updated by: sniper@php.net
Reported By: rob at burningsoda dot com
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[2005-11-04 02:49:53] rob at burningsoda dot com

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35096&edit=1
  Reply With Quote
3 8th June 12:30
php-bugs@lists.php.net (free4cd at yahoo dot
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
Comment by: free4cd at yahoo dot de
Reported By: rob at burningsoda dot com
Status: Feedback
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

Yes, PHP 4.4.x don't work with mod_rewrite... I've the same problem
with the php 4.4.x snapshots (tried with
http://snaps.php.net/php4-STABLE-200511040151.tar.gz) and apache
2.0.55.

I get only a blank page, rewrite don't work. Same problem as posted
before here: http://bugs.php.net/bug.php?id=35059

Btw: the free Zend optimizer don't work with the latest php 5.1.x
version only with 5.0.x.
I need the Zend optimizer for one application so I could not use it.

I've tried 4-5 PHP 4.4.x snapshots and none of these works. Only 4.4.0
ist ok.


Previous Comments:
------------------------------------------------------------------------

[2005-11-04 09:25:24] sniper@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

------------------------------------------------------------------------

[2005-11-04 02:49:53] rob at burningsoda dot com

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35096&edit=1
  Reply With Quote
4 8th June 13:53
php-bugs@lists.php.net (rob at burningsoda dot
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
User updated by: rob at burningsoda dot com
Reported By: rob at burningsoda dot com
-Status: Feedback
+Status: Open
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?


Previous Comments:
------------------------------------------------------------------------

[2005-11-04 09:25:24] sniper@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

------------------------------------------------------------------------

[2005-11-04 02:49:53] rob at burningsoda dot com

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35096&edit=1
  Reply With Quote
5 8th June 13:53
sniper
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
Updated by: sniper@php.net
Reported By: rob at burningsoda dot com
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..

Previous Comments:
------------------------------------------------------------------------

[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?

------------------------------------------------------------------------

[2005-11-04 09:25:24] sniper@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

------------------------------------------------------------------------

[2005-11-04 02:49:53] rob at burningsoda dot com

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35096&edit=1
  Reply With Quote
6 8th June 14:38
php-bugs@lists.php.net (tmelzer at tomesoft dot
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
Comment by: tmelzer at tomesoft dot de
Reported By: rob at burningsoda dot com
Status: Feedback
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

Further ****yzes have shown me that the fix in 4.4.x-dev was in
sapi/apache2handler/sapi_apache2.c in function php_handler to guard
against the member 'handler' on struct request_rec of beeing NULL and
then accessing it. This was fixed in only one case where around line
518
'if (parent_req && parent_req->handler && ...'. After I added an
r->handler && strcmp ... to the other places where the structure member
is used the crash went away but I got a 404 - file not found error. I
think this is related to the fact that I'm not sure what to do if
several of this if () statements are evalute false i.e. what to place
in the else block.


Previous Comments:
------------------------------------------------------------------------

[2005-11-04 22:57:08] sniper@php.net

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..


------------------------------------------------------------------------

[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?

------------------------------------------------------------------------

[2005-11-04 09:25:24] sniper@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

------------------------------------------------------------------------

[2005-11-04 02:49:53] rob at burningsoda dot com

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35096&edit=1
  Reply With Quote
7 8th June 17:17
php-bugs@lists.php.net (sergeym at hoster dot
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
Comment by: sergeym at hoster dot ru
Reported By: rob at burningsoda dot com
Status: Feedback
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

PHP 4.4.1 with patch from FreeBSD team works fine (seems to...). But,
if add some module(s) - it works again as described in bugreport. M'be
order of modules in list is important...

--- sapi/apache2handler/sapi_apache2.c.orig Thu Nov 3 10:13:33
2005
+++ sapi/apache2handler/sapi_apache2.c Thu Nov 3 10:14:41 2005
@@ -535,7 +535,7 @@
if (!parent_req) {
parent_req = ctx->r;
}
- if (parent_req && strcmp(parent_req->handler,
PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE)
&& strcmp(parent_req->h
andler, PHP_SCRIPT)) {
+ if (parent_req && parent_req->handler &&
strcmp(parent_req->handler, PHP_MAGIC_TYPE) &&
strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE)
&& strcmp(parent_req->handler, PHP_SCRIPT)) {
if (php_apache_request_ctor(r, ctx
TSRMLS_CC)!=SUCCESS) {
zend_bailout();
}


Previous Comments:
------------------------------------------------------------------------

[2005-11-05 09:45:15] tmelzer at tomesoft dot de

Further ****yzes have shown me that the fix in 4.4.x-dev was in
sapi/apache2handler/sapi_apache2.c in function php_handler to guard
against the member 'handler' on struct request_rec of beeing NULL and
then accessing it. This was fixed in only one case where around line
518
'if (parent_req && parent_req->handler && ...'. After I added an
r->handler && strcmp ... to the other places where the structure member
is used the crash went away but I got a 404 - file not found error. I
think this is related to the fact that I'm not sure what to do if
several of this if () statements are evalute false i.e. what to place
in the else block.

------------------------------------------------------------------------

[2005-11-04 22:57:08] sniper@php.net

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..


------------------------------------------------------------------------

[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?

------------------------------------------------------------------------

[2005-11-04 09:25:24] sniper@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

------------------------------------------------------------------------

[2005-11-04 02:49:53] rob at burningsoda dot com

Description:
------------
I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov 4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

http://bugs.php.net/bug.php?id=35059

This happens with _any_ RewriteRule I use.

Reproduce code:
---------------
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
<?php echo($_GET['myarg']); ?>

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

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:
----------------
In all three cases a do***ent should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--------------
1. Correctly delivers do***ent.
2. No do***ent is delivered.
3. Correctly delivers do***ent.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35096&edit=1
  Reply With Quote
8 8th June 17:18
php-bugs@lists.php.net (rob at burningsoda dot
External User
 
Posts: 1
Default #35096 : php 4.4.2-dev has still trouble with mod_rewrite/apache2


ID: 35096
User updated by: rob at burningsoda dot com
Reported By: rob at burningsoda dot com
-Status: Feedback
+Status: Open
Bug Type: Apache2 related
Operating System: FreeBSD 6.0RC1
PHP Version: 4CVS-2005-11-04 (snap)
New Comment:

doh!

PHP 5.1.0RC5-dev (cli) (built: Nov 6 2005 03:52:41)

I just tried a php5-snapshot. Same problem here.


Previous Comments:
------------------------------------------------------------------------

[2005-11-06 00:16:33] sergeym at hoster dot ru

PHP 4.4.1 with patch from FreeBSD team works fine (seems to...). But,
if add some module(s) - it works again as described in bugreport. M'be
order of modules in list is important...

--- sapi/apache2handler/sapi_apache2.c.orig Thu Nov 3 10:13:33
2005
+++ sapi/apache2handler/sapi_apache2.c Thu Nov 3 10:14:41 2005
@@ -535,7 +535,7 @@
if (!parent_req) {
parent_req = ctx->r;
}
- if (parent_req && strcmp(parent_req->handler,
PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE)
&& strcmp(parent_req->h
andler, PHP_SCRIPT)) {
+ if (parent_req && parent_req->handler &&
strcmp(parent_req->handler, PHP_MAGIC_TYPE) &&
strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE)
&& strcmp(parent_req->handler, PHP_SCRIPT)) {
if (php_apache_request_ctor(r, ctx
TSRMLS_CC)!=SUCCESS) {
zend_bailout();
}

------------------------------------------------------------------------

[2005-11-05 09:45:15] tmelzer at tomesoft dot de

Further ****yzes have shown me that the fix in 4.4.x-dev was in
sapi/apache2handler/sapi_apache2.c in function php_handler to guard
against the member 'handler' on struct request_rec of beeing NULL and
then accessing it. This was fixed in only one case where around line
518
'if (parent_req && parent_req->handler && ...'. After I added an
r->handler && strcmp ... to the other places where the structure member
is used the crash went away but I got a 404 - file not found error. I
think this is related to the fact that I'm not sure what to do if
several of this if () statements are evalute false i.e. what to place
in the else block.

------------------------------------------------------------------------

[2005-11-04 22:57:08] sniper@php.net

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..


------------------------------------------------------------------------

[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?

------------------------------------------------------------------------

[2005-11-04 09:25:24] sniper@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

------------------------------------------------------------------------

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
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666