PHP tags not working

I have the following code in one of my .html template files:

<?

//Check if Logged In

check_logged();

if(!isLogged()){

?>

... HTML stuff...

<?

}

?>

However, the browser or my PHP 5.2.17 is completely ignoring the parsed php tags.  I have tried different versions ( <?PHP, <?Php, <?php, or <?= ), but neither work.

I also checked PHP.INI...and have SHORT_OPEN_TAG set to ON.

This was not the case when I was on a different server (and quite possibly a different PHP version).  

 

Any ideas?

 

Thanks

Quote · 19 Jan 2012

Hi!

From the thread http://www.boonex.com/forums/topic/Hide-login-form-after-user-logged-in.htm and post of  

I think this may work for you.

add this in the .htaccess file

1.AddType application/x-httpd-php .html .htm .php
2.AddHandler x-httpd-php .html .htm .cgi .php
3.AddType x-mapp-php4 .html .htm .php
4.AddHandler server-parsed .html .htm .php
5.AddType application/x-httpd-php4 .htm .html .php
6.AddHandler application/x-httpd-php5 .html .htm .php                              

I have not tested it. but should work.

so much to do....
Quote · 20 Jan 2012

This will only allow the PHP to not cause problems. On my page, it ignores the PHP script but it shows the script in green in the Source Code. I am trying to add a simple script to the _header.html file and it isn't working. 

My code:

    </script>

    <?php include 'customcssscript.php'; ?>

</head>

I added the lines below to .htaccess too.

 

add this in the .htaccess file

1.AddType application/x-httpd-php .html .htm .php
2.AddHandler x-httpd-php .html .htm .cgi .php
3.AddType x-mapp-php4 .html .htm .php
4.AddHandler server-parsed .html .htm .php
5.AddType application/x-httpd-php4 .htm .html .php
6.AddHandler application/x-httpd-php5 .html .htm .php  

 

Quote · 31 Jan 2012

ohh!!!! leave it use injections.......lol

so much to do....
Quote · 31 Jan 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.