#35059 [Com]: Problems with PHP 4.4.1 and mod_rewrite
| From: | patpro at patpro dot net | Date: | Wed, 02 Nov 2005 15:36:55 +0000 |
| Subject: | #35059 [Com]: Problems with PHP 4.4.1 and mod_rewrite | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87417@lists.php.net to get a copy of this message | ||
ID: 35059
Comment by: patpro at patpro dot net
Reported By: free4cd at yahoo dot de
Status: Feedback
Bug Type: Apache2 related
Operating System: SuSE 9.3
PHP Version: 4.4.1RC1
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2005-11-02 16:03:54] 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 14:20:05] sniper@php.net
Give feedback when you have it. We're not interested what you do in
between.
------------------------------------------------------------------------
[2005-11-01 23:09:50] free4cd at yahoo dot de
OK, I try the PHP5 snapshot.
I post the result tomorrow when I've finished the tests if it
works.
------------------------------------------------------------------------
[2005-11-01 22:24:00] 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-01 21:57:35] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35059&edit=1