Some php doesn't get executed the right way
Posted by: NeoID (---.84-49-87.nextgentel.com)
Date: November 20, 2006 11:44AM

I've installed wamp and been running it for quite some time. I've installed several forums and CMS solutions, but sometimes I get code rendered like this when trying to get access to my site:

\n"; if ( file_exists( "install/index.php" ) ) { echo "Please, wait. Redirecting you to installation form...
\n"; echo "\n"; } exit(); } require_once( "inc/header.inc.php" ); require_once( "{$dir['inc']}design.inc.php" ); include( "{$dir['root']}templates/tmpl_{$tmpl}/scripts/index.php" ); ?>

Is there something I'm missing or have to enable in the wamp menu? Please help me out.. smiling smiley
Thanks and keep up the good work...

Options: ReplyQuote
Re: Some php doesn't get executed the right way
Posted by: CyberSpatium (71.237.217.---)
Date: November 20, 2006 04:37PM

make sure you are using full php tags, not short style tags. so, make sure the first line of code in your php scripts starts with <?php and not just <?.

if that does not solve it, then post some code so I can see what your are trying to do with your script.


CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote
Re: Some php doesn't get executed the right way
Posted by: NeoID (---.84-49-87.nextgentel.com)
Date: November 20, 2006 05:10PM

Thanks for your reply.

I've tried that, but nothing happened.

Here is the index.php file if that may help you..:


<?

if ( !file_exists( "inc/header.inc.php" ) )
{
// this is dynamic page - send headers to do not cache this page
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header("Expires: $now"winking smiley;
header("Last-Modified: $now"winking smiley;
header("Cache-Control: no-cache, must-revalidate"winking smiley;
header("Pragma: no-cache"winking smiley;

echo "It seems to be script is <b>not</b> installed.<br />\n";
if ( file_exists( "install/index.php" ) )
{
echo "Please, wait. Redirecting you to installation form...<br />\n";
echo "<script language=\"Javascript\">location.href = 'install/index.php';</script>\n";
}
exit();
}

require_once( "inc/header.inc.php" );
require_once( "{$dir['inc']}design.inc.php" );

include( "{$dir['root']}templates/tmpl_{$tmpl}/scripts/index.php" );

?>

Options: ReplyQuote
Re: Some php doesn't get executed the right way
Posted by: CyberSpatium (71.237.217.---)
Date: November 20, 2006 05:45PM

change the first line from:
<?

to
<?php

CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote
Re: Some php doesn't get executed the right way
Posted by: NeoID (---.84-49-87.nextgentel.com)
Date: November 20, 2006 06:36PM

As as said in my second post, I've tried to change it, even on the other pages that are included, but nothing changed... (I posted the original code). :/
Anyway, isn't there a way of turning on support for "short tags"? Something else I could try?

Thanks

Options: ReplyQuote
Re: Some php doesn't get executed the right way
Posted by: CyberSpatium (71.237.217.---)
Date: November 21, 2006 09:41AM

and the code you posted is using short style tags not full php tags

CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote


Sorry, only registered users may post in this forum.