ID: 40983
Updated by: [EMAIL PROTECTED]
Reported By: edwardzyang at thewritingpot dot com
-Status: Open
+Status: Wont fix
Bug Type: Livedocs problem
PHP Version: Irrelevant
New Comment:
Livedocs is no longer in development, the current build system is
titled PhD.
Note: There is no such problem in PhD.
Previous Comments:
------------------------------------------------------------------------
[2007-04-04 01:05:27] edwardzyang at thewritingpot dot com
Here is an updated patch that takes into account the fact that some
functions/extensions have numbers in their names.
Index: .htaccess.in
===================================================================
RCS file: /repository/livedocs/.htaccess.in,v
retrieving revision 1.3
diff -u -r1.3 .htaccess.in
--- .htaccess.in 4 Oct 2004 06:41:13 -0000 1.3
+++ .htaccess.in 4 Apr 2007 01:02:09 -0000
@@ -1,6 +1,6 @@
RewriteEngine on
-RewriteRule @[EMAIL PROTECTED] @[EMAIL PROTECTED]
-ErrorDocument 404 @[EMAIL PROTECTED]
+RewriteCond %{REQUEST_FILENAME} !-f [OR]
+RewriteCond %{QUERY_STRING} purge=1
+RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9._-]+)\.html$
@[EMAIL PROTECTED]&q=$2 [L,QSA]
DirectoryIndex index.php
-php_value default_charset "UTF-8"
AddCharset UTF-8 .html
I suspect that IDREG in livedocs/common.php needs to be updated too,
but it has no noticeable effect on things right now.
------------------------------------------------------------------------
[2007-04-02 21:26:50] edwardzyang at thewritingpot dot com
Description:
------------
Livedocs's htaccess file works in a very strange way, by rewriting to a
non-existent file, letting Apache's error document forward it to
index.php, and then handling it. This is confusing, and doesn't work in
certain cases (in said cases, the user consistently gets the File
protocols and wrappers page). A better htaccess file:
Index: .htaccess.in
===================================================================
RCS file: /repository/livedocs/.htaccess.in,v
retrieving revision 1.3
diff -u -r1.3 .htaccess.in
--- .htaccess.in 4 Oct 2004 06:41:13 -0000 1.3
+++ .htaccess.in 2 Apr 2007 21:16:59 -0000
@@ -1,6 +1,6 @@
RewriteEngine on
-RewriteRule @[EMAIL PROTECTED] @[EMAIL PROTECTED]
-ErrorDocument 404 @[EMAIL PROTECTED]
+RewriteCond %{REQUEST_FILENAME} !-f [OR]
+RewriteCond %{QUERY_STRING} purge=1
+RewriteRule ^([A-Za-z_]+)/([A-Za-z._-]+)\.html$
@[EMAIL PROTECTED]&q=$2 [L,QSA]
DirectoryIndex index.php
php_value default_charset "UTF-8"
AddCharset UTF-8 .html
In this case, we specifically match the HTML file, and directly refer
to the index.php script, instantiating the correct l and q parameters. A
user can also pass ?purge=1 to the HTML file to force it to be
regenerated, and the system intelligently detects when the file does not
exist using the -f command.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40983&edit=1