php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65886 FilesMatch for auto_prepend_file does not work
Submitted: 2013-10-12 14:40 UTC Modified: 2013-10-13 21:40 UTC
From: nenad dot strainovic at gmail dot com Assigned:
Status: Duplicate Package: htscanner (PECL)
PHP Version: Irrelevant OS: CentOS 6.4
Private report: No CVE-ID: None
 [2013-10-12 14:40 UTC] nenad dot strainovic at gmail dot com
Description:
------------
I'm using htscanner in order to change php_value through .htaccess but from unknown reason FilesMatch directive does not work as expected.

auto_prepend_file is included globally in all php script, not only for .css files

<FilesMatch "\.css$">
 SetHandler fcgid-script
 FcgidWrapper /home/test/fcgi-bin/php5.fcgi .css
 php_value auto_prepend_file "/home/test/public_html/gzip-css.php"
</FilesMatch>

Test script:
---------------
.htaccess

<FilesMatch "\.css$">
 SetHandler fcgid-script
 FcgidWrapper /home/test/fcgi-bin/php5.fcgi .css
 php_value auto_prepend_file "/home/test/public_html/gzip-css.php"
</FilesMatch>

style.css

body {
 margin: 0;
}

gzip-css.php

<?php

echo 1;

?>

test.php

<?php

echo 2;

?>

Expected result:
----------------
style.css

1body{
 margin: 0;
}

test.php

2

Actual result:
--------------
style.css

1body{
 margin: 0;
}

test.php

12

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-13 21:40 UTC] martynas@php.net
-Status: Open +Status: Duplicate
 [2013-10-13 21:40 UTC] martynas@php.net
Duplicate of bug #57823.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Dec 03 08:01:23 2020 UTC