php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16219 Templating through PHP with .html files fails
Submitted: 2002-03-22 04:43 UTC Modified: 2002-03-22 05:41 UTC
From: adriaan dot van dot bauwel at defcon3 dot be Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.1.2 OS: Windows 2000 Advanced Server
Private report: No CVE-ID: None
 [2002-03-22 04:43 UTC] adriaan dot van dot bauwel at defcon3 dot be
I made a site under PHP 4.1.1 using the built-in PHP templating funtions through the use of the Alternative Control Structures.

All my PHP code is in several .php files, all text of the website is in template/xxx.html format, including the alternative control structures and pure HTML syntax.

At the end of the PHP page, i call the template HTML file with a require("template/xxx.html");.

In PHP 4.1.1, this displays the page correctly.  In PHP 4.1.2, the page loads untill it gets at the first PHP funtion in the template, being <? if ($extra_links): ?>.  The standard variable parsing DOES work, as there's already a call to <?=$foto?> that gets parsed.

I've reloaded PHP 4.1.1, and now the site in question works again like it should.  No code been altered since the first installation of PHP 4.1.2.

The sole need for PHP on this page is this templating, depending on which section of the site ppl visit, it loads a different main section of the site with a different menu.

On a Linux system this problem doesn't exist.

regards,
Adriaan Van Bauwel

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-22 05:09 UTC] hholzgra@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-03-22 05:19 UTC] adriaan dot van dot bauwel at defcon3 dot be
FYI:

I'm not asking for support.  I did NOT change any code, installed a new version of PHP, and my site doesn't load anymore. The site worked perfectly under PHP 4.1.1 and does NOT work under 4.1.2.  i call that a bug in 4.1.2, so I filed a bug report for it.  I included alot of documentation of HOW i work so you'd have an easier time to check what happens..

I use similar code on PHP 4.1.2 on Linux-based servers, and it works there.. Doesn't work on 4.1.2 for windows.
 [2002-03-22 05:41 UTC] hholzgra@php.net
you are reporting an issue that is not a bug but
a configuration issue

check your short_tags settings using phpinfo(),
or even better use '<?php' instead of just '<?'
so that your code does not rely on short_tags
being enabled
 [2002-03-25 03:49 UTC] adriaan dot van dot bauwel at defcon3 dot be
It was a configuration issue indeed.. I replaces the distribution php.ini with recommended php.ini after upgrading by mistake.. and the site used teh global _get vars..

My apologies
Adriaan
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 20:00:02 2025 UTC