php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18454 $PHP_SELF / .htaccess & mod_action
Submitted: 2002-07-21 06:54 UTC Modified: 2002-07-21 13:04 UTC
From: harry at ilo dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.1.2 OS: WinXP
Private report: No CVE-ID: None
 [2002-07-21 06:54 UTC] harry at ilo dot de
I'm using mod_action (Apache 1.3.23) in a .htaccess file to use PHP as a parser for other documents:

---------.htaccess-------------------
AddType text/html .eh
AddHandler eh-script .eh
Action eh-script "/eh/parser.php"
-------------------------------------

If I now call a .eh-file directly, say http://localhost/eh/test.eh, and try to determine the documentname of parser.php with $PHP_SELF, $PHP_SELF ist set to /eh/parser.php/eh/test.eh and not to /eh/parser.php as expected. I could use __FILE__ to work around this (__FILE__ is set correctly), but this doesn't work with includes when I need the name of the main parser file.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-21 07:23 UTC] harry at ilo dot de
I'm using mod_action (Apache 1.3.23) in a .htaccess file to use a PHP-File as a parser for other documents:

---------.htaccess-------------------
AddType text/html .eh
AddHandler eh-script .eh
Action eh-script "/eh/parser.php"
-------------------------------------

If I now call a .eh-file directly, say http://localhost/eh/test.eh, and try to determine the documentname of parser.php with $PHP_SELF, $PHP_SELF ist set to /eh/parser.php/eh/test.eh and not to /eh/parser.php as expected. I could use __FILE__ to work around this (__FILE__ is set correctly), but this doesn't work with includes when I need the name of the main parser file.
 [2002-07-21 13:04 UTC] tal@php.net
This is a mod_action bug, marking as bogus.

-Tal
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 17:01:27 2024 UTC