php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35059 Problems with PHP 4.4.1 and mod_rewrite
Submitted: 2005-11-01 21:57 UTC Modified: 2005-11-02 18:55 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:0 (0.0%)
From: free4cd at yahoo dot de Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.4.1RC1 OS: SuSE 9.3
Private report: No CVE-ID: None
 [2005-11-01 21:57 UTC] free4cd at yahoo dot de
Description:
------------
After updating two different webservers to PHP 4.4.1 I get always a blank page with PHP 4.4.1 and mod_rewrite if you click on a link.
Start page load normal but on every additional page you see nothing. No error in error log. Happens with vBulletin and mod_rewrite and Joomla 1.0.3 with mod_rewrite enabled and apache 2.0.55. With PHP 4.4.0 and same settings in php.ini there are no problems. Only PHP version has changed....

Reproduce code:
---------------
Install Joomla 1.0.3 and use mod_rewrite and apache 2.0.x. Enable SEO in Joomla.

Settings in .htaccess:

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



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-02 16:03 UTC] hujer at bazmek dot net
Hi there, we're experiencing the same problem. Been playing with mod_rewrite at RewriteLogLevel 9 and found nothing. Then I tried this simple test:

(.htaccess file)

RewriteEngine On

RewriteRule	^test-html$	test.html [L]
RewriteRule	^test-php$	test.php [L]

While the first rule matches and works well, the second one actually matches properly, too (verified in mod_rewrite log) but the script never gets executed and I get empty document (<html><body></body></html>) as output. No errors in logs whatsoever. It seems like when PHP script as a target of RewriteRule causes the problems. Static content works all well.

Apache/2.0.53@FreeBSD5.4, PHP 4.1.1.

I'm sorry, can't try out PHP5 snapshot ATM.
 [2005-11-02 16:36 UTC] patpro at patpro dot net
Hello, 

FreeBSD 5.4, Apache 2.0.55 + mod_rewrite

sample rule : 
RewriteRule ^affiche/([0-9]+)/$ index.php?
op=affiche&origine=$1 [L]

same problem experienced, but I've got php error logs. What 
can be said from those logs is that : 

php 4.4.1 won't be able to include files if the URL goes 
thru the mod_rewrite:

[02-Nov-2005 15:26:02] PHP Warning:  main(): Unable to 
access ./fonctions.php in /www/.../index.php on line 103
[02-Nov-2005 15:26:02] PHP Warning:  main(./fonctions.php): 
failed to open stream: No such file or directory in /
www/.../index.php on line 103
[02-Nov-2005 15:26:02] PHP Warning:  main(): Failed opening 
'./fonctions.php' for inclusion (include_path='.:') in /
www/.../index.php on line 103

php 4.4.1 will sometime include the file (after apache 
restart AND direct request to the "offending" url) but will 
fail with fatal error : 

[02-Nov-2005 14:53:42] PHP Fatal error:  Cannot redeclare 
listeentrees() (previously declared in /www/.../
fonctions.php:28) in /www/.../fonctions.php on line 28
 [2005-11-02 18:55 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC