Edit report at https://bugs.php.net/bug.php?id=55636&edit=1
ID: 55636 Updated by: fel...@php.net Reported by: raphpell at cario dot fr Summary: auto_prepend_file do not work sometimes -Status: Open +Status: Not a bug Type: Bug Package: *Configuration Issues Operating System: window PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2011-09-07 19:11:32] raphpell at cario dot fr Description: ------------ [EN] With Apache I consider css files as php. I configure my php.ini file with auto_prepend_file = "redirection.php" and sometimes this file was not prepend, always for the same file. I try differents versions of PHP and Apache, and software like easyPHP and WampServer but it persist in window. In Mac all work fine. [FR] Les détails techniques Je fait considérer grâce à Apache mes fichiers css comme étant des fichiers php. Grâce à ma configuration php, je préfixe tous mes fichiers php par un autre nommé redirection.php. Si un fichier css est détecté par mon fichier php l'entête http "Content-Type:text/css" est ajouté. L'accès à un fichier css entraîne, si les configurations de l'application le demande, une compression et un encodage de son contenu, et la mise en cache du résultat avant d'envoyer le résultat au navigateur. Un jour j'ai remarqué, qu'une page sur trois, l'aspect visuel d'éléments html ne respectait pas la feuille de style externe jointe bizarrement considéré comme étant de l'html. Observations sur le fichier css 'érroné' Son Content-Type est text/html au lieu d'être text/css Il ne reconnait pas une constante php défini dans le fichier redirection.php, une erreur php est générée dedans. Aucun cache n'est généré dans tous les cas On remarque bien que dans une et une seule de mes pages, le fichier css est considéré comme php mais n'est pas préfixé par mon fichier redirection.php. Conclusion En passant sou Mac tout fonctionne correctement ! Sous windows avec WampServer, j'ai essayé les versions Apache et php de mon Mac entre autre, mais rien n'y fait... J'ai même essayé sur EasyPHP, et toujours le même bug est apparu !!! Pour window, j'ai tout simplement renoncé de le mettre en externe, j'ai inclus le css dans la page html. Je n'ai jamais trouvé d'où pouvait venir se phénomène. Test script: --------------- <link rel="stylesheet" type="text/css" href="/path/to/css/file/"> Expected result: ---------------- My css file must be prepended by my php file redirection.php. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55636&edit=1